Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Compiler issues (Intel compiler, mpicc, etc.), data libraries and everything needed to get Serpent running is discussed here
Post Reply
Tunisha Gupta
Posts: 6
Joined: Thu Jun 04, 2020 1:56 pm
Security question 1: No
Security question 2: 7

Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Tunisha Gupta » Sat Jun 06, 2020 1:46 pm

Hello all ,
I have been struggling with the compilation and installation of Serpent2 . Can someone please help me (step by step)?
the gcc version is 9.3.0
here is the error I got:

Thanking you.
Tunisha
Screenshot 2020-06-06 at 3.45.42 PM.png
Screenshot 2020-06-06 at 3.45.42 PM.png (28.57 KiB) Viewed 544 times

Ville Valtavirta
Posts: 457
Joined: Fri Sep 07, 2012 1:43 pm
Security question 1: No
Security question 2: 92

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Ville Valtavirta » Mon Jun 08, 2020 9:56 am

Hi,

I'm not an expert on macOS, but it seems that since your error is coming from the "clang" compiler, you are not actually using gcc 9.3.0 to compile Serpent.

You can try changing the

CC = gcc

line in Serpent's Makefile to

CC = <path-to-your-gcc-9.3.0-compiler>

where you set the direct path to the correct gcc 9.3.0 compiler.

Quick googling showed this: https://stackoverflow.com/questions/362 ... an-buildin

-Ville

Ana Jambrina
Posts: 87
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Ana Jambrina » Mon Jun 08, 2020 1:16 pm

Maybe try replacing in Makefile:
- CFLAGS += -fopenmp
- LDFLAGS += -fopenmp
by
- CFLAGS += -Xpreprocessor -fopenmp
- LDFLAGS += -Xpreprocessor -fopenmp -lomp
(you need to have installed 'libomp' --> i.e. 'brew install libomp')
- Ana

Tunisha Gupta
Posts: 6
Joined: Thu Jun 04, 2020 1:56 pm
Security question 1: No
Security question 2: 7

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Tunisha Gupta » Tue Jun 09, 2020 10:40 am

Thank you Ana. It seems to compile (screenshot 1) but without MPI .
Also , if someone could guide as to how can I compile with MPI parallel calculation ?
Here are the 2 screenshots.
it compiles with gcc and mpicc compilers but whenever I am activating the line for MPI , it shows this error . (screenshot 2)
Screenshot 2020-06-09 at 12.54.38 PM.png
Screenshot 2020-06-09 at 12.54.38 PM.png (109.02 KiB) Viewed 488 times
Screenshot 2020-06-08 at 5.25.17 PM.png
Screenshot 2020-06-08 at 5.25.17 PM.png (251.3 KiB) Viewed 488 times
Thanking you,
Tunisha GUPTA

Riku Tuominen
Posts: 63
Joined: Tue Feb 27, 2018 10:52 am
Security question 1: No
Security question 2: 93

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Riku Tuominen » Tue Jun 09, 2020 11:47 am

Hi! Can you run other mpi executables or does mpirun -np 2 hostname work without problems? It might be that mpicc uses different mpi version than what is used when you run Serpent. mpicc --showme should shows what flags the compiler uses so it might give you a hint at what mpi version is used.

Ana Jambrina
Posts: 87
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Ana Jambrina » Tue Jun 09, 2020 12:34 pm

It should compile with/without MPI and run with OpenMP, MPI or OpenMP+MPI.
As suggested, check which 'mpicc' is being used: to see incompatibilities or so
Try to re-install OpenMPI from scratch (be sure you uninstall the previous version).
Alternatively, instead of OpenMPI, try MPICH.
- Ana

Ville Valtavirta
Posts: 457
Joined: Fri Sep 07, 2012 1:43 pm
Security question 1: No
Security question 2: 92

Re: Newbie- Installation Serpent2 on macOS Catalina 10.15.5

Post by Ville Valtavirta » Tue Jun 09, 2020 12:55 pm

Hi,

just to note, I don't think you want to compile it with MPI if you are simply running it on a single computer. It is better to use OpenMP parallelization on a single computer.

MPI is better suited for simulations on supercomputers or computing clusters.

-Ville

Post Reply