compiling gsvd

Added by Sven Borgstrom over 7 years ago

Hi Piyush and Mark,

I'm trying to set up GIAnT on my iMac (Mac OS X 10.8).

Compilation of "gsvd" seems to be ok after giving the command "CC=gcc-mp-4.5 python setup.py build_ext --fcompiler=gnu95" (as suggested by the manual) as I get installed the "gensvd.so" file into the "gsvd" folder, besides the "build" folder in GIAnT.

Anyway, if I run the "test" file (python test.py) I get an "ImportError" message (see the attached file).

Seems to be a missed link, but I don't understand how to fix this.

Could you please help me?
Cheers,
Sven.

I've regularly installed GIAnT on my my MacBook (Mac OS X 10.7) and everything works out of the box ;-)


Replies (8)

RE: compiling gsvd - Added by Piyush Agram over 7 years ago

It looks like it wasn't linked correctly against lapack. Could you post the output of "ldd gensvd.so" ? If you compiled it against a custom (non-standard) installation of lapack / blas, make sure that the directory with these libraries are included in the environment variable LD_LIBRARY_PATH.

Piyush

RE: compiling gsvd - Added by Sven Borgstrom over 7 years ago

Hi Piyush,

I gave the "otool -L" command on "gensvd.so": the output is in the attached file.

Anyway I inserted both "/opt/local/lib/gcc45" and "/usr/lib" into the LD_LIBRARY_PATH on ".profile", downloaded again GIAnT, recompiled again everything, but I get still the same error running the test (python test.py).

I noticed also some differences in the attached file between "compatibility version" and "current version" in "/usr/lib".

Hope this is sufficient to fix the problem ;-)

Cheers,
Sven.

RE: compiling gsvd - Added by Piyush Agram over 7 years ago

Hi Sven,
here is the equivalent output on my system. I have gcc46 but that should make no difference.

/opt/local/lib/gcc46/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
/opt/local/lib/gcc46/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/gcc46/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)

Did you run "sudo port select gcc mp-gcc45" and "sudo port select python python27" before compiling? It may be that the wrong version of the python is being used to execute the test. I would also recommend deleting the "build" directory between every compilation attempt.

Piyush

RE: compiling gsvd - Added by Sven Borgstrom over 7 years ago

Hi Piyush,
my gsvd compilation still fails after these steps:
- check on mp-gcc45 (set to "active")
- check on python27 (set to "active")
- deleted the whole "giant" folder (not only the "build" dir)
- reinstalled everything with "python setup.py build_ext"
After this, if I go into the ../solver/gsvd dir and give the command "python test.py" I get always the same error message (see my first post).
Anyway, if I give the "otool -L gensvd.so" command I don't find the "libquadmath.0.dylib" line, compared with your output (obviously this not installed into /opt/local/lib/gcc45).
Could be this the problem? How and where can I get it? Via MacPorts? I followed exactly the Giant installation guide for everything...
Thanks in advance and sorry for disturbing you again.
Sven.

RE: compiling gsvd - Added by Piyush Agram over 7 years ago

Hi Sven,

did you have any trouble running the numpy and scipy test suites?

>> import numpy
>> numpy.test()

>>import scipy
>> scipy.test('full')

RE: compiling gsvd - Added by Sven Borgstrom over 7 years ago

Hi Piyush,
that seems to be the problem, I mean the "scipy.test('full')": I get a lot of warnings (bla bla ... Missing compiler_cxx fix for UnixCCompiler) and a lot of files are generated, so I have to stop the shell.
I have "clang" in /usr/bin: something wrong with that?
No problem at all with numpy.
Sven.

RE: compiling gsvd - Added by Piyush Agram over 7 years ago

Hi Sven,
it might be that scipy was installed with a different set of compiler options compared to numpy. If you built numpy using "numpy + gcc 45 + atlas" port options, I recommend using the same port options for scipy as well. If then dont match up, there could be conflicts between gcc and clang(default). It is fine if you dont choose atlas but the same compilers need to be specified.

Piyush

RE: compiling gsvd - Added by Sven Borgstrom over 7 years ago

Hi Piyush,

now I got it: I had two scipy folders, so I removed one, leaving the one from MacPorts.
Thanks again for your support.

I'll be back to you soon, as I'm now generating TSX interferograms and afterwards I want to try to generate a SBAS time-series.

Cheers,
Sven.

(1-8/8)