Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fortran Runtime Error #223

Open
Berfin9704 opened this issue Nov 10, 2022 · 4 comments
Open

Fortran Runtime Error #223

Berfin9704 opened this issue Nov 10, 2022 · 4 comments

Comments

@Berfin9704
Copy link

Hi. I'm trying to use PyMultinest through petitRADTRANS by Paul Mollière (Mollière et al., A&A, 627, A67, 2019). However, I face an error message saying "Fortran runtime error: Unexpeccted element 'i' in format (a,i4)" at line 222 of Multinest/src/nested.F90 file. I use Ubuntu 20.04. This error occurs either using the shell or a conda environment. I'd be glad if you could help me. Thank you!

@JohannesBuchner
Copy link
Owner

show the full output of make VERBOSE=1 and which Fortran compiler + version used. Maybe you can switch the compiler?

@Berfin9704
Copy link
Author

Before I got to the "make VERBOSE=1" step, I noticed that I got an error message saying "Could NOT find MPI_Fortran (missing: MPI_Fortran_WORKS)". I tried to find it by find_package(MPI) and "cmake .. -DCMAKE_PREFIX_PATH=/home/berfin7miniconda3/envs/exoplanet/bin/mpiexec" but both failed. So cmake built only the non-MPI Multinest libraries. Is it be the problem?

Also, I set the compiler as gfortran.

@JohannesBuchner
Copy link
Owner

Try cleaning completely the build directory (see instructions file there) and rebuild with cmake and make. you may have conflicting fortran versions.
I think CMAKE_PREFIX_PATH is not the right parameter for the fortran compiler. https://mixable.blog/how-to-set-c-c-or-fortran-compiler-for-cmake/

@Berfin9704
Copy link
Author

I tried "SET(CMAKE_FC_COMPILER /usr/bin/gfortran)", but it didn't work. During "cmake .." process, it finds libmpi.so for MPI_C and libmpicxx.so for MPI_CXX. However, it can't find libmpifort.so for MPI_Fortran for some reason. It exists on the same path with libmpi.so and libmpicxx.so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants