Closed ghost closed 3 years ago
Hi,
I've typically seen this occur while using python2. Do you have both python versions (2 and 3) installed on your computer?
One way to force it to use python3 might be to explicitly set f2pyexec = f2py3. Can you set that in the magic.cfg
, remove the *.so
files and try again?
Hi, thank you for the reply. It doesn't even look like the .so files are created. They are supposed to be in $MAGIC_HOME/python/magic correct?
I see. It's the compiler then. Could you send the following information?
magic.cfg
?Local computer, CC=gcc, FC=gfortran, CXX=mpicxx magic.cfg:
[plots] Adapt your backend to your machine: 'TkAgg', 'GTKAgg', 'Qt4Agg', ... backend = TkAgg In case you don't have LaTeX installed switch to False labTex = False Default colormap defaultCm = seismic Default number of levels defaultLevels = 65 [libraries] adapt this value if you don't want libraries buildLib = True f2py executable, can be f2py, f2py2 or f2py3 (python 3) f2pyexec = f2py3 fortran compiler: f2py -c --help-fcompiler, frequently 'intelem' or 'gnu95' fcompiler = gfortran c compiler: f2py -c --help-compiler No need to touch this one except on gwdg, change it to intelem ccompiler = gcc ~
You need to set fcompiler=gnu95
and leave the ccompiler
to the default value of unix
.
Edit: These should get set automatically if you source the sourceme.sh script: source /path/to/magic/sourceme.sh
Ah, that worked! Thought I had already tried gnu95 as my fortran compiler but apparently not. Thank you!
With build_lib set to true, from magic import * fails. Specifically, it has trouble import magic.legendre as leg which leads me to believe that the fortran libraries are not importing correctly. Any help would be greatly appreciated! Traceback:
Please wait: building greader_single... Please wait: building greader_double... Please wait: building lmrreader_single... Please wait: building Legendre transforms... Please wait: building vtklib...
ModuleNotFoundError Traceback (most recent call last)