SWIFTSIM / SWIFT

Modern astrophysics and cosmology particle-based code. Mirror of gitlab developments at https://gitlab.cosma.dur.ac.uk/swift/swiftsim
http://www.swiftsim.com
GNU Lesser General Public License v3.0
88 stars 58 forks source link

Issue configuring SWIFT. #47

Closed J0nl15a closed 4 months ago

J0nl15a commented 6 months ago

I'm trying to compile a specific version of SWIFT on a remote server and keep encountering the same error (condensed message):

...
checking for ANSI C header files... (cached) yes
checking for sqrt in -lm... no
configure: error: something is wrong with the math library!

I do not have HEALPix installed so I don't initialise it in the configuration. I also don't have the 'parmetis' library, only 'metis'. I have linked here the config.log file for convenience.

config.log

mladenivkovic commented 6 months ago

It looks like a compiler mismatch. autoconf detects icpc, but the mpi wrapper uses g++. As a result, the wrong compiler flags get passed to mpicc. Looks like a mismatch on your system.

It could help to specifiy the exact compiler you want to use. E.g. using

$ CC=/path/to/your/compiler  ./confiugre --your-flags --your-other-flags
MatthieuSchaller commented 6 months ago

Is there maybe a gcc module loaded somewhere lurking in the background?

pwdraper commented 6 months ago

Thanks, it looks to me that the mpicc command is using gcc instead of icc on your setup. Try:

export I_MPI_CC=icc

that should force the mpicc to use icc. The command mpicc -show should confirm this is working.