Hello all,
I have just performed a (global) installation of openMPS (v3.1) on macOS. Everything ran apparently smoothly, but when I tested
python3 Examples/01_IsingStatics.py --PostProcess=False && \
python3 Examples/01_IsingStatics.py --PostProcess=True
I got
Execute_MPSMain TMP_01/Ising_Staticsg_0.0Main.nml 0
/bin/sh: Execute_MPSMain: command not found
Traceback (most recent call last):
File "Examples/01_IsingStatics.py", line 118, in <module>
main(PostProcess=Post, ShowPlots=Plot)
File "Examples/01_IsingStatics.py", line 77, in main
mps.runMPS(MainFiles, RunDir=RunDir)
File "/usr/local/lib/python3.7/site-packages/MPSPyLib/tools.py", line 398, in runMPS
raise MPSFortLibError(ret_val)
MPSPyLib.tools.MPSFortLibError: MPSFortLib quit with fatal return code 127!</module>
which I know is a common error that I solved (on Linux) by removing the ./ from the RunDir = './' line in the codes. Here, however, that did not work. I have installed openblas, lapack and openmpi with brew install instead, which is not exactly the same as given here
https://sourceforge.net/p/openmps/wiki/OpenMPS%20from%20Source/
but that does not seem to be the problem. All other dependencies were installed with pip3 as recommended.
Any thoughts?
Best wishes,
Rafael
Hey Rafael,
Error code 127 typically indicates the compiled executable could not be found or is not executable. In the most recent changes to OpenMPS, we added logical blocks as follows (for some context)
If the MPS executable is not found in the current working directory, we override
RunDir
toNone
, forcing OpenMPS to assume a global installation.To the issue you're having, can you send me the logs from your compilation/installation? They should be in the OpenMPS root directory, a file called
make.log
. I'm attaching a sample log so that you know what to look for.V/R
MJ
Hi Matthew,
Thanks for the reply. I am not specifying any type of local installation. The make.log file is attached.
Best wishes,
Rafael
Thanks, Rafael! It looks like ARPACK wasn't found. Do you have it installed?
If so, simply update the install command to add the library path for ARPACK marked by
***
below.Last edit: Matthew Jones 2020-02-04
Hi Matthew,
Thanks for the reply. I have arpack 3.7.0_3 installed already.
Then I ran
sudo python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin
--option=FC:x86_64-conda_cos6-linux-gnu-gfortran
--option=INCFLAGS:-I$CONDA_PREFIX/include
--option=LIBFLAGS:"-L$CONDA_PREFIX/lib -L/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/linalg/eigen/arpack"
but I still got errors (see the make.log file attached).
Any ideas?
Rafael
I think I've found the problem. Can you run a quick command in terminal? See below. Each should be run as a separate command, and the output should be pasted in a reply.
which python
python --version
... note: this should be Python version 3+. Python version 2 is formally deprecated. If you need help updating your version of Python, let me know in your reply, and I'll post some options.which gfortran
... note: if GNU is not supplying the Fortran compiler, please change "gfortran" to the Fortran compiler you intend to use.ls -la /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy/sparse/linalg/eigen/arpack
What package manager are you using to acquire dependencies? Is it just
pip
?A note about the command I sent before: this was not clear, but the paths for the various options need to be updated on your system. The command before assumed you were using Anaconda to acquire pacakges. I'll improve the clarity on the Wiki, and break out more sections.
Hi Matthew,
Thanks for the reply. I have installed the dependencies with brew, I believe.
In regard to the commands:
But python3 is installed
total 760
drwxr-xr-x 10 root wheel 320 Jan 31 20:34 .
drwxr-xr-x 8 root wheel 256 Feb 23 2019 ..
-rw-r--r-- 1 root wheel 628 Jun 19 2013 init.py
-rw-r--r-- 1 root wheel 923 Feb 23 2019 init.pyc
-rwxr-xr-x 1 root wheel 817488 Jan 24 10:12 _arpack.so
-rw-r--r-- 1 root wheel 65913 Aug 21 2013 arpack.py
-rw-r--r-- 1 root wheel 54353 Feb 23 2019 arpack.pyc
-rw-r--r-- 1 root wheel 1965 Aug 21 2013 setup.py
-rw-r--r-- 1 root wheel 1899 Feb 23 2019 setup.pyc
drwxr-xr-x 3 root wheel 96 Feb 23 2019 tests
Best regards,
Rafael
Hi Rafael,
Bumping this thread.
I've updated the conda environment preparation scripts to support macOS.
Would you mind running through the new instructions, and letting me know if they address your problem?
Instructions link.
V/R
Matt
Hi Matthew,
Thanks for the update.
I managed to create the conda environment and run
python setup.py install
without apparent problems, but when running
python BuildOSMPS.py --prefix=/Users/rafaeleb/anaconda3/bin
I get the following error:
Fatal Error: Can't open module file 'ieee_arithmetic.mod' for reading at (1): No such file or directory
make[1]: [/Users/rafaeleb/Documents/openmps/MPSFortLib/Mods/Tensors.o] Error 1
make: [moddir_obj] Error 2
mv MPSFortLib/make.log .
Hi Rafael,
Please try the following (from
OPENMPS_ROOT
):If this does not work, please send me the
make.log
and the exact command sequence you're using to compile the project.V/R
Matthew J
Hello Matthew,
I run
conda activate openmps
rm -rf build && python BuildOSMPS.py --clean
python setup.py install
and it works fine up to here. For
python BuildOSMPS.py --prefix=/Users/rafaeleb/anaconda3/bin
I still get an error (Fatal Error: Can't open module file 'ieee_arithmetic.mod' for reading at (1): No such file or directory make[1]). See the log attached.
Rafael
It doesn't look like you've run the build command I sent above.
The additional options are necessary as they tell Fortran where to look for certain libraries.
The error you're getting is telling you that the Fortran compiler cannot find a system-installed module.
Can you try running the command I sent, and report back?
Last edit: Matthew Jones 2020-05-12
Hi Rafael,
Did we get this problem fixed?
I went through your logs again, and noted that the issue is the fortran compiler (it's too old).
Let us know how we can help,
Matt