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

Compilation of MultiNest fails #201

Open
AWehrhahn opened this issue Dec 10, 2021 · 6 comments
Open

Compilation of MultiNest fails #201

AWehrhahn opened this issue Dec 10, 2021 · 6 comments

Comments

@AWehrhahn
Copy link

Hi,
I tried to compile the MultiNest library following the instructions here: https://johannesbuchner.github.io/PyMultiNest/install.html

However make fails with the error message:
f951: Fatal Error: Reading module ‘xmeans_clstr’ at line 1826 column 4: Unexpected EOF compilation terminated.

System: Ubuntu 20.04

Complete Output:
cmake:

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for Fortran dgemm
-- Looking for Fortran dgemm - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libf77blas.so;/usr/lib/x86_64-linux-gnu/libatlas.so  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - not found
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- A library with LAPACK API found.
-- Detected gfortran, adding -ffree-line-length-none compiler flag.
-- Found MPI_C: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so (found version "3.1") 
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1") 
-- Found MPI_Fortran: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_usempif08.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Configuring done
-- Generating done

make:

[  1%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/utils.f90.o
[  2%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/utils1.f90.o
[  4%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/kmeans_clstr.f90.o
[  5%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/xmeans_clstr.f90.o
[  7%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/posterior.F90.o
f951: Fatal Error: Reading module ‘xmeans_clstr’ at line 1826 column 4: Unexpected EOF
compilation terminated.
make[2]: *** [src/CMakeFiles/multinest_mpi_shared.dir/build.make:102: src/CMakeFiles/multinest_mpi_shared.dir/posterior.F90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:120: src/CMakeFiles/multinest_mpi_shared.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@JohannesBuchner
Copy link
Owner

Delete the entire folder and download MultiNest again.

@AWehrhahn
Copy link
Author

I got the files fresh from github, with git clone, still the same problem.

@JohannesBuchner
Copy link
Owner

There should be more output? For some reason xmeans_clstr is damaged? It's always good to clean the entire build/ folder including cmake cache files, whenever something changed.

You can also try telling cmake to use gfortran instead of f95.

@AWehrhahn
Copy link
Author

This is all the output I get.
I tried manually specifying gfortran, it gives the same error.

@JohannesBuchner
Copy link
Owner

so what is happening in xmeans_clstr at line 1826?

@AWehrhahn
Copy link
Author

AWehrhahn commented Feb 15, 2022

It is an empty line in xmeans_clstr.f90
Although the line doesn't change even if I remove the empty lines here. So I assume it refers to something else.

        !work variables
      	integer i
  	
      !<- This is line 1826
      	!total no. of points in the cluster
      	cwt=sum(wt(1:n))
      
      	if(calcMu) then
      		mean=0.d0
      		do i=1,n

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