ccplot-general Mailing List for ccplot (Page 3)
CloudSat and CALIPSO plotting tool
Brought to you by:
peterkuma
You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(15) |
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(3) |
2015 |
Jan
(3) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2017 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: ANDREW H. (R. Student) <ag...@ri...> - 2014-11-26 23:00:49
|
Hello, I am trying to build ccplot, but I get an error "Unresolved external symbol referenced in function"In fct this happens 3 times, and seems to be . hdf.obj build. An example would be "unresolved external symbol VSinquire referenced in function _pyx_pf_6ccplot_3hdf_3HDF_32_read_vdata I am using a 64 bit Windows 7 machine with Python 2.7. Thank you for your help. Andrew |
From: Luecke H. <un...@wi...> - 2014-03-28 14:24:27
|
and in |
From: Serge-Alexandre D. G. <ser...@ho...> - 2014-01-30 08:46:42
|
http://blog.soulsearchers.co.in/btwnow.php?Serge_Alexandre_Demers_Giroux 1/30/2014 9:46:32 AM |
From: Peter K. <pet...@wa...> - 2013-11-26 10:47:46
|
Hi Ryan, After some investigation I found out that the missing symbol is from libGctp. It is fixed in the latest master. https://github.com/peterkuma/ccplot/archive/master.zip If you just overwrite the old ccplot directory, please do touch ccplot/*.pyx first, as the modules would not be rebuilt otherwise. Hopefully, this will be the last bit. Regards, Peter On 11/22/2013 11:22 PM, Ryan Scott wrote: > Thanks, Peter. > > > On Fri, Nov 22, 2013 at 2:21 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > Thanks. That pretty much exhausts the options. I'll write to python > mac users list tomorrow to see if anyone has an idea. > > Peter > > > Hi Peter, > > > > Here's what happens this time: > > > > bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal > > binary with 2 architectures > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > > i386): Mach-O > > bundle i386 > > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > > x86_64): Mach-O 64-bit bundle x86_64 > > > > -Ryan > > > > > > On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...>> > > wrote: > > > > > Ryan, > > > > > > This indicates that python was indeed running in 64-bit mode, > because > > > when forced to run in 32-bits it failed even earlier with > basemap. The > > > hdfeos library itself is 64-bit, which is good. The only remaining > > > option is that the hdfeos.pyx module was compiled only as i386. > Can you > > > please check, so that we are sure? > > > > > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > > > > > The build output you sent me last time seems suspicious > regarding this > > > (the linker reports only -arch i386). If it is indeed to case, > it will > > > be easier to contact someone upstream about this. > > > > > > Peter > > > > > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > > > Hi Peter, > > > > > > > > My machine is running Mac OS X 10.8.4. > > > > > > > > Here's the requested output: > > > > > > > > bash-3.2$ file `which python` > > > > /usr/bin/python: Mach-O universal binary with 2 architectures > > > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable > > > > x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > > > shared library x86_64 > > > > bash-3.2$ python -V > > > > Python 2.7.2 > > > > bash-3.2$ python -c 'import platform; print > platform.machine(); print > > > > > platform.architecture()' > > > > x86_64 > > > > > > > > And here's output from ccplot -V > > > > > > > > bash-3.2$ ccplot -V > > > > Traceback (most recent call last): > > > > File "/usr/local/bin/ccplot", line 53, in <module> > > > > from mpl_toolkits import basemap > > > > File > > > > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > > > line 37, in <module> > > > > import _geoslib > > > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, > > > > 2): Symbol not found: _GEOSArea > > > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > > > Expected in: flat namespace > > > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > > > > > Thanks! > > > > > > > > Ryan > > > > > > > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> wrote: > > > > > > > > Ryan, > > > > > > > > The man page for the mac version of python mentions that it runs > > > 64-bit > > > > by default, but it can be instructed to run 32-bit with: > > > > > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > > > > > So you can try setting this environment variable before running > > > ccplot > > > > -V. But I'm not sure if it helps. > > > > > > > > Peter > > > > > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > > Ryan, > > > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > > > is > > > > 32-bit (or vice-versa). Could you please try: > > > > > > > > file `which python` > > > > file /opt/local/lib/libhdfeos.0.dylib > > > > python -V > > > > python -c 'import platform; print platform.machine(); print > > > > platform.architecture()' > > > > > > > > Also if you can tell me your Mac OS X version... > > > > > > > > Hopefully, having more information will help. > > > > > > > > Cheers, > > > > > > > > Peter > > > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > > > Hi Peter, > > > > > > > > Unfortunately, I'm running into new trouble. Perhaps the issue > > > > might be > > > > specific to my machine? > > > > > > > > Here is output from a simple command which should work if > > > > installation > > > > were successful. > > > > > > > > bash-3.2$ ccplot -V > > > > Traceback (most recent call last): > > > > File "/usr/local/bin/ccplot", line 56, in <module> > > > > from ccplot.hdfeos import HDFEOS > > > > ImportError: > > > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > > > 2): Symbol not found: _for_init > > > > Referenced from: /opt/local/lib/libhdfeos.0.dylib > > > > Expected in: flat namespace > > > > in /opt/local/lib/libhdfeos.0.dylib > > > > > > > > Thanks, > > > > > > > > Ryan > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 22:21:17
|
Ryan, Thanks. That pretty much exhausts the options. I'll write to python mac users list tomorrow to see if anyone has an idea. Peter > Hi Peter, > > Here's what happens this time: > > bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal > binary with 2 architectures > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > i386): Mach-O > bundle i386 > /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture > x86_64): Mach-O 64-bit bundle x86_64 > > -Ryan > > > On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma <pet...@wa...> > wrote: > > > Ryan, > > > > This indicates that python was indeed running in 64-bit mode, because > > when forced to run in 32-bits it failed even earlier with basemap. The > > hdfeos library itself is 64-bit, which is good. The only remaining > > option is that the hdfeos.pyx module was compiled only as i386. Can you > > please check, so that we are sure? > > > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > > > The build output you sent me last time seems suspicious regarding this > > (the linker reports only -arch i386). If it is indeed to case, it will > > be easier to contact someone upstream about this. > > > > Peter > > > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > My machine is running Mac OS X 10.8.4. > > > > > > Here's the requested output: > > > > > > bash-3.2$ file `which python` > > > /usr/bin/python: Mach-O universal binary with 2 architectures > > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable > > > x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > > shared library x86_64 > > > bash-3.2$ python -V > > > Python 2.7.2 > > > bash-3.2$ python -c 'import platform; print platform.machine(); print > > > > platform.architecture()' > > > x86_64 > > > > > > And here's output from ccplot -V > > > > > > bash-3.2$ ccplot -V > > > Traceback (most recent call last): > > > File "/usr/local/bin/ccplot", line 53, in <module> > > > from mpl_toolkits import basemap > > > File > > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > > line 37, in <module> > > > import _geoslib > > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, > > > 2): Symbol not found: _GEOSArea > > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > > Expected in: flat namespace > > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > > > Thanks! > > > > > > Ryan > > > > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > > > <mailto:pet...@wa...>> wrote: > > > > > > Ryan, > > > > > > The man page for the mac version of python mentions that it runs > > 64-bit > > > by default, but it can be instructed to run 32-bit with: > > > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > > > So you can try setting this environment variable before running > > ccplot > > > -V. But I'm not sure if it helps. > > > > > > Peter > > > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > Ryan, > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > > is > > > 32-bit (or vice-versa). Could you please try: > > > > > > file `which python` > > > file /opt/local/lib/libhdfeos.0.dylib > > > python -V > > > python -c 'import platform; print platform.machine(); print > > > platform.architecture()' > > > > > > Also if you can tell me your Mac OS X version... > > > > > > Hopefully, having more information will help. > > > > > > Cheers, > > > > > > Peter > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > Unfortunately, I'm running into new trouble. Perhaps the issue > > > might be > > > specific to my machine? > > > > > > Here is output from a simple command which should work if > > > installation > > > were successful. > > > > > > bash-3.2$ ccplot -V > > > Traceback (most recent call last): > > > File "/usr/local/bin/ccplot", line 56, in <module> > > > from ccplot.hdfeos import HDFEOS > > > ImportError: > > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > > 2): Symbol not found: _for_init > > > Referenced from: /opt/local/lib/libhdfeos.0.dylib > > > Expected in: flat namespace > > > in /opt/local/lib/libhdfeos.0.dylib > > > > > > Thanks, > > > > > > Ryan > > > > |
From: Ryan S. <rsc...@gm...> - 2013-11-22 22:14:14
|
Hi Peter, Here's what happens this time: bash-3.2$ file /Library/Python/2.7/site-packages/ccplot/hdfeos.so /Library/Python/2.7/site-packages/ccplot/hdfeos.so: Mach-O universal binary with 2 architectures /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture i386): Mach-O bundle i386 /Library/Python/2.7/site-packages/ccplot/hdfeos.so (for architecture x86_64): Mach-O 64-bit bundle x86_64 -Ryan On Fri, Nov 22, 2013 at 2:05 PM, Peter Kuma <pet...@wa...> wrote: > Ryan, > > This indicates that python was indeed running in 64-bit mode, because > when forced to run in 32-bits it failed even earlier with basemap. The > hdfeos library itself is 64-bit, which is good. The only remaining > option is that the hdfeos.pyx module was compiled only as i386. Can you > please check, so that we are sure? > > file /Library/Python/2.7/site-packages/ccplot/hdfeos.so > > The build output you sent me last time seems suspicious regarding this > (the linker reports only -arch i386). If it is indeed to case, it will > be easier to contact someone upstream about this. > > Peter > > On 11/22/2013 10:20 PM, Ryan Scott wrote: > > Hi Peter, > > > > My machine is running Mac OS X 10.8.4. > > > > Here's the requested output: > > > > bash-3.2$ file `which python` > > /usr/bin/python: Mach-O universal binary with 2 architectures > > /usr/bin/python (for architecture i386):Mach-O executable i386 > > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable x86_64 > > bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > > shared library x86_64 > > bash-3.2$ python -V > > Python 2.7.2 > > bash-3.2$ python -c 'import platform; print platform.machine(); print > >> platform.architecture()' > > x86_64 > > > > And here's output from ccplot -V > > > > bash-3.2$ ccplot -V > > Traceback (most recent call last): > > File "/usr/local/bin/ccplot", line 53, in <module> > > from mpl_toolkits import basemap > > File > > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > > line 37, in <module> > > import _geoslib > > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): > > Symbol not found: _GEOSArea > > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > > Expected in: flat namespace > > in /Library/Python/2.7/site-packages/_geoslib.so > > > > Thanks! > > > > Ryan > > > > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > > <mailto:pet...@wa...>> wrote: > > > > Ryan, > > > > The man page for the mac version of python mentions that it runs > 64-bit > > by default, but it can be instructed to run 32-bit with: > > > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > > > So you can try setting this environment variable before running > ccplot > > -V. But I'm not sure if it helps. > > > > Peter > > > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > > Ryan, > > > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python > is > > > 32-bit (or vice-versa). Could you please try: > > > > > > file `which python` > > > file /opt/local/lib/libhdfeos.0.dylib > > > python -V > > > python -c 'import platform; print platform.machine(); print > > > platform.architecture()' > > > > > > Also if you can tell me your Mac OS X version... > > > > > > Hopefully, having more information will help. > > > > > > Cheers, > > > > > > Peter > > > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > > >> Hi Peter, > > >> > > >> Unfortunately, I'm running into new trouble. Perhaps the issue > > might be > > >> specific to my machine? > > >> > > >> Here is output from a simple command which should work if > > installation > > >> were successful. > > >> > > >> bash-3.2$ ccplot -V > > >> Traceback (most recent call last): > > >> File "/usr/local/bin/ccplot", line 56, in <module> > > >> from ccplot.hdfeos import HDFEOS > > >> ImportError: > > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > > >> 2): Symbol not found: _for_init > > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > > >> Expected in: flat namespace > > >> in /opt/local/lib/libhdfeos.0.dylib > > >> > > >> Thanks, > > >> > > >> Ryan > > |
From: Peter K. <pet...@wa...> - 2013-11-22 22:05:10
|
Ryan, This indicates that python was indeed running in 64-bit mode, because when forced to run in 32-bits it failed even earlier with basemap. The hdfeos library itself is 64-bit, which is good. The only remaining option is that the hdfeos.pyx module was compiled only as i386. Can you please check, so that we are sure? file /Library/Python/2.7/site-packages/ccplot/hdfeos.so The build output you sent me last time seems suspicious regarding this (the linker reports only -arch i386). If it is indeed to case, it will be easier to contact someone upstream about this. Peter On 11/22/2013 10:20 PM, Ryan Scott wrote: > Hi Peter, > > My machine is running Mac OS X 10.8.4. > > Here's the requested output: > > bash-3.2$ file `which python` > /usr/bin/python: Mach-O universal binary with 2 architectures > /usr/bin/python (for architecture i386):Mach-O executable i386 > /usr/bin/python (for architecture x86_64):Mach-O 64-bit executable x86_64 > bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib > /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked > shared library x86_64 > bash-3.2$ python -V > Python 2.7.2 > bash-3.2$ python -c 'import platform; print platform.machine(); print >> platform.architecture()' > x86_64 > > And here's output from ccplot -V > > bash-3.2$ ccplot -V > Traceback (most recent call last): > File "/usr/local/bin/ccplot", line 53, in <module> > from mpl_toolkits import basemap > File > "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", > line 37, in <module> > import _geoslib > ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): > Symbol not found: _GEOSArea > Referenced from: /Library/Python/2.7/site-packages/_geoslib.so > Expected in: flat namespace > in /Library/Python/2.7/site-packages/_geoslib.so > > Thanks! > > Ryan > > > On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > The man page for the mac version of python mentions that it runs 64-bit > by default, but it can be instructed to run 32-bit with: > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > So you can try setting this environment variable before running ccplot > -V. But I'm not sure if it helps. > > Peter > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > Ryan, > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > > 32-bit (or vice-versa). Could you please try: > > > > file `which python` > > file /opt/local/lib/libhdfeos.0.dylib > > python -V > > python -c 'import platform; print platform.machine(); print > > platform.architecture()' > > > > Also if you can tell me your Mac OS X version... > > > > Hopefully, having more information will help. > > > > Cheers, > > > > Peter > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > >> Hi Peter, > >> > >> Unfortunately, I'm running into new trouble. Perhaps the issue > might be > >> specific to my machine? > >> > >> Here is output from a simple command which should work if > installation > >> were successful. > >> > >> bash-3.2$ ccplot -V > >> Traceback (most recent call last): > >> File "/usr/local/bin/ccplot", line 56, in <module> > >> from ccplot.hdfeos import HDFEOS > >> ImportError: > dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > >> 2): Symbol not found: _for_init > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > >> Expected in: flat namespace > >> in /opt/local/lib/libhdfeos.0.dylib > >> > >> Thanks, > >> > >> Ryan |
From: Ryan S. <rsc...@gm...> - 2013-11-22 21:20:57
|
Hi Peter, My machine is running Mac OS X 10.8.4. Here's the requested output: bash-3.2$ file `which python` /usr/bin/python: Mach-O universal binary with 2 architectures /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 bash-3.2$ file /opt/local/lib/libhdfeos.0.dylib /opt/local/lib/libhdfeos.0.dylib: Mach-O 64-bit dynamically linked shared library x86_64 bash-3.2$ python -V Python 2.7.2 bash-3.2$ python -c 'import platform; print platform.machine(); print > platform.architecture()' x86_64 And here's output from ccplot -V bash-3.2$ ccplot -V Traceback (most recent call last): File "/usr/local/bin/ccplot", line 53, in <module> from mpl_toolkits import basemap File "/Library/Python/2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 37, in <module> import _geoslib ImportError: dlopen(/Library/Python/2.7/site-packages/_geoslib.so, 2): Symbol not found: _GEOSArea Referenced from: /Library/Python/2.7/site-packages/_geoslib.so Expected in: flat namespace in /Library/Python/2.7/site-packages/_geoslib.so Thanks! Ryan On Fri, Nov 22, 2013 at 1:04 PM, Peter Kuma <pet...@wa...> wrote: > Ryan, > > The man page for the mac version of python mentions that it runs 64-bit > by default, but it can be instructed to run 32-bit with: > > export VERSIONER_PYTHON_PREFER_32_BIT=yes > > So you can try setting this environment variable before running ccplot > -V. But I'm not sure if it helps. > > Peter > > On 11/22/2013 09:48 PM, Peter Kuma wrote: > > Ryan, > > > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > > 32-bit (or vice-versa). Could you please try: > > > > file `which python` > > file /opt/local/lib/libhdfeos.0.dylib > > python -V > > python -c 'import platform; print platform.machine(); print > > platform.architecture()' > > > > Also if you can tell me your Mac OS X version... > > > > Hopefully, having more information will help. > > > > Cheers, > > > > Peter > > > > On 11/22/2013 08:57 PM, Ryan Scott wrote: > >> Hi Peter, > >> > >> Unfortunately, I'm running into new trouble. Perhaps the issue might be > >> specific to my machine? > >> > >> Here is output from a simple command which should work if installation > >> were successful. > >> > >> bash-3.2$ ccplot -V > >> Traceback (most recent call last): > >> File "/usr/local/bin/ccplot", line 56, in <module> > >> from ccplot.hdfeos import HDFEOS > >> ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > >> 2): Symbol not found: _for_init > >> Referenced from: /opt/local/lib/libhdfeos.0.dylib > >> Expected in: flat namespace > >> in /opt/local/lib/libhdfeos.0.dylib > >> > >> Thanks, > >> > >> Ryan > >> > >> > >> > >> > >> > >> On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... > >> <mailto:rsc...@gm...>> wrote: > >> > >> Hey Peter, > >> > >> I just ran the build script (using the latest setup.py file that you > >> sent in the last message) and didn't receive any errors like those > >> that have been causing a forced exit on previous attempts. I ran > >> sudo python setup.py install and it seems to check out alright. Is > >> there a way of testing the install to ensure that everything should > >> work correctly before I embark on learning how to use ccplot? > >> > >> Attached is the previous setup.py script that resided in > ccplot-master. > >> > >> Many thanks for your patience and assistance, > >> > >> Ryan > >> > >> > >> On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma < > pet...@wa... > >> <mailto:pet...@wa...>> wrote: > >> > >> Ryan, > >> > >> Yes it helped! The library_dirs option is apparently not even > >> applied. > >> Could you please send me your current setup.py - in case > >> anything was > >> wrongly applied? > >> > >> Attached is one that should have all modifications needed. > >> > >> Peter > >> > >> On 11/22/2013 08:11 PM, Ryan Scott wrote: > >> > Hi Peter, > >> > > >> > Here's the build output after having applied the .diff file > in the > >> > ccplot-master directory: > >> > > >> > bash-3.2$ cd ~/Desktop/ccplot-master/ > >> > bash-3.2$ ls > >> > LICENSEccplot > >> > MANIFEST.inccplot-verbose-link.diff > >> > NEWScmap > >> > README.mdman > >> > binsetup.py > >> > buildtest > >> > bash-3.2$ patch < ccplot-verbose-link.diff > >> > (Stripping trailing CRs from patch.) > >> > patching file setup.py > >> > bash-3.2$ python setup.py build > >> > running build > >> > running build_py > >> > running build_ext > >> > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > >> > building 'ccplot.hdf' extension > >> > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > >> -fno-common > >> > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > >> -DMACOSX > >> > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG > >> -g -Os > >> > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > >> > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > >> > -I/usr/local/include/hdf -I/opt/local/include > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > clang: warning: argument unused during compilation: > >> '-mno-fused-madd' > >> > In file included from ccplot/hdf.c:314: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > warning: > >> > unused function '_import_array' [-Wunused-function] > >> > _import_array(void) > >> > ^ > >> > In file included from ccplot/hdf.c:315: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > warning: > >> > unused function '_import_umath' [-Wunused-function] > >> > _import_umath(void) > >> > ^ > >> > 2 warnings generated. > >> > In file included from ccplot/hdf.c:314: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > warning: > >> > unused function '_import_array' [-Wunused-function] > >> > _import_array(void) > >> > ^ > >> > In file included from ccplot/hdf.c:315: > >> > In file included from > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > warning: > >> > unused function '_import_umath' [-Wunused-function] > >> > _import_umath(void) > >> > ^ > >> > 2 warnings generated. > >> > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 > >> -arch x86_64 > >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > >> > -I/Users/ryan/Desktop/src/boost_1_53_0 > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > >> -ljpeg -lz -o > >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > >> > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > >> > Target: x86_64-apple-darwin12.4.0 > >> > Thread model: posix > >> > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle > >> -macosx_version_min > >> > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > >> > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > >> -ljpeg -lz > >> > -arch_multiple -final_output > >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > >> > ld: library not found for -lmfhdf > >> > clang: error: linker command failed with exit code 1 (use -v > >> to see > >> > invocation) > >> > error: command 'clang' failed with exit status 1 > >> > > >> > Hopefully this helps! > >> > > >> > -Ryan > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma > >> <pet...@wa... <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> wrote: > >> > > >> > Hi Ryan, > >> > > >> > dylib is the equivalent of so files on other unix systems. > >> The linker > >> > should find the library just fine if it is indeed located > >> under > >> > /opt/local/lib/libmfhdf.dylib. I don't know why it does > not. > >> > > >> > The best I can think of is to add a verbose flag to the > >> linker to get a > >> > more detailed error report. A patch is attached. It can be > >> applied with: > >> > > >> > patch < ccplot-verbose-link.diff > >> > > >> > in the ccplot directory. If you can send me the build > >> output that would > >> > be great. > >> > > >> > Regards, > >> > > >> > Peter > >> > > >> > On 11/22/2013 06:47 PM, Ryan Scott wrote: > >> > > Hi Peter, > >> > > > >> > > After receiving the same error with the up-to-date > >> ccplot-master, I > >> > > checked /opt/local/lib and I have the following > >> libmfhdf* files > >> > > > >> > > libmfhdf.0.dylib > >> > > libmfhdf.a > >> > > libmfhdf.dylib > >> > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > >> <http://libmfhdf.la> > >> > > > >> > > The lack of the libmfhdf.so file is presumably then the > >> root of the > >> > > error. Do you know where this can be obtained? > >> > > > >> > > Best, Ryan > >> > > > >> > > > >> > > > >> > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > >> > <pet...@wa... <mailto:pet...@wa...> > >> <mailto:pet...@wa... <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>> > >> > wrote: > >> > > > >> > > Hi Ryan, > >> > > > >> > > I think this could be a similar problem as with the > >> include > >> > path. The > >> > > solution depends on where the libmfhdf.so library > >> is, I assume > >> > it is > >> > > /opt/local/lib. Please try adding the path to > >> hdf_library_dirs in > >> > > setup.py: > >> > > > >> > > - hdf_library_dirs = [] > >> > > + hdf_library_dirs = ['/opt/local/lib'] > >> > > > >> > > (line 25) > >> > > > >> > > Or, if it does not work, please try locate > libmfhdf.so. > >> > > > >> > > The current master incorporates both fixes for the > >> include > >> > path and > >> > > MAX_VAR_DIMS. > >> > > > >> > > Regards, > >> > > > >> > > Peter > >> > > > >> > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > >> > > > Hello Peter, > >> > > > > >> > > > I have attempted to build both ccplot-master as > >> well as > >> > > ccplot-1.5-rc7, > >> > > > ensuring that hdf.c everywhere reads > >> H4_MAX_VAR_DIMS where > >> > necessary. > >> > > > However, still no luck on the build. > >> > > > > >> > > > Here is the output from my latest try: > >> > > > > >> > > > bash-3.2$ python setup.py build > >> > > > running build > >> > > > running build_py > >> > > > running build_ext > >> > > > skipping 'ccplot/hdf.c' Cython extension > (up-to-date) > >> > > > building 'ccplot.hdf' extension > >> > > > clang -fno-strict-aliasing -fno-common -dynamic -g > >> -Os -pipe > >> > > -fno-common > >> > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > >> -DENABLE_DTRACE > >> > -DMACOSX > >> > > > -DNDEBUG -Wall -Wstrict-prototypes > -Wshorten-64-to-32 > >> > -DNDEBUG -g -Os > >> > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch > >> i386 -arch > >> > x86_64 > >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > >> -I/usr/include/hdf > >> > > > -I/usr/local/include/hdf -I/opt/local/include > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > > > -c ccplot/hdf.c -o > >> build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > > > clang: warning: argument unused during > compilation: > >> > '-mno-fused-madd' > >> > > > In file included from ccplot/hdf.c:314: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > > > warning: > >> > > > unused function '_import_array' > >> [-Wunused-function] > >> > > > _import_array(void) > >> > > > ^ > >> > > > In file included from ccplot/hdf.c:315: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > > > warning: > >> > > > unused function '_import_umath' > >> [-Wunused-function] > >> > > > _import_umath(void) > >> > > > ^ > >> > > > 2 warnings generated. > >> > > > In file included from ccplot/hdf.c:314: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > >> > > > warning: > >> > > > unused function '_import_array' > >> [-Wunused-function] > >> > > > _import_array(void) > >> > > > ^ > >> > > > In file included from ccplot/hdf.c:315: > >> > > > In file included from > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > >> > > > > >> > > > >> > > >> > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > >> > > > warning: > >> > > > unused function '_import_umath' > >> [-Wunused-function] > >> > > > _import_umath(void) > >> > > > ^ > >> > > > 2 warnings generated. > >> > > > clang -bundle -undefined dynamic_lookup -Wl,-F. > >> -arch i386 -arch > >> > > x86_64 > >> > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > >> > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> -lmfhdf -ldf > >> > -ljpeg > >> > > -lz -o > >> > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > >> > > > ld: library not found for -lmfhdf > >> > > > clang: error: linker command failed with exit code > >> 1 (use -v > >> > to see > >> > > > invocation) > >> > > > error: command 'clang' failed with exit status 1 > >> > > > > >> > > > Hopefully this is also an easy fix. Best, > >> > > > > >> > > > Ryan > >> > > > > >> > > > > >> > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > >> > > <pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> > >> > > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>>> > >> > > wrote: > >> > > > > >> > > > Hi Ryan, > >> > > > > >> > > > Thanks for the follow-up. It is nice to hear > >> you find ccplot > >> > > useful. > >> > > > > >> > > > I was afraid there may be more problems. I'm > >> sure other mac > >> > > users will > >> > > > be happy to see this sorted out. > >> > > > > >> > > > The reason is that MAX_VAR_DIMS is only > >> available when HDF4 > >> > > was compiled > >> > > > with netcdf-3 compatibility. It should be easy > >> to fix by > >> > > replacing all > >> > > > occurrences of MAX_VAR_DIMS with > H4_MAX_VAR_DIMS. > >> > > > > >> > > > Please try an updated version from github: > >> > > > > >> > > > > >> https://github.com/peterkuma/ccplot/archive/master.zip > >> > > > > >> > > > Regards, > >> > > > > >> > > > Peter > >> > > > > >> > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > >> > > > > Hello Peter, > >> > > > > > >> > > > > I very much appreciate the timely response > >> and your > >> > > willingness to > >> > > > help. > >> > > > > I was happy to see that a new version of > >> ccplot was > >> > > available without > >> > > > > the PyNIO dependency, which has prevented me > >> from using it > >> > > in the > >> > > > past. > >> > > > > ccplot appears to be far superior than what > is > >> > possible using > >> > > > Matlab and > >> > > > > NCAR Command Language! > >> > > > > > >> > > > > I have modified line 24 of setup.py to > reflect > >> > > '/opt/local/include' as > >> > > > > well, and I no longer receive the error > >> regarding > >> > hntdefs.h. > >> > > > > > >> > > > > Unfortunately, though I'm presented with a > >> new error. To > >> > > give you as > >> > > > > much detail as possible, here's the new > issue: > >> > > > > > >> > > > > "bash-3.2$ python setup.py build > >> > > > > running build > >> > > > > running build_py > >> > > > > running build_ext > >> > > > > skipping 'ccplot/hdf.c' Cython extension > >> (up-to-date) > >> > > > > building 'ccplot.hdf' extension > >> > > > > clang -fno-strict-aliasing -fno-common > >> -dynamic -g -Os > >> > -pipe > >> > > > -fno-common > >> > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > >> > -DENABLE_DTRACE > >> > > -DMACOSX > >> > > > > -DNDEBUG -Wall -Wstrict-prototypes > >> -Wshorten-64-to-32 > >> > > -DNDEBUG -g -Os > >> > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE > >> -arch i386 -arch > >> > > x86_64 > >> > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > >> > -I/usr/include/hdf > >> > > > > -I/usr/local/include/hdf > -I/opt/local/include > >> > > > > > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > >> > > > > > >> > > > > >> > > > >> > > >> > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > >> > > > > -c ccplot/hdf.c -o > >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > >> > > > > clang: warning: argument unused during > >> compilation: > >> > > '-mno-fused-madd' > >> > > > > ccplot/hdf.c:5266:30: error: use of > >> undeclared identifier > >> > > > 'MAX_VAR_DIMS' > >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); > if > >> > > (unlikely(!__pyx_t_1)) > >> > > > > {__pyx_filename =... > >> > > > > ^ > >> > > > > ccplot/hdf.c:7066:30: error: use of > >> undeclared identifier > >> > > > 'MAX_VAR_DIMS' > >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); > if > >> > > (unlikely(!__pyx_t_1)) > >> > > > > {__pyx_filename =... > >> > > > > ^ > >> > > > > 2 errors generated. > >> > > > > error: command 'clang' failed with exit > >> status 1" > >> > > > > > >> > > > > Perhaps there is an easy fix? > >> > > > > > >> > > > > Best, > >> > > > > > >> > > > > -Ryan > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > >> > > > <pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>> > >> > > > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>>> <mailto: > pet...@wa... > >> <mailto:pet...@wa...> > >> > <mailto:pet...@wa... > >> <mailto:pet...@wa...>> > >> > > <mailto:pet...@wa... > >> <mailto:pet...@wa...> <mailto:pet...@wa... > >> <mailto:pet...@wa...>>>>>> > >> > > > wrote: > >> > > > > > >> > > > > On 11/21/2013 02:07 AM, ryan scott > wrote: > >> > > > > > I have installed all dependencies for > >> ccplot. > >> > However, > >> > > when > >> > > > > attempting to build ccplot before > >> installation, I > >> > > receive the > >> > > > > following error message: > >> > > > > > > >> > > > > > "ccplot/hdf.c:317:10: fatal error: > >> 'hntdefs.h' file > >> > > not found > >> > > > > > #include "hntdefs.h" > >> > > > > > ^ > >> > > > > > 1 error generated. > >> > > > > > error: command 'clang' failed with > >> exit status 1" > >> > > > > > > >> > > > > > I do, however, have the hdf4 library > >> installed (via > >> > > > MacPorts), the > >> > > > > following > >> > > > > > > >> > > > > > bash-3.2$ locate hntdefs.h > >> > > > > > /opt/local/include/hntdefs.h > >> > > > > > > >> > > > > > shows that I do have this file. Could > >> anyone please > >> > > point me in > >> > > > > the right direction? > >> > > > > > > >> > > > > > Any help is very much appreciated. > Thanks, > >> > > > > > > >> > > > > > Ryan > >> > > > > > >> > > > > Dear Ryan, > >> > > > > > >> > > > > Sorry - I think this is a problem with > >> ccplot rather > >> > > than your > >> > > > > configuration. It assumes that hdf is > >> available > >> > under either > >> > > > > /usr/include/hdf or > >> /usr/local/include/hdf, which > >> > is a valid > >> > > > assumption > >> > > > > on linux, but not on mac. For now, > could you > >> > please just add > >> > > > the path to > >> > > > > hdf_include_dirs in setup.py? > >> > > > > > >> > > > > - hdf_include_dirs = > ['/usr/include/hdf', > >> > > > '/usr/local/include/hdf'] > >> > > > > + hdf_include_dirs = > ['/usr/include/hdf', > >> > > > '/usr/local/include/hdf', > >> > > > > '/opt/local/include'] > >> > > > > > >> > > > > (line 24) > >> > > > > > >> > > > > Unfortunately, I don't have access to a > >> mac system for > >> > > testing > >> > > > now, so I > >> > > > > would not find out. Hopefully, darwin > >> will be good > >> > > enough for > >> > > > this. I'll > >> > > > > try to fix these issues soon. > >> > > > > > >> > > > > Thank you very much for reporting the > >> problem. > >> > > > > > >> > > > > Regards, > >> > > > > > >> > > > > Peter > >> > > > > > >> > > > > > >> > > > > >> > > > > >> > > > >> > > > >> > > >> > > >> > >> > >> > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 21:04:25
|
Ryan, The man page for the mac version of python mentions that it runs 64-bit by default, but it can be instructed to run 32-bit with: export VERSIONER_PYTHON_PREFER_32_BIT=yes So you can try setting this environment variable before running ccplot -V. But I'm not sure if it helps. Peter On 11/22/2013 09:48 PM, Peter Kuma wrote: > Ryan, > > It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is > 32-bit (or vice-versa). Could you please try: > > file `which python` > file /opt/local/lib/libhdfeos.0.dylib > python -V > python -c 'import platform; print platform.machine(); print > platform.architecture()' > > Also if you can tell me your Mac OS X version... > > Hopefully, having more information will help. > > Cheers, > > Peter > > On 11/22/2013 08:57 PM, Ryan Scott wrote: >> Hi Peter, >> >> Unfortunately, I'm running into new trouble. Perhaps the issue might be >> specific to my machine? >> >> Here is output from a simple command which should work if installation >> were successful. >> >> bash-3.2$ ccplot -V >> Traceback (most recent call last): >> File "/usr/local/bin/ccplot", line 56, in <module> >> from ccplot.hdfeos import HDFEOS >> ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, >> 2): Symbol not found: _for_init >> Referenced from: /opt/local/lib/libhdfeos.0.dylib >> Expected in: flat namespace >> in /opt/local/lib/libhdfeos.0.dylib >> >> Thanks, >> >> Ryan >> >> >> >> >> >> On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... >> <mailto:rsc...@gm...>> wrote: >> >> Hey Peter, >> >> I just ran the build script (using the latest setup.py file that you >> sent in the last message) and didn't receive any errors like those >> that have been causing a forced exit on previous attempts. I ran >> sudo python setup.py install and it seems to check out alright. Is >> there a way of testing the install to ensure that everything should >> work correctly before I embark on learning how to use ccplot? >> >> Attached is the previous setup.py script that resided in ccplot-master. >> >> Many thanks for your patience and assistance, >> >> Ryan >> >> >> On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma <pet...@wa... >> <mailto:pet...@wa...>> wrote: >> >> Ryan, >> >> Yes it helped! The library_dirs option is apparently not even >> applied. >> Could you please send me your current setup.py - in case >> anything was >> wrongly applied? >> >> Attached is one that should have all modifications needed. >> >> Peter >> >> On 11/22/2013 08:11 PM, Ryan Scott wrote: >> > Hi Peter, >> > >> > Here's the build output after having applied the .diff file in the >> > ccplot-master directory: >> > >> > bash-3.2$ cd ~/Desktop/ccplot-master/ >> > bash-3.2$ ls >> > LICENSEccplot >> > MANIFEST.inccplot-verbose-link.diff >> > NEWScmap >> > README.mdman >> > binsetup.py >> > buildtest >> > bash-3.2$ patch < ccplot-verbose-link.diff >> > (Stripping trailing CRs from patch.) >> > patching file setup.py >> > bash-3.2$ python setup.py build >> > running build >> > running build_py >> > running build_ext >> > skipping 'ccplot/hdf.c' Cython extension (up-to-date) >> > building 'ccplot.hdf' extension >> > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe >> -fno-common >> > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE >> -DMACOSX >> > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG >> -g -Os >> > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 >> > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf >> > -I/usr/local/include/hdf -I/opt/local/include >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > clang: warning: argument unused during compilation: >> '-mno-fused-madd' >> > In file included from ccplot/hdf.c:314: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > warning: >> > unused function '_import_array' [-Wunused-function] >> > _import_array(void) >> > ^ >> > In file included from ccplot/hdf.c:315: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > warning: >> > unused function '_import_umath' [-Wunused-function] >> > _import_umath(void) >> > ^ >> > 2 warnings generated. >> > In file included from ccplot/hdf.c:314: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > warning: >> > unused function '_import_array' [-Wunused-function] >> > _import_array(void) >> > ^ >> > In file included from ccplot/hdf.c:315: >> > In file included from >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > warning: >> > unused function '_import_umath' [-Wunused-function] >> > _import_umath(void) >> > ^ >> > 2 warnings generated. >> > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 >> -arch x86_64 >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib >> > -I/Users/ryan/Desktop/src/boost_1_53_0 >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf >> -ljpeg -lz -o >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v >> > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) >> > Target: x86_64-apple-darwin12.4.0 >> > Thread model: posix >> > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle >> -macosx_version_min >> > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o >> > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out >> > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf >> -ljpeg -lz >> > -arch_multiple -final_output >> > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a >> > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a >> > ld: library not found for -lmfhdf >> > clang: error: linker command failed with exit code 1 (use -v >> to see >> > invocation) >> > error: command 'clang' failed with exit status 1 >> > >> > Hopefully this helps! >> > >> > -Ryan >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma >> <pet...@wa... <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>> wrote: >> > >> > Hi Ryan, >> > >> > dylib is the equivalent of so files on other unix systems. >> The linker >> > should find the library just fine if it is indeed located >> under >> > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. >> > >> > The best I can think of is to add a verbose flag to the >> linker to get a >> > more detailed error report. A patch is attached. It can be >> applied with: >> > >> > patch < ccplot-verbose-link.diff >> > >> > in the ccplot directory. If you can send me the build >> output that would >> > be great. >> > >> > Regards, >> > >> > Peter >> > >> > On 11/22/2013 06:47 PM, Ryan Scott wrote: >> > > Hi Peter, >> > > >> > > After receiving the same error with the up-to-date >> ccplot-master, I >> > > checked /opt/local/lib and I have the following >> libmfhdf* files >> > > >> > > libmfhdf.0.dylib >> > > libmfhdf.a >> > > libmfhdf.dylib >> > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> >> <http://libmfhdf.la> >> > > >> > > The lack of the libmfhdf.so file is presumably then the >> root of the >> > > error. Do you know where this can be obtained? >> > > >> > > Best, Ryan >> > > >> > > >> > > >> > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma >> > <pet...@wa... <mailto:pet...@wa...> >> <mailto:pet...@wa... <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>> >> > wrote: >> > > >> > > Hi Ryan, >> > > >> > > I think this could be a similar problem as with the >> include >> > path. The >> > > solution depends on where the libmfhdf.so library >> is, I assume >> > it is >> > > /opt/local/lib. Please try adding the path to >> hdf_library_dirs in >> > > setup.py: >> > > >> > > - hdf_library_dirs = [] >> > > + hdf_library_dirs = ['/opt/local/lib'] >> > > >> > > (line 25) >> > > >> > > Or, if it does not work, please try locate libmfhdf.so. >> > > >> > > The current master incorporates both fixes for the >> include >> > path and >> > > MAX_VAR_DIMS. >> > > >> > > Regards, >> > > >> > > Peter >> > > >> > > On 11/22/2013 01:38 AM, Ryan Scott wrote: >> > > > Hello Peter, >> > > > >> > > > I have attempted to build both ccplot-master as >> well as >> > > ccplot-1.5-rc7, >> > > > ensuring that hdf.c everywhere reads >> H4_MAX_VAR_DIMS where >> > necessary. >> > > > However, still no luck on the build. >> > > > >> > > > Here is the output from my latest try: >> > > > >> > > > bash-3.2$ python setup.py build >> > > > running build >> > > > running build_py >> > > > running build_ext >> > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) >> > > > building 'ccplot.hdf' extension >> > > > clang -fno-strict-aliasing -fno-common -dynamic -g >> -Os -pipe >> > > -fno-common >> > > > -fno-strict-aliasing -fwrapv -mno-fused-madd >> -DENABLE_DTRACE >> > -DMACOSX >> > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 >> > -DNDEBUG -g -Os >> > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch >> i386 -arch >> > x86_64 >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe >> -I/usr/include/hdf >> > > > -I/usr/local/include/hdf -I/opt/local/include >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > > > -c ccplot/hdf.c -o >> build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > > > clang: warning: argument unused during compilation: >> > '-mno-fused-madd' >> > > > In file included from ccplot/hdf.c:314: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > > > warning: >> > > > unused function '_import_array' >> [-Wunused-function] >> > > > _import_array(void) >> > > > ^ >> > > > In file included from ccplot/hdf.c:315: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > > > warning: >> > > > unused function '_import_umath' >> [-Wunused-function] >> > > > _import_umath(void) >> > > > ^ >> > > > 2 warnings generated. >> > > > In file included from ccplot/hdf.c:314: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: >> > > > warning: >> > > > unused function '_import_array' >> [-Wunused-function] >> > > > _import_array(void) >> > > > ^ >> > > > In file included from ccplot/hdf.c:315: >> > > > In file included from >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: >> > > > >> > > >> > >> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: >> > > > warning: >> > > > unused function '_import_umath' >> [-Wunused-function] >> > > > _import_umath(void) >> > > > ^ >> > > > 2 warnings generated. >> > > > clang -bundle -undefined dynamic_lookup -Wl,-F. >> -arch i386 -arch >> > > x86_64 >> > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib >> > > > -I/Users/ryan/Desktop/src/boost_1_53_0 >> > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> -lmfhdf -ldf >> > -ljpeg >> > > -lz -o >> > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so >> > > > ld: library not found for -lmfhdf >> > > > clang: error: linker command failed with exit code >> 1 (use -v >> > to see >> > > > invocation) >> > > > error: command 'clang' failed with exit status 1 >> > > > >> > > > Hopefully this is also an easy fix. Best, >> > > > >> > > > Ryan >> > > > >> > > > >> > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma >> > > <pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>> >> > > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>>>> >> > > wrote: >> > > > >> > > > Hi Ryan, >> > > > >> > > > Thanks for the follow-up. It is nice to hear >> you find ccplot >> > > useful. >> > > > >> > > > I was afraid there may be more problems. I'm >> sure other mac >> > > users will >> > > > be happy to see this sorted out. >> > > > >> > > > The reason is that MAX_VAR_DIMS is only >> available when HDF4 >> > > was compiled >> > > > with netcdf-3 compatibility. It should be easy >> to fix by >> > > replacing all >> > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. >> > > > >> > > > Please try an updated version from github: >> > > > >> > > > >> https://github.com/peterkuma/ccplot/archive/master.zip >> > > > >> > > > Regards, >> > > > >> > > > Peter >> > > > >> > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: >> > > > > Hello Peter, >> > > > > >> > > > > I very much appreciate the timely response >> and your >> > > willingness to >> > > > help. >> > > > > I was happy to see that a new version of >> ccplot was >> > > available without >> > > > > the PyNIO dependency, which has prevented me >> from using it >> > > in the >> > > > past. >> > > > > ccplot appears to be far superior than what is >> > possible using >> > > > Matlab and >> > > > > NCAR Command Language! >> > > > > >> > > > > I have modified line 24 of setup.py to reflect >> > > '/opt/local/include' as >> > > > > well, and I no longer receive the error >> regarding >> > hntdefs.h. >> > > > > >> > > > > Unfortunately, though I'm presented with a >> new error. To >> > > give you as >> > > > > much detail as possible, here's the new issue: >> > > > > >> > > > > "bash-3.2$ python setup.py build >> > > > > running build >> > > > > running build_py >> > > > > running build_ext >> > > > > skipping 'ccplot/hdf.c' Cython extension >> (up-to-date) >> > > > > building 'ccplot.hdf' extension >> > > > > clang -fno-strict-aliasing -fno-common >> -dynamic -g -Os >> > -pipe >> > > > -fno-common >> > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd >> > -DENABLE_DTRACE >> > > -DMACOSX >> > > > > -DNDEBUG -Wall -Wstrict-prototypes >> -Wshorten-64-to-32 >> > > -DNDEBUG -g -Os >> > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE >> -arch i386 -arch >> > > x86_64 >> > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe >> > -I/usr/include/hdf >> > > > > -I/usr/local/include/hdf -I/opt/local/include >> > > > > >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include >> > > > > >> > > > >> > > >> > >> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 >> > > > > -c ccplot/hdf.c -o >> > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o >> > > > > clang: warning: argument unused during >> compilation: >> > > '-mno-fused-madd' >> > > > > ccplot/hdf.c:5266:30: error: use of >> undeclared identifier >> > > > 'MAX_VAR_DIMS' >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if >> > > (unlikely(!__pyx_t_1)) >> > > > > {__pyx_filename =... >> > > > > ^ >> > > > > ccplot/hdf.c:7066:30: error: use of >> undeclared identifier >> > > > 'MAX_VAR_DIMS' >> > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if >> > > (unlikely(!__pyx_t_1)) >> > > > > {__pyx_filename =... >> > > > > ^ >> > > > > 2 errors generated. >> > > > > error: command 'clang' failed with exit >> status 1" >> > > > > >> > > > > Perhaps there is an easy fix? >> > > > > >> > > > > Best, >> > > > > >> > > > > -Ryan >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > >> > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma >> > > > <pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>> >> > > > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>>> <mailto:pet...@wa... >> <mailto:pet...@wa...> >> > <mailto:pet...@wa... >> <mailto:pet...@wa...>> >> > > <mailto:pet...@wa... >> <mailto:pet...@wa...> <mailto:pet...@wa... >> <mailto:pet...@wa...>>>>>> >> > > > wrote: >> > > > > >> > > > > On 11/21/2013 02:07 AM, ryan scott wrote: >> > > > > > I have installed all dependencies for >> ccplot. >> > However, >> > > when >> > > > > attempting to build ccplot before >> installation, I >> > > receive the >> > > > > following error message: >> > > > > > >> > > > > > "ccplot/hdf.c:317:10: fatal error: >> 'hntdefs.h' file >> > > not found >> > > > > > #include "hntdefs.h" >> > > > > > ^ >> > > > > > 1 error generated. >> > > > > > error: command 'clang' failed with >> exit status 1" >> > > > > > >> > > > > > I do, however, have the hdf4 library >> installed (via >> > > > MacPorts), the >> > > > > following >> > > > > > >> > > > > > bash-3.2$ locate hntdefs.h >> > > > > > /opt/local/include/hntdefs.h >> > > > > > >> > > > > > shows that I do have this file. Could >> anyone please >> > > point me in >> > > > > the right direction? >> > > > > > >> > > > > > Any help is very much appreciated. Thanks, >> > > > > > >> > > > > > Ryan >> > > > > >> > > > > Dear Ryan, >> > > > > >> > > > > Sorry - I think this is a problem with >> ccplot rather >> > > than your >> > > > > configuration. It assumes that hdf is >> available >> > under either >> > > > > /usr/include/hdf or >> /usr/local/include/hdf, which >> > is a valid >> > > > assumption >> > > > > on linux, but not on mac. For now, could you >> > please just add >> > > > the path to >> > > > > hdf_include_dirs in setup.py? >> > > > > >> > > > > - hdf_include_dirs = ['/usr/include/hdf', >> > > > '/usr/local/include/hdf'] >> > > > > + hdf_include_dirs = ['/usr/include/hdf', >> > > > '/usr/local/include/hdf', >> > > > > '/opt/local/include'] >> > > > > >> > > > > (line 24) >> > > > > >> > > > > Unfortunately, I don't have access to a >> mac system for >> > > testing >> > > > now, so I >> > > > > would not find out. Hopefully, darwin >> will be good >> > > enough for >> > > > this. I'll >> > > > > try to fix these issues soon. >> > > > > >> > > > > Thank you very much for reporting the >> problem. >> > > > > >> > > > > Regards, >> > > > > >> > > > > Peter >> > > > > >> > > > > >> > > > >> > > > >> > > >> > > >> > >> > >> >> >> > |
From: Peter K. <pet...@wa...> - 2013-11-22 20:48:58
|
Ryan, It seems like libhdfeos.0.dylib is compiled as 64-bit, but python is 32-bit (or vice-versa). Could you please try: file `which python` file /opt/local/lib/libhdfeos.0.dylib python -V python -c 'import platform; print platform.machine(); print platform.architecture()' Also if you can tell me your Mac OS X version... Hopefully, having more information will help. Cheers, Peter On 11/22/2013 08:57 PM, Ryan Scott wrote: > Hi Peter, > > Unfortunately, I'm running into new trouble. Perhaps the issue might be > specific to my machine? > > Here is output from a simple command which should work if installation > were successful. > > bash-3.2$ ccplot -V > Traceback (most recent call last): > File "/usr/local/bin/ccplot", line 56, in <module> > from ccplot.hdfeos import HDFEOS > ImportError: dlopen(/Library/Python/2.7/site-packages/ccplot/hdfeos.so, > 2): Symbol not found: _for_init > Referenced from: /opt/local/lib/libhdfeos.0.dylib > Expected in: flat namespace > in /opt/local/lib/libhdfeos.0.dylib > > Thanks, > > Ryan > > > > > > On Fri, Nov 22, 2013 at 11:40 AM, Ryan Scott <rsc...@gm... > <mailto:rsc...@gm...>> wrote: > > Hey Peter, > > I just ran the build script (using the latest setup.py file that you > sent in the last message) and didn't receive any errors like those > that have been causing a forced exit on previous attempts. I ran > sudo python setup.py install and it seems to check out alright. Is > there a way of testing the install to ensure that everything should > work correctly before I embark on learning how to use ccplot? > > Attached is the previous setup.py script that resided in ccplot-master. > > Many thanks for your patience and assistance, > > Ryan > > > On Fri, Nov 22, 2013 at 11:29 AM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Ryan, > > Yes it helped! The library_dirs option is apparently not even > applied. > Could you please send me your current setup.py - in case > anything was > wrongly applied? > > Attached is one that should have all modifications needed. > > Peter > > On 11/22/2013 08:11 PM, Ryan Scott wrote: > > Hi Peter, > > > > Here's the build output after having applied the .diff file in the > > ccplot-master directory: > > > > bash-3.2$ cd ~/Desktop/ccplot-master/ > > bash-3.2$ ls > > LICENSEccplot > > MANIFEST.inccplot-verbose-link.diff > > NEWScmap > > README.mdman > > binsetup.py > > buildtest > > bash-3.2$ patch < ccplot-verbose-link.diff > > (Stripping trailing CRs from patch.) > > patching file setup.py > > bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG > -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 > -arch x86_64 > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg -lz -o > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > > Target: x86_64-apple-darwin12.4.0 > > Thread model: posix > > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle > -macosx_version_min > > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg -lz > > -arch_multiple -final_output > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > > ld: library not found for -lmfhdf > > clang: error: linker command failed with exit code 1 (use -v > to see > > invocation) > > error: command 'clang' failed with exit status 1 > > > > Hopefully this helps! > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> wrote: > > > > Hi Ryan, > > > > dylib is the equivalent of so files on other unix systems. > The linker > > should find the library just fine if it is indeed located > under > > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. > > > > The best I can think of is to add a verbose flag to the > linker to get a > > more detailed error report. A patch is attached. It can be > applied with: > > > > patch < ccplot-verbose-link.diff > > > > in the ccplot directory. If you can send me the build > output that would > > be great. > > > > Regards, > > > > Peter > > > > On 11/22/2013 06:47 PM, Ryan Scott wrote: > > > Hi Peter, > > > > > > After receiving the same error with the up-to-date > ccplot-master, I > > > checked /opt/local/lib and I have the following > libmfhdf* files > > > > > > libmfhdf.0.dylib > > > libmfhdf.a > > > libmfhdf.dylib > > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > <http://libmfhdf.la> > > > > > > The lack of the libmfhdf.so file is presumably then the > root of the > > > error. Do you know where this can be obtained? > > > > > > Best, Ryan > > > > > > > > > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > Hi Ryan, > > > > > > I think this could be a similar problem as with the > include > > path. The > > > solution depends on where the libmfhdf.so library > is, I assume > > it is > > > /opt/local/lib. Please try adding the path to > hdf_library_dirs in > > > setup.py: > > > > > > - hdf_library_dirs = [] > > > + hdf_library_dirs = ['/opt/local/lib'] > > > > > > (line 25) > > > > > > Or, if it does not work, please try locate libmfhdf.so. > > > > > > The current master incorporates both fixes for the > include > > path and > > > MAX_VAR_DIMS. > > > > > > Regards, > > > > > > Peter > > > > > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > > > Hello Peter, > > > > > > > > I have attempted to build both ccplot-master as > well as > > > ccplot-1.5-rc7, > > > > ensuring that hdf.c everywhere reads > H4_MAX_VAR_DIMS where > > necessary. > > > > However, still no luck on the build. > > > > > > > > Here is the output from my latest try: > > > > > > > > bash-3.2$ python setup.py build > > > > running build > > > > running build_py > > > > running build_ext > > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > > building 'ccplot.hdf' extension > > > > clang -fno-strict-aliasing -fno-common -dynamic -g > -Os -pipe > > > -fno-common > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > -DENABLE_DTRACE > > -DMACOSX > > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > > -DNDEBUG -g -Os > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch > i386 -arch > > x86_64 > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > clang: warning: argument unused during compilation: > > '-mno-fused-madd' > > > > In file included from ccplot/hdf.c:314: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > > warning: > > > > unused function '_import_array' > [-Wunused-function] > > > > _import_array(void) > > > > ^ > > > > In file included from ccplot/hdf.c:315: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > > warning: > > > > unused function '_import_umath' > [-Wunused-function] > > > > _import_umath(void) > > > > ^ > > > > 2 warnings generated. > > > > In file included from ccplot/hdf.c:314: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > > warning: > > > > unused function '_import_array' > [-Wunused-function] > > > > _import_array(void) > > > > ^ > > > > In file included from ccplot/hdf.c:315: > > > > In file included from > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > > warning: > > > > unused function '_import_umath' > [-Wunused-function] > > > > _import_umath(void) > > > > ^ > > > > 2 warnings generated. > > > > clang -bundle -undefined dynamic_lookup -Wl,-F. > -arch i386 -arch > > > x86_64 > > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > -lmfhdf -ldf > > -ljpeg > > > -lz -o > > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > > > ld: library not found for -lmfhdf > > > > clang: error: linker command failed with exit code > 1 (use -v > > to see > > > > invocation) > > > > error: command 'clang' failed with exit status 1 > > > > > > > > Hopefully this is also an easy fix. Best, > > > > > > > > Ryan > > > > > > > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > > > <pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>>>> > > > wrote: > > > > > > > > Hi Ryan, > > > > > > > > Thanks for the follow-up. It is nice to hear > you find ccplot > > > useful. > > > > > > > > I was afraid there may be more problems. I'm > sure other mac > > > users will > > > > be happy to see this sorted out. > > > > > > > > The reason is that MAX_VAR_DIMS is only > available when HDF4 > > > was compiled > > > > with netcdf-3 compatibility. It should be easy > to fix by > > > replacing all > > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > > > > > Please try an updated version from github: > > > > > > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > > > > > Regards, > > > > > > > > Peter > > > > > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > > > Hello Peter, > > > > > > > > > > I very much appreciate the timely response > and your > > > willingness to > > > > help. > > > > > I was happy to see that a new version of > ccplot was > > > available without > > > > > the PyNIO dependency, which has prevented me > from using it > > > in the > > > > past. > > > > > ccplot appears to be far superior than what is > > possible using > > > > Matlab and > > > > > NCAR Command Language! > > > > > > > > > > I have modified line 24 of setup.py to reflect > > > '/opt/local/include' as > > > > > well, and I no longer receive the error > regarding > > hntdefs.h. > > > > > > > > > > Unfortunately, though I'm presented with a > new error. To > > > give you as > > > > > much detail as possible, here's the new issue: > > > > > > > > > > "bash-3.2$ python setup.py build > > > > > running build > > > > > running build_py > > > > > running build_ext > > > > > skipping 'ccplot/hdf.c' Cython extension > (up-to-date) > > > > > building 'ccplot.hdf' extension > > > > > clang -fno-strict-aliasing -fno-common > -dynamic -g -Os > > -pipe > > > > -fno-common > > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > > -DENABLE_DTRACE > > > -DMACOSX > > > > > -DNDEBUG -Wall -Wstrict-prototypes > -Wshorten-64-to-32 > > > -DNDEBUG -g -Os > > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE > -arch i386 -arch > > > x86_64 > > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > > -I/usr/include/hdf > > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > > -c ccplot/hdf.c -o > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > > clang: warning: argument unused during > compilation: > > > '-mno-fused-madd' > > > > > ccplot/hdf.c:5266:30: error: use of > undeclared identifier > > > > 'MAX_VAR_DIMS' > > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > > (unlikely(!__pyx_t_1)) > > > > > {__pyx_filename =... > > > > > ^ > > > > > ccplot/hdf.c:7066:30: error: use of > undeclared identifier > > > > 'MAX_VAR_DIMS' > > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > > (unlikely(!__pyx_t_1)) > > > > > {__pyx_filename =... > > > > > ^ > > > > > 2 errors generated. > > > > > error: command 'clang' failed with exit > status 1" > > > > > > > > > > Perhaps there is an easy fix? > > > > > > > > > > Best, > > > > > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > > > <pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>> > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>>>> > > > > wrote: > > > > > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > > > I have installed all dependencies for > ccplot. > > However, > > > when > > > > > attempting to build ccplot before > installation, I > > > receive the > > > > > following error message: > > > > > > > > > > > > "ccplot/hdf.c:317:10: fatal error: > 'hntdefs.h' file > > > not found > > > > > > #include "hntdefs.h" > > > > > > ^ > > > > > > 1 error generated. > > > > > > error: command 'clang' failed with > exit status 1" > > > > > > > > > > > > I do, however, have the hdf4 library > installed (via > > > > MacPorts), the > > > > > following > > > > > > > > > > > > bash-3.2$ locate hntdefs.h > > > > > > /opt/local/include/hntdefs.h > > > > > > > > > > > > shows that I do have this file. Could > anyone please > > > point me in > > > > > the right direction? > > > > > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > > > > > Ryan > > > > > > > > > > Dear Ryan, > > > > > > > > > > Sorry - I think this is a problem with > ccplot rather > > > than your > > > > > configuration. It assumes that hdf is > available > > under either > > > > > /usr/include/hdf or > /usr/local/include/hdf, which > > is a valid > > > > assumption > > > > > on linux, but not on mac. For now, could you > > please just add > > > > the path to > > > > > hdf_include_dirs in setup.py? > > > > > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > > > '/usr/local/include/hdf'] > > > > > + hdf_include_dirs = ['/usr/include/hdf', > > > > '/usr/local/include/hdf', > > > > > '/opt/local/include'] > > > > > > > > > > (line 24) > > > > > > > > > > Unfortunately, I don't have access to a > mac system for > > > testing > > > > now, so I > > > > > would not find out. Hopefully, darwin > will be good > > > enough for > > > > this. I'll > > > > > try to fix these issues soon. > > > > > > > > > > Thank you very much for reporting the > problem. > > > > > > > > > > Regards, > > > > > > > > > > Peter > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 19:29:49
|
Ryan, Yes it helped! The library_dirs option is apparently not even applied. Could you please send me your current setup.py - in case anything was wrongly applied? Attached is one that should have all modifications needed. Peter On 11/22/2013 08:11 PM, Ryan Scott wrote: > Hi Peter, > > Here's the build output after having applied the .diff file in the > ccplot-master directory: > > bash-3.2$ cd ~/Desktop/ccplot-master/ > bash-3.2$ ls > LICENSEccplot > MANIFEST.inccplot-verbose-link.diff > NEWScmap > README.mdman > binsetup.py > buildtest > bash-3.2$ patch < ccplot-verbose-link.diff > (Stripping trailing CRs from patch.) > patching file setup.py > bash-3.2$ python setup.py build > running build > running build_py > running build_ext > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > building 'ccplot.hdf' extension > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > -I/usr/local/include/hdf -I/opt/local/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > clang: warning: argument unused during compilation: '-mno-fused-madd' > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > -I/Users/ryan/Desktop/src/boost_1_53_0 > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz -o > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -v > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > Target: x86_64-apple-darwin12.4.0 > Thread model: posix > "/usr/bin/ld" -demangle -dynamic -arch i386 -bundle -macosx_version_min > 10.8.0 -undefined dynamic_lookup -undefined dynamic_lookup -o > /var/folders/fx/t186xjbj1wl66fscp60wm0yw0000gp/T//i8J7H3.out > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib -F. > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz > -arch_multiple -final_output > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so -lSystem > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.eprintf.a > /usr/bin/../lib/clang/4.2/lib/darwin/libclang_rt.osx.a > ld: library not found for -lmfhdf > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > error: command 'clang' failed with exit status 1 > > Hopefully this helps! > > -Ryan > > > > > > > > > > > > > > > > > > On Fri, Nov 22, 2013 at 10:58 AM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > dylib is the equivalent of so files on other unix systems. The linker > should find the library just fine if it is indeed located under > /opt/local/lib/libmfhdf.dylib. I don't know why it does not. > > The best I can think of is to add a verbose flag to the linker to get a > more detailed error report. A patch is attached. It can be applied with: > > patch < ccplot-verbose-link.diff > > in the ccplot directory. If you can send me the build output that would > be great. > > Regards, > > Peter > > On 11/22/2013 06:47 PM, Ryan Scott wrote: > > Hi Peter, > > > > After receiving the same error with the up-to-date ccplot-master, I > > checked /opt/local/lib and I have the following libmfhdf* files > > > > libmfhdf.0.dylib > > libmfhdf.a > > libmfhdf.dylib > > libmfhdf.la <http://libmfhdf.la> <http://libmfhdf.la> > > > > The lack of the libmfhdf.so file is presumably then the root of the > > error. Do you know where this can be obtained? > > > > Best, Ryan > > > > > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > Hi Ryan, > > > > I think this could be a similar problem as with the include > path. The > > solution depends on where the libmfhdf.so library is, I assume > it is > > /opt/local/lib. Please try adding the path to hdf_library_dirs in > > setup.py: > > > > - hdf_library_dirs = [] > > + hdf_library_dirs = ['/opt/local/lib'] > > > > (line 25) > > > > Or, if it does not work, please try locate libmfhdf.so. > > > > The current master incorporates both fixes for the include > path and > > MAX_VAR_DIMS. > > > > Regards, > > > > Peter > > > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > > Hello Peter, > > > > > > I have attempted to build both ccplot-master as well as > > ccplot-1.5-rc7, > > > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where > necessary. > > > However, still no luck on the build. > > > > > > Here is the output from my latest try: > > > > > > bash-3.2$ python setup.py build > > > running build > > > running build_py > > > running build_ext > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > building 'ccplot.hdf' extension > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > > -fno-common > > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > -DNDEBUG -g -Os > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > > In file included from ccplot/hdf.c:314: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > warning: > > > unused function '_import_array' [-Wunused-function] > > > _import_array(void) > > > ^ > > > In file included from ccplot/hdf.c:315: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > warning: > > > unused function '_import_umath' [-Wunused-function] > > > _import_umath(void) > > > ^ > > > 2 warnings generated. > > > In file included from ccplot/hdf.c:314: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > > warning: > > > unused function '_import_array' [-Wunused-function] > > > _import_array(void) > > > ^ > > > In file included from ccplot/hdf.c:315: > > > In file included from > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > > warning: > > > unused function '_import_umath' [-Wunused-function] > > > _import_umath(void) > > > ^ > > > 2 warnings generated. > > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch > > x86_64 > > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf > -ljpeg > > -lz -o > > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > > ld: library not found for -lmfhdf > > > clang: error: linker command failed with exit code 1 (use -v > to see > > > invocation) > > > error: command 'clang' failed with exit status 1 > > > > > > Hopefully this is also an easy fix. Best, > > > > > > Ryan > > > > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > Hi Ryan, > > > > > > Thanks for the follow-up. It is nice to hear you find ccplot > > useful. > > > > > > I was afraid there may be more problems. I'm sure other mac > > users will > > > be happy to see this sorted out. > > > > > > The reason is that MAX_VAR_DIMS is only available when HDF4 > > was compiled > > > with netcdf-3 compatibility. It should be easy to fix by > > replacing all > > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > > > Please try an updated version from github: > > > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > > > Regards, > > > > > > Peter > > > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > > Hello Peter, > > > > > > > > I very much appreciate the timely response and your > > willingness to > > > help. > > > > I was happy to see that a new version of ccplot was > > available without > > > > the PyNIO dependency, which has prevented me from using it > > in the > > > past. > > > > ccplot appears to be far superior than what is > possible using > > > Matlab and > > > > NCAR Command Language! > > > > > > > > I have modified line 24 of setup.py to reflect > > '/opt/local/include' as > > > > well, and I no longer receive the error regarding > hntdefs.h. > > > > > > > > Unfortunately, though I'm presented with a new error. To > > give you as > > > > much detail as possible, here's the new issue: > > > > > > > > "bash-3.2$ python setup.py build > > > > running build > > > > running build_py > > > > running build_ext > > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > > building 'ccplot.hdf' extension > > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os > -pipe > > > -fno-common > > > > -fno-strict-aliasing -fwrapv -mno-fused-madd > -DENABLE_DTRACE > > -DMACOSX > > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > > -DNDEBUG -g -Os > > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > > x86_64 > > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe > -I/usr/include/hdf > > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > > -c ccplot/hdf.c -o > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > > clang: warning: argument unused during compilation: > > '-mno-fused-madd' > > > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > > > 'MAX_VAR_DIMS' > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > (unlikely(!__pyx_t_1)) > > > > {__pyx_filename =... > > > > ^ > > > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > > > 'MAX_VAR_DIMS' > > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > > (unlikely(!__pyx_t_1)) > > > > {__pyx_filename =... > > > > ^ > > > > 2 errors generated. > > > > error: command 'clang' failed with exit status 1" > > > > > > > > Perhaps there is an easy fix? > > > > > > > > Best, > > > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > <mailto:pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>>> > > > > <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... > <mailto:pet...@wa...>> <mailto:pet...@wa... > <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>>>> > > > wrote: > > > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > > I have installed all dependencies for ccplot. > However, > > when > > > > attempting to build ccplot before installation, I > > receive the > > > > following error message: > > > > > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file > > not found > > > > > #include "hntdefs.h" > > > > > ^ > > > > > 1 error generated. > > > > > error: command 'clang' failed with exit status 1" > > > > > > > > > > I do, however, have the hdf4 library installed (via > > > MacPorts), the > > > > following > > > > > > > > > > bash-3.2$ locate hntdefs.h > > > > > /opt/local/include/hntdefs.h > > > > > > > > > > shows that I do have this file. Could anyone please > > point me in > > > > the right direction? > > > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > > > Ryan > > > > > > > > Dear Ryan, > > > > > > > > Sorry - I think this is a problem with ccplot rather > > than your > > > > configuration. It assumes that hdf is available > under either > > > > /usr/include/hdf or /usr/local/include/hdf, which > is a valid > > > assumption > > > > on linux, but not on mac. For now, could you > please just add > > > the path to > > > > hdf_include_dirs in setup.py? > > > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > > '/usr/local/include/hdf'] > > > > + hdf_include_dirs = ['/usr/include/hdf', > > > '/usr/local/include/hdf', > > > > '/opt/local/include'] > > > > > > > > (line 24) > > > > > > > > Unfortunately, I don't have access to a mac system for > > testing > > > now, so I > > > > would not find out. Hopefully, darwin will be good > > enough for > > > this. I'll > > > > try to fix these issues soon. > > > > > > > > Thank you very much for reporting the problem. > > > > > > > > Regards, > > > > > > > > Peter > > > > > > > > > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 18:58:35
|
Hi Ryan, dylib is the equivalent of so files on other unix systems. The linker should find the library just fine if it is indeed located under /opt/local/lib/libmfhdf.dylib. I don't know why it does not. The best I can think of is to add a verbose flag to the linker to get a more detailed error report. A patch is attached. It can be applied with: patch < ccplot-verbose-link.diff in the ccplot directory. If you can send me the build output that would be great. Regards, Peter On 11/22/2013 06:47 PM, Ryan Scott wrote: > Hi Peter, > > After receiving the same error with the up-to-date ccplot-master, I > checked /opt/local/lib and I have the following libmfhdf* files > > libmfhdf.0.dylib > libmfhdf.a > libmfhdf.dylib > libmfhdf.la <http://libmfhdf.la> > > The lack of the libmfhdf.so file is presumably then the root of the > error. Do you know where this can be obtained? > > Best, Ryan > > > > On Thu, Nov 21, 2013 at 11:53 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > I think this could be a similar problem as with the include path. The > solution depends on where the libmfhdf.so library is, I assume it is > /opt/local/lib. Please try adding the path to hdf_library_dirs in > setup.py: > > - hdf_library_dirs = [] > + hdf_library_dirs = ['/opt/local/lib'] > > (line 25) > > Or, if it does not work, please try locate libmfhdf.so. > > The current master incorporates both fixes for the include path and > MAX_VAR_DIMS. > > Regards, > > Peter > > On 11/22/2013 01:38 AM, Ryan Scott wrote: > > Hello Peter, > > > > I have attempted to build both ccplot-master as well as > ccplot-1.5-rc7, > > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where necessary. > > However, still no luck on the build. > > > > Here is the output from my latest try: > > > > bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: '-mno-fused-madd' > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > In file included from ccplot/hdf.c:314: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > > warning: > > unused function '_import_array' [-Wunused-function] > > _import_array(void) > > ^ > > In file included from ccplot/hdf.c:315: > > In file included from > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > > > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > > warning: > > unused function '_import_umath' [-Wunused-function] > > _import_umath(void) > > ^ > > 2 warnings generated. > > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch > x86_64 > > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > > -I/Users/ryan/Desktop/src/boost_1_53_0 > > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg > -lz -o > > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > > ld: library not found for -lmfhdf > > clang: error: linker command failed with exit code 1 (use -v to see > > invocation) > > error: command 'clang' failed with exit status 1 > > > > Hopefully this is also an easy fix. Best, > > > > Ryan > > > > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > Hi Ryan, > > > > Thanks for the follow-up. It is nice to hear you find ccplot > useful. > > > > I was afraid there may be more problems. I'm sure other mac > users will > > be happy to see this sorted out. > > > > The reason is that MAX_VAR_DIMS is only available when HDF4 > was compiled > > with netcdf-3 compatibility. It should be easy to fix by > replacing all > > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > > > Please try an updated version from github: > > > > https://github.com/peterkuma/ccplot/archive/master.zip > > > > Regards, > > > > Peter > > > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > > Hello Peter, > > > > > > I very much appreciate the timely response and your > willingness to > > help. > > > I was happy to see that a new version of ccplot was > available without > > > the PyNIO dependency, which has prevented me from using it > in the > > past. > > > ccplot appears to be far superior than what is possible using > > Matlab and > > > NCAR Command Language! > > > > > > I have modified line 24 of setup.py to reflect > '/opt/local/include' as > > > well, and I no longer receive the error regarding hntdefs.h. > > > > > > Unfortunately, though I'm presented with a new error. To > give you as > > > much detail as possible, here's the new issue: > > > > > > "bash-3.2$ python setup.py build > > > running build > > > running build_py > > > running build_ext > > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > > building 'ccplot.hdf' extension > > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > > -fno-common > > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE > -DMACOSX > > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 > -DNDEBUG -g -Os > > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch > x86_64 > > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > > -I/usr/local/include/hdf -I/opt/local/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > > clang: warning: argument unused during compilation: > '-mno-fused-madd' > > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > > 'MAX_VAR_DIMS' > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > (unlikely(!__pyx_t_1)) > > > {__pyx_filename =... > > > ^ > > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > > 'MAX_VAR_DIMS' > > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if > (unlikely(!__pyx_t_1)) > > > {__pyx_filename =... > > > ^ > > > 2 errors generated. > > > error: command 'clang' failed with exit status 1" > > > > > > Perhaps there is an easy fix? > > > > > > Best, > > > > > > -Ryan > > > > > > > > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > > <pet...@wa... <mailto:pet...@wa...> > <mailto:pet...@wa... <mailto:pet...@wa...>> > > > <mailto:pet...@wa... > <mailto:pet...@wa...> <mailto:pet...@wa... > <mailto:pet...@wa...>>>> > > wrote: > > > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > > I have installed all dependencies for ccplot. However, > when > > > attempting to build ccplot before installation, I > receive the > > > following error message: > > > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file > not found > > > > #include "hntdefs.h" > > > > ^ > > > > 1 error generated. > > > > error: command 'clang' failed with exit status 1" > > > > > > > > I do, however, have the hdf4 library installed (via > > MacPorts), the > > > following > > > > > > > > bash-3.2$ locate hntdefs.h > > > > /opt/local/include/hntdefs.h > > > > > > > > shows that I do have this file. Could anyone please > point me in > > > the right direction? > > > > > > > > Any help is very much appreciated. Thanks, > > > > > > > > Ryan > > > > > > Dear Ryan, > > > > > > Sorry - I think this is a problem with ccplot rather > than your > > > configuration. It assumes that hdf is available under either > > > /usr/include/hdf or /usr/local/include/hdf, which is a valid > > assumption > > > on linux, but not on mac. For now, could you please just add > > the path to > > > hdf_include_dirs in setup.py? > > > > > > - hdf_include_dirs = ['/usr/include/hdf', > > '/usr/local/include/hdf'] > > > + hdf_include_dirs = ['/usr/include/hdf', > > '/usr/local/include/hdf', > > > '/opt/local/include'] > > > > > > (line 24) > > > > > > Unfortunately, I don't have access to a mac system for > testing > > now, so I > > > would not find out. Hopefully, darwin will be good > enough for > > this. I'll > > > try to fix these issues soon. > > > > > > Thank you very much for reporting the problem. > > > > > > Regards, > > > > > > Peter > > > > > > > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-22 07:53:21
|
Hi Ryan, I think this could be a similar problem as with the include path. The solution depends on where the libmfhdf.so library is, I assume it is /opt/local/lib. Please try adding the path to hdf_library_dirs in setup.py: - hdf_library_dirs = [] + hdf_library_dirs = ['/opt/local/lib'] (line 25) Or, if it does not work, please try locate libmfhdf.so. The current master incorporates both fixes for the include path and MAX_VAR_DIMS. Regards, Peter On 11/22/2013 01:38 AM, Ryan Scott wrote: > Hello Peter, > > I have attempted to build both ccplot-master as well as ccplot-1.5-rc7, > ensuring that hdf.c everywhere reads H4_MAX_VAR_DIMS where necessary. > However, still no luck on the build. > > Here is the output from my latest try: > > bash-3.2$ python setup.py build > running build > running build_py > running build_ext > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > building 'ccplot.hdf' extension > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > -I/usr/local/include/hdf -I/opt/local/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > clang: warning: argument unused during compilation: '-mno-fused-madd' > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > In file included from ccplot/hdf.c:314: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/arrayobject.h:14: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ndarrayobject.h:26: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__multiarray_api.h:1532:1: > warning: > unused function '_import_array' [-Wunused-function] > _import_array(void) > ^ > In file included from ccplot/hdf.c:315: > In file included from > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/ufuncobject.h:152: > /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/__ufunc_api.h:226:1: > warning: > unused function '_import_umath' [-Wunused-function] > _import_umath(void) > ^ > 2 warnings generated. > clang -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 > -L/Users/ryan/Desktop/src/hdf5-1.8.10/hdf5/lib > -I/Users/ryan/Desktop/src/boost_1_53_0 > build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o -lmfhdf -ldf -ljpeg -lz -o > build/lib.macosx-10.8-intel-2.7/ccplot/hdf.so > ld: library not found for -lmfhdf > clang: error: linker command failed with exit code 1 (use -v to see > invocation) > error: command 'clang' failed with exit status 1 > > Hopefully this is also an easy fix. Best, > > Ryan > > > On Thu, Nov 21, 2013 at 2:10 PM, Peter Kuma <pet...@wa... > <mailto:pet...@wa...>> wrote: > > Hi Ryan, > > Thanks for the follow-up. It is nice to hear you find ccplot useful. > > I was afraid there may be more problems. I'm sure other mac users will > be happy to see this sorted out. > > The reason is that MAX_VAR_DIMS is only available when HDF4 was compiled > with netcdf-3 compatibility. It should be easy to fix by replacing all > occurrences of MAX_VAR_DIMS with H4_MAX_VAR_DIMS. > > Please try an updated version from github: > > https://github.com/peterkuma/ccplot/archive/master.zip > > Regards, > > Peter > > On 11/21/2013 09:37 PM, Ryan Scott wrote: > > Hello Peter, > > > > I very much appreciate the timely response and your willingness to > help. > > I was happy to see that a new version of ccplot was available without > > the PyNIO dependency, which has prevented me from using it in the > past. > > ccplot appears to be far superior than what is possible using > Matlab and > > NCAR Command Language! > > > > I have modified line 24 of setup.py to reflect '/opt/local/include' as > > well, and I no longer receive the error regarding hntdefs.h. > > > > Unfortunately, though I'm presented with a new error. To give you as > > much detail as possible, here's the new issue: > > > > "bash-3.2$ python setup.py build > > running build > > running build_py > > running build_ext > > skipping 'ccplot/hdf.c' Cython extension (up-to-date) > > building 'ccplot.hdf' extension > > clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe > -fno-common > > -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX > > -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os > > -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 > > -I/Users/ryan/Desktop/src/boost_1_53_0 -pipe -I/usr/include/hdf > > -I/usr/local/include/hdf -I/opt/local/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include > > > -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 > > -c ccplot/hdf.c -o build/temp.macosx-10.8-intel-2.7/ccplot/hdf.o > > clang: warning: argument unused during compilation: '-mno-fused-madd' > > ccplot/hdf.c:5266:30: error: use of undeclared identifier > 'MAX_VAR_DIMS' > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if (unlikely(!__pyx_t_1)) > > {__pyx_filename =... > > ^ > > ccplot/hdf.c:7066:30: error: use of undeclared identifier > 'MAX_VAR_DIMS' > > __pyx_t_1 = PyInt_FromLong(MAX_VAR_DIMS); if (unlikely(!__pyx_t_1)) > > {__pyx_filename =... > > ^ > > 2 errors generated. > > error: command 'clang' failed with exit status 1" > > > > Perhaps there is an easy fix? > > > > Best, > > > > -Ryan > > > > > > > > > > > > > > On Thu, Nov 21, 2013 at 12:11 AM, Peter Kuma > <pet...@wa... <mailto:pet...@wa...> > > <mailto:pet...@wa... <mailto:pet...@wa...>>> > wrote: > > > > On 11/21/2013 02:07 AM, ryan scott wrote: > > > I have installed all dependencies for ccplot. However, when > > attempting to build ccplot before installation, I receive the > > following error message: > > > > > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found > > > #include "hntdefs.h" > > > ^ > > > 1 error generated. > > > error: command 'clang' failed with exit status 1" > > > > > > I do, however, have the hdf4 library installed (via > MacPorts), the > > following > > > > > > bash-3.2$ locate hntdefs.h > > > /opt/local/include/hntdefs.h > > > > > > shows that I do have this file. Could anyone please point me in > > the right direction? > > > > > > Any help is very much appreciated. Thanks, > > > > > > Ryan > > > > Dear Ryan, > > > > Sorry - I think this is a problem with ccplot rather than your > > configuration. It assumes that hdf is available under either > > /usr/include/hdf or /usr/local/include/hdf, which is a valid > assumption > > on linux, but not on mac. For now, could you please just add > the path to > > hdf_include_dirs in setup.py? > > > > - hdf_include_dirs = ['/usr/include/hdf', > '/usr/local/include/hdf'] > > + hdf_include_dirs = ['/usr/include/hdf', > '/usr/local/include/hdf', > > '/opt/local/include'] > > > > (line 24) > > > > Unfortunately, I don't have access to a mac system for testing > now, so I > > would not find out. Hopefully, darwin will be good enough for > this. I'll > > try to fix these issues soon. > > > > Thank you very much for reporting the problem. > > > > Regards, > > > > Peter > > > > > > |
From: Peter K. <pet...@wa...> - 2013-11-21 08:11:24
|
On 11/21/2013 02:07 AM, ryan scott wrote: > I have installed all dependencies for ccplot. However, when attempting to build ccplot before installation, I receive the following error message: > > "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found > #include "hntdefs.h" > ^ > 1 error generated. > error: command 'clang' failed with exit status 1" > > I do, however, have the hdf4 library installed (via MacPorts), the following > > bash-3.2$ locate hntdefs.h > /opt/local/include/hntdefs.h > > shows that I do have this file. Could anyone please point me in the right direction? > > Any help is very much appreciated. Thanks, > > Ryan Dear Ryan, Sorry - I think this is a problem with ccplot rather than your configuration. It assumes that hdf is available under either /usr/include/hdf or /usr/local/include/hdf, which is a valid assumption on linux, but not on mac. For now, could you please just add the path to hdf_include_dirs in setup.py? - hdf_include_dirs = ['/usr/include/hdf', '/usr/local/include/hdf'] + hdf_include_dirs = ['/usr/include/hdf', '/usr/local/include/hdf', '/opt/local/include'] (line 24) Unfortunately, I don't have access to a mac system for testing now, so I would not find out. Hopefully, darwin will be good enough for this. I'll try to fix these issues soon. Thank you very much for reporting the problem. Regards, Peter |
From: ryan s. <rsc...@gm...> - 2013-11-21 01:08:00
|
I have installed all dependencies for ccplot. However, when attempting to build ccplot before installation, I receive the following error message: "ccplot/hdf.c:317:10: fatal error: 'hntdefs.h' file not found #include "hntdefs.h" ^ 1 error generated. error: command 'clang' failed with exit status 1" I do, however, have the hdf4 library installed (via MacPorts), the following bash-3.2$ locate hntdefs.h /opt/local/include/hntdefs.h shows that I do have this file. Could anyone please point me in the right direction? Any help is very much appreciated. Thanks, Ryan |
From: Peter K. <pet...@wa...> - 2013-11-18 16:24:43
|
Dear All, I am writing to let you know that ccplot is now available on Windows. It has not undergone much testing - as such, you might encounter problems with installation or running. In that case, please do let me know. It is available from the ccplot.org website (ccplot-1.5-rc6.win32-py2.7.exe): http://ccplot.org You may need to refresh the page to see it. It is a 32-bit build, but it should work on 64-bit systems as well. Make sure you have a matching Python version (2.7). Please follow the instructions under Getting Started. You will need to install the Python(x,y) distribution with additional modules. Peter |
From: Peter K. <pet...@wa...> - 2013-11-15 20:13:52
|
On 11/15/2013 08:47 PM, farzaneh SHAFIEE wrote: > Can I program cc L install on myWindows > Or should I install Linux? > If you're a Windows > Brush tips do i have? > > My operating system is Windows Dear Farzaneh, ccplot works best on Linux, but it should in theory be possible to run it on Windows. The older version (1.4.x) depends on PyNIO, which is not supported on Windows. However, ccplot 1.5 dropped the dependency on PyNIO, and all other dependencies have Windows builds available. ccplot itself has an external module that needs to be compiled - this could be a bit difficult. I have never actually tried installing it Windows, but I have always wanted to do it, so I think I will give it a try now that you asked. I can't guarantee it will be ported soon, though. You might want to install Linux instead of waiting. I recommend ccplot 1.5 over 1.4, which has some issues with newer Linux distributions. Regards, Peter |
From: farzaneh S. <kim...@ya...> - 2013-11-15 19:49:18
|
Can I program cc L install on my Windows Or should I install Linux? If you're a Windows Brush tips do i have? My operating system is Windows |
From: Peter K. <pet...@wa...> - 2013-06-04 21:05:35
|
On 06/04/2013 10:23 PM, Érico Leiva wrote: > Hi > > I have a computer with OpenSuse OS, python 2.7, gcc 4.6.2. > > Which version pre-compilated for pynio you suggest-me? > > Thanks > > Érico Hi Érico, For OpenSuse I'm not really sure, but there are not many choices - either one built on Debian or RedHat. The problem could be with shared libraries in both cases. The most important thing to match is the architecture and python (major) version. Hence, if your OS is 64-bit, then try: PyNIO-1.4.1.linux-debian-x86_64-gcc445-py271-numpy160.tar.gz (*) PyNIO-1.4.1.linux-redhat-x86_64-gcc412-py271-numpy160-nodap.tar.gz and if it is 32-bit, then try: PyNIO-1.4.1.linux-debian-i686-gcc445-py271-numpy160-nodap.tar.gz PyNIO-1.4.1.linux-redhat-i686-gcc412-py271-numpy160-nodap.tar.gz (*) This one is only available as "with dap" build, and not currently on ccplot.org. But it is at earthsystemgrid.org, and I made a copy here: http://ccplot.org/pub/pynio/PyNIO-1.4.1.linux-debian-x86_64-gcc445-py271-numpy160.tar.gz If neither works for you, you can still ask at pyn...@uc..., http://www.pyngl.ucar.edu/User_forum/. An easy option is to use the development version of ccplot, which no longer depends on PyNIO. You can find it on github https://github.com/peterkuma/ccplot However, you may encounter some bugs as it has not been well tested yet. Regards, Peter |
From: Érico L. <eri...@gm...> - 2013-06-04 20:24:04
|
Hi I have a computer with OpenSuse OS, python 2.7, gcc 4.6.2. Which version pre-compilated for pynio you suggest-me? Thanks Érico |
From: Peter K. <pet...@wa...> - 2013-05-28 19:04:36
|
On 05/27/2013 05:19 AM, yinjinfang88 wrote: [...] > I have a another question. There is a variable named cloud_mask > in CloudSat data, which demonstrates the reliability of the Rader > reflectivity. I want to get rid of the Rader reflectivity when the value > of cloud_mask is less than 20. However, I don't know where I can add > some condition select and judgement sentences in ccplot. Could you > please show me a example? Hi Yin, That should go somewhere below: 1408 np.place(data, data == -88.88, float("nan")) Reading the dataset would go under: 1307 try: # Try CloudSat names. A command-line flag would be nice. E.g. -f filter, where filter is none or cloudmask=n, and n is integer specifying low threshold of CPR Cloud Mask. Patch attached. Do let me know if you spot any bugs in it. The feature is documented in the man page. Regards, Peter |
From: Peter K. <pet...@wa...> - 2013-05-28 17:41:21
|
Hi Yin, If it does not cause any problems, then I believe it is not necessary. The code is mostly type agnostic, with the exception of certain arguments to functions implemented in C (layermap & interpolate2d). The arguments specifying extent in interpolate2d are parsed by PyArg_ParseTuple, which does the conversion from double to float without complaining. It is silently reducing precision, but this should not be a problem (as the precision in products is 32-bit anyway). ccplot is in need of more attention. In the next version 1.5, PyNIO is to be ditched in favour of a cython module interfacing directly with libhdf and libhdfeos. The benefit is that all other dependencies are easily installed and available on windows. I'm currently working on a set of unit tests, as there are many different use cases, and any slightly more extensive changes to the source code are likely to break some of them. Regards, Peter On 05/28/2013 03:56 PM, yinjinfang88 wrote: > Hi Peter, > Thank you very much for your help. It works now. However, there > is a different data type of ve1 and ve2. > ccplot -x 500..1000 -c cloudsat-reflectivity.cmap -o cloudsat-reflec.png cloudsat-reflec 2009037050924_14779_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > print(ve1.dtype) ----> int16 > print(ve2.dtype) ----> int16 > > If the hight is limited by the parameter "-y 0..10000'', the data type > of vel and ve2 becomes as float64. > ccplot -x 500..1000 -y 0..10000 -c cloudsat-reflectivity.cmap -o cloudsat-reflec.png cloudsat-reflec 2009037050924_14779_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > > print(ve1.dtype) ----> float64 > print(ve2.dtype) ----> float64 > > As mentioned above, the data type of vel and ve2 changes with > the ccplot command with different parameters. Can we fix the data type > of vel and ve2 at the beginning of the ccplot file. > > Yin > > > ------------------------------------------------------------------------ > yinjinfang88 > > *From:* Peter Kuma <mailto:pet...@wa...> > *Date:* 2013-05-28 04:29 > *To:* yinjinfang88 <mailto:yin...@16...> > *CC:* ccplot-general <mailto:ccp...@li...> > *Subject:* Re: ccplot errors > Hi Yin, > > Thank you for doing additional testing. That is a rather perplexing bug. > It is actually caused by a change in behaviour between numpy 1.6.2 and > 1.7.1. > > python > Python 2.7.3 (default, Jan 2 2013, 13:56:14) > [GCC 4.7.2] on linux2 >>>> import numpy as np >>>> np.__version__ > '1.6.2' >>>> x, y = np.meshgrid(np.arange(0, 2, dtype=np.int16), np.arange(3, 5, > dtype=np.float32)) >>>> print x.dtype, y.dtype > int16 float32 > > vs. > > python > Python 2.7.3 (default, Jan 2 2013, 13:56:14) > [GCC 4.7.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import numpy as np >>>> np.__version__ > '1.7.1' >>>> x, y = np.meshgrid(np.arange(0, 2, dtype=np.int16), np.arange(3, 5, > dtype=np.float32)) >>>> print x.dtype, y.dtype > int64 float64 > > The newer version does upcasting to 64 bits. I'm not sure if this is the > intended behaviour, perhaps a bug report should be filed against numpy. > > In any case, this can be worked around by casting X, Y explicitly. I > think your fix is essentially good, although I'd prefer casting with > astype, as it creates contiguous arrays. > > Attached is a patch. Please let me know if it works for you. > > You are most welcome to modify the source code of ccplot, it is open > source software, it makes me happy to see contributions and bug reports > from other people. > > I'll answer your other question about cloud mask soon. > > Btw. there is a new program in the making that is supposed to complement > ccplot in browsing larger amount of granules. It is a web app, with > server-side importing of granules. > > https://github.com/peterkuma/ccbrowse > browse.ccplot.org (demo example, please open in recent firefox or chrome) > > Support for CloudSat is kind of secondary at the moment, as it requires > CALIPSO granule to be imported first, so that relative time shift can be > calculated correctly. It can be installed and used locally as well. > > Regards, > > Peter |
From: Peter K. <pet...@wa...> - 2013-05-27 20:30:06
|
Hi Yin, Thank you for doing additional testing. That is a rather perplexing bug. It is actually caused by a change in behaviour between numpy 1.6.2 and 1.7.1. python Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2] on linux2 >>> import numpy as np >>> np.__version__ '1.6.2' >>> x, y = np.meshgrid(np.arange(0, 2, dtype=np.int16), np.arange(3, 5, dtype=np.float32)) >>> print x.dtype, y.dtype int16 float32 vs. python Python 2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> np.__version__ '1.7.1' >>> x, y = np.meshgrid(np.arange(0, 2, dtype=np.int16), np.arange(3, 5, dtype=np.float32)) >>> print x.dtype, y.dtype int64 float64 The newer version does upcasting to 64 bits. I'm not sure if this is the intended behaviour, perhaps a bug report should be filed against numpy. In any case, this can be worked around by casting X, Y explicitly. I think your fix is essentially good, although I'd prefer casting with astype, as it creates contiguous arrays. Attached is a patch. Please let me know if it works for you. You are most welcome to modify the source code of ccplot, it is open source software, it makes me happy to see contributions and bug reports from other people. I'll answer your other question about cloud mask soon. Btw. there is a new program in the making that is supposed to complement ccplot in browsing larger amount of granules. It is a web app, with server-side importing of granules. https://github.com/peterkuma/ccbrowse browse.ccplot.org (demo example, please open in recent firefox or chrome) Support for CloudSat is kind of secondary at the moment, as it requires CALIPSO granule to be imported first, so that relative time shift can be calculated correctly. It can be installed and used locally as well. Regards, Peter On 05/27/2013 05:19 AM, yinjinfang88 wrote: > Hi Peter, > Thanks very much for your fast reply. The CloudSat data (granule > number 14779) is 2009037050924_14779_CS_2B-GEOPROF_GRANULE_P_R04_E02.hdf > , which is a example data for ccplot. > You can download it at the web site > http://sourceforge.net/projects/ccplot/files/products/. I printed the > data type of the variables of data, X, Y, ve1, ve2, resolution, and > radius. There are shown as > print(data.dtype) ----> float32 > print(X.dtype) ----> float64 > print(Y.dtype) ----> int16 > print(ve1.dtype) ----> int16 > print(ve2.dtype) ----> int16. > It can be seen that the error message resulted from the data type of > variable X. I tried to add two key words of sparse=False, copy=False for > np.meshgrid function at lines 1498 and 1501, respectively. > Then the data type of variable X is shown as float32. Although the > ccplot works now, I don't know whether it is right or not. Because I > am a newer of Python. > > I have a another question. There is a variable named cloud_mask > in CloudSat data, which demonstrates the reliability of the Rader > reflectivity. I want to get rid of the Rader reflectivity when the value > of cloud_mask is less than 20. However, I don't know where I can add > some condition select and judgement sentences in ccplot. Could you > please show me a example? > > It is impolite to modify your source codes without any permission. I ask > for your forgiveness. > > Thanks again. > > Yin > > > ------------------------------------------------------------------------ > yinjinfang88 > > *From:* Peter Kuma <mailto:pet...@wa...> > *Date:* 2013-05-27 02:53 > *To:* yinjinfang88 <mailto:yin...@16...> > *CC:* ccplot-general <mailto:ccp...@li...> > *Subject:* Re: ccplot errors > On 05/26/2013 01:31 PM, yinjinfang88 wrote: >> Dear all, >> I run ccplot for visualising CloudSat data. However, I got a >> error at line 1504 in ccplot file. That is: >> data = cctk.interpolate2d(data, X, Y, (0, e2-e1, e2-e1), >> (ve1, ve2, resolution), float("nan"), 0, radius) >> and the error message is as follows: >> >> Traceback (most recent call last): >> File "/usr/local/bin/ccplot", line 2265, in <module> >> main(sys.argv) >> File "/usr/local/bin/ccplot", line 2183, in main >> opts=opts.plot_opts) >> File "/usr/local/bin/ccplot", line 1505, in plot_profile >> (ve1, ve2, resolution), float("nan"), 0, radius) >> TypeError: Cannot cast array data from dtype('float64') to dtype('float32') according to the rule 'safe' >> >> Did something wrong? >> Thinks! >> >> Yin > > Dear Yin, > > Thank you very much for the report. This is a bug in ccplot. Could you > please let me know what CloudSat granule it was and the command you > used? It'll be helpful in pinpointing and fixing the problem. > > Regards, > > Peter |
From: Peter K. <pet...@wa...> - 2013-05-26 19:10:09
|
On 05/26/2013 01:31 PM, yinjinfang88 wrote: > Dear all, > I run ccplot for visualising CloudSat data. However, I got a > error at line 1504 in ccplot file. That is: > data = cctk.interpolate2d(data, X, Y, (0, e2-e1, e2-e1), > (ve1, ve2, resolution), float("nan"), 0, radius) > and the error message is as follows: > > Traceback (most recent call last): > File "/usr/local/bin/ccplot", line 2265, in <module> > main(sys.argv) > File "/usr/local/bin/ccplot", line 2183, in main > opts=opts.plot_opts) > File "/usr/local/bin/ccplot", line 1505, in plot_profile > (ve1, ve2, resolution), float("nan"), 0, radius) > TypeError: Cannot cast array data from dtype('float64') to dtype('float32') according to the rule 'safe' > > Did something wrong? > Thinks! > > Yin Dear Yin, Thank you very much for the report. This is a bug in ccplot. Could you please let me know what CloudSat granule it was and the command you used? It'll be helpful in pinpointing and fixing the problem. Regards, Peter |
From: yinjinfang88 <yin...@16...> - 2013-05-26 11:31:58
|
Dear all, I run ccplot for visualising CloudSat data. However, I got a error at line 1504 in ccplot file. That is: data = cctk.interpolate2d(data, X, Y, (0, e2-e1, e2-e1), (ve1, ve2, resolution), float("nan"), 0, radius) and the error message is as follows: Traceback (most recent call last): File "/usr/local/bin/ccplot", line 2265, in <module> main(sys.argv) File "/usr/local/bin/ccplot", line 2183, in main opts=opts.plot_opts) File "/usr/local/bin/ccplot", line 1505, in plot_profile (ve1, ve2, resolution), float("nan"), 0, radius) TypeError: Cannot cast array data from dtype('float64') to dtype('float32') according to the rule 'safe' Did something wrong? Thinks! Yin |