Compiling OF in cluster
Hi, I am trying to compile OFv2006 in the PSC Bridges supercomputer. i Follow the instructions provided in the official website (https://develop.openfoam.com/Develop...r/doc/Build.md) but I get the following errors:
When I source the /etc/config.sh/setting I get the following Code:
gcc: error: unrecognized command line option ‘--showme:link’ Code:
wmake mpi Thanks a lot of the help. |
Quote:
If you are using INTELMPI, you need to specify this. Either in the etc/bashrc (the WM_MPLIB value), or provide the same in a prefs.sh file. The '--showme:compile' bits are used for SYSTEMOPENMPI (the default). If your cluster has it, you might also consider using spack for your installation. |
Quote:
Code:
Compile OpenFOAM libraries Thanks for all the help! |
Quote:
After sourcing your updated OpenFOAM etc/bashrc, you should also verify that the directories listed by the $MPI_ARCH_PATH actually contain an include/ and a lib/ or lib64/ directory AND that these also contain the mpi.h, mpi.so etc. They are probably there, but could also be in a parallel path. In the meantime, while you are busy digging, you can kick off an OpenFOAM compilation of everything else. Just change the WM_MPLIB to "dummy" to skip over the mpi bits. You can come back later and change it back to INTELMPI, or whichever mpi flavour you have and rebuild. Since this second pass only rebuilds the MPI bits, it will typically run through in a couple (1-3) of minutes, with most of the time being spent examining all of the things that it does not need to rebuild. Don't give up, you'll soon get there. |
Quote:
Sorry if this is a silly question, but when you say change WM_MPLIB to "dummy" do you mean: Code:
>export WM_MPLIB=dummy If I do that a just get a similar error Code:
gcc=/usr/lib64/ccache/gcc |
Quote:
Nope that's not going to do it (actually you can see that from the wmake with the mpi=INTELMPI information). Lets go for the heavy-handed solution. Edit your etc/bashrc (or etc/prefs.sh) and change WM_MPLIB to have "dummy". Source the OpenFOAM etc/bashrc again. To test that it worked (or not), just try recompiling some mpi bits. For example, src/Pstream/Allwmake Should be ok. BTW: you were almost there with your first approach, but you would have also need the FOAM_MPI variable. The direct approach (edit the file) seems to be safer until you get a better idea of how things work. Cheers, /mark |
@fedez91 - thinking of your experience, wmake for v2012 will get two additional options:
Code:
ENH: add wmake -show-mpi-compile, -show-mpi-link options You will still need to figure if things make sense, but at least this way you can easily see what OpenFOAM is looking for when using a particular MPI. |
Quote:
When I checked the intel mpi installed in the cluster, I cannot find mpi.so. I think it was replaced with something else. In particular, I see the following in the instalation folder Code:
>ls /opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/lib/ So I guess mpi.so was replaced with libmpicxx.so I tried to create a soft link to libmpicxx.so called mpi.so in $WM_PROJECT_DIR/libs and added that to $LD_LIBRARY_PATH hoping that the compiler finds mpi.so there and goes directly to libmpicxx.so but it didn't work. I guess I am close to solving the problem but I don't know how to continue :confused::confused:. Any help appreciated! |
I was able to compile the code using OpenMPI, but not IntelMPI.
All I had to do was to change WM_MPLIB = SYSTEMOPENMPI and then load OpenMPIfor gcc compilers module using: Code:
>load module mpi/gcc_openmpi Thanks for all the help. |
All times are GMT -4. The time now is 06:47. |