CFDEM - CLUSTER

Submitted by hulli on Fri, 11/07/2014 - 03:59

Hi ALL ! I was just wondering if some of you could help me out? Basically I want to run CFDEM on a cluster (runs on CentOS, I do not have root permission). OpenFoam finnaly runs. Trying to install CFDEM It took me a while to realize that I need to change the paths in the . bashrc file. However, when I do the cfdemSysTest I get something that open mpi is not there "The Open MPI wrapper compiler was unable to find the specified compiler
no in your PATH" ??? What am I doing wrong and ideas ??? Do I need to add something to the bashrc again ??? THANK YOU !!!

Here is the output of the sysTest:
*******************
system settings:
*******************
CFDEM_VERSION=
couple to OF_VERSION=2.3.x
compile option=Opt

check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-2.3.x
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/gerhard/CFDEM/-gerhard-2.3.x
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/gerhard/LIGGGHTS/mylpp/src
valid:NO critical:no - $CFDEM_PIZZA_DIR = /home/gerhard/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src does not exist

library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_fedora_fpic
$CFDEM_LIB_NAME = lagrangianCFDEM--
$LD_LIBRARY_PATH = /home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/boost-system/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/gperftools-svn/lib:/home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.5:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.5:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/lib64:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64/mpc-1.0.2/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64/mpfr-3.1.2/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gmp-5.1.3/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/lib64:/home/gerhard/OpenFOAM/gerhard-2.3.x/platforms/linux64GccDPOpt/lib:/home/gerhard/centFOAM//OpenFOAM/site/2.3.x/platforms/linux64GccDPOpt/lib:/home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib:/home/gerhard/centFOAM//OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib:/home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/dummy
$WM_NCOMPPROCS =
*******************
g++:
/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/g++
g++ (OpenFOAM) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc:
/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/gcc
gcc (OpenFOAM) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpic++:
/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/bin/mpic++
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
no in your PATH.

Note that this compiler was either specified at configure time or in
one of several possible environment variables.
--------------------------------------------------------------------------
mpirun:
/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/bin/mpirun
mpirun (Open MPI) 1.6.5

Report bugs to http://www.open-mpi.org/community/help/

richti83's picture

richti83 | Mon, 11/10/2014 - 09:28

You need to install (or load the module on the cluster) for a C++ compiler (mostly gcc, but on clusters often a special compiler from Intel, PGI, .. is used) because the mpi wrapper finaly calls it but can not find any compiler on your system.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Mon, 11/10/2014 - 16:08

thank you very much for your answer. I am not sure if I have to get gcc, because the Openfoem package (CentFOAM) comes with gcc. However, it turned out that when I relink $WM_MPLIB I to any of the preinstalled openmpi directories on the cluster (I changed the OpnenFoam settings.sh) the cfdensystest (which mpc+) passes and I could start the LIGGGHTS compilation. Nevertheless, after that changed that Openfoam is no more running in parralel, means I can not use the mpirun command anymore and the LIGGGHTS compilatin also breaks down showing that error:
Compiling sub-libraries of LIGGGHTS now...
Please provide the libraries to be compiled in the //home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt file.
Libraries must be in the /home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib directory.
Any ideas?
In addition I was wondering because I do not have root acces in which folder should I compile the gcc compiler you suggest, also in the third party folder of Openfoam or somewhere else?
Thank you so much

richti83's picture

richti83 | Mon, 11/10/2014 - 17:49

1st: I think "Please provide the libraries to be compiled in the //home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt file" is only an information, I have seen it on my workstations, too but have had no problems to run CFDEM or LIGGGHTS
can you run ~LIGGGHTS/LIGGGHTS-PUBLIC/src/lmp_fedora_fpic ? (or any binary in the src-path), if yes: liggghts was compiled successfull.

2nd: your OpenFOAM installation seems to be compiled with a different mpi installation as was used before you changed the settings.sh, try to re-wmake it.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Mon, 11/10/2014 - 19:19

first of all many thanks for your reply ... I am doing sth. right ...
1. so I just compilded LIGGGHTS, again and run the binary lmp_fedory_fpic, and It worked. I also tested one of the tutorials in parallel on one node, and they worked too even if I reset the paths of mpi as explained above. When it comes to compiling cfddemCompCFDEM, the compilation ran extreamly quick. So I was wondering if there is also a way to double check if the compilation was successful?

2. due to the fact that the compilation of OF takes ages and I am never 100% sure if it was succsessful that is why I use centFoam which runs just fine also in parallel. However, when I started to compile LIGGGHTS I always had that mpic++ issue described above. That is why I tried to link the settings.sh of OF to on other mpi folder which I found on the cluster insted of linking it to the third party directory of OF. The wired thing is that I after your reply I was able to run LIGGGHTS but Openfoam doesnt allow any mpirun anymore, which was working before I changed the mpi settings. When I change the settings back to origninal in the settings.sh OF works again using mpirun and liggghts doesnt ... At present I try to avoid a new compilation of OF because it took me ages to get it compilded and I only have accses to the cluster for a limited time...
Any ideas ?

richti83's picture

richti83 | Tue, 11/11/2014 - 09:13

You say OF is running with the correct ThirdParty settings, so try to recompile LIGGGHTS with this settings.
When I understand you right, the mpic++ wrapper complies about not to find a gcc executable in this case.
- try to find the gcc- and g++ binaries in your cluster and add it to you local PATH (in .bashrc export PATH=$PATH:/path/to/gcc
-did you compile g++ from third party directory and after that compiled OF ?
You can speed up the OF compilation using multiple cores, see http://www.openfoam.org/download/source.php wmakeScheduler for faster compilation
what is the output if which mpic++ (or mpcxx) and mpirun
what is mpirun -V
what is mpic++ --version
?

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Wed, 11/12/2014 - 07:19

thank you so much for your effort!!!!!!!!!!!!!!!!!!!!!! please find below my answers to your suggestions ...
- mpic++ wrapper complains about not finding a gcc executable in this case.
Yes that is the case the entire systemcheck seems fine but it doesnt find mpic++
- try to find the gcc- and g++ binaries in your cluster and add it to you local PATH (in .bashrc export PATH=$PATH:/path/to/gcc
I am sorry this command locate gcc | less to find gcc- and g++, however I did not understand the output, Just a long long list. Anyway I found gcc and g++ folders in the Third party directory. But dont you thin they are ok because they are recoginzed by the system test.
-did you compile g++ from third party directory and after that compiled OF ?
Actually I did not compile OpenFOAM, myself. I tried it many times but never succeded. Due to the fact that the cluster runs on centOs 6.5 it is possible to run a precompiled version of OpenFOAM which is called CentFOAM. It works great you can find it here: http://sourceforge.net/projects/centfoam/.
-did you compile g++ from third party directory and after that compiled OF ?
Yes I also tried that but it broke down and I got somewhat like a million error messages
-what is the output if which mpic++ (or mpcxx) and mpirun
the output wichout changeing the settings.sh in OpenFOAM is:
which mpic++ ==> ~/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/bin/mpic++ ...What I understand that mpic++ is there. I also tracked it down in the folder.
which mpirun ==> ~/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/openmpi-1.6.5/bin/mpirun ... Which is in the same folder and it is recognized.
what is mpirun -V ==> mpirun (Open MPI) 1.6.5
what is mpic++ --version ==> When I test that I get the wrapper message again. That triggered me to change the settings.sh to another openmpi version which I found on the cluster.
By the way I changed the alis of OpenFoam to a permanent source because if I do not activate the alias the system findes nothing neither gcc or openmpi
Actually I have no more ideas how to get it running ... I think setting a path in the .bashrc might be the best option: However, I do not fully understand how to track its path?
What do you think
Thank you soooo much

richti83's picture

richti83 | Wed, 11/12/2014 - 08:25

You can not mix different MPI Implementations, so stay at the centFOAM/../openmpi-1.6.5/ because the precompiled OF was linked against the libraries of OpenFoam 1.6.5.
Are there any binaries in the ThirdParty/gcc and g++ folders ? Than you can use this Path for the PATH environment variable to tell mpic++ to use this gcc implementations.

Ask the cluster administrator how to use the gcc/g++ (maybe you need to load a special module at startup of your session).
A which gcc should give you an output like /usr/bin/gcc but not /usr/bin/which: no gcc in ($PATH), until this is not right, it's not a CFDEM/LIGGGHTS but a system issue.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Wed, 11/12/2014 - 16:30

haha well I also thought that it may not be so wise to mixup the mpi versions...
anyway I think we are gettling closer:
I just checked
- which g++ ==> ~/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/g++
- which gcc ==> ~/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/gcc

I tried that path in the .bashrc
export PATH=$PATH:/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/gcc
however the systems test still complains about mpic++ wrapper ...
Did I set the path wrong ? ... sorry for bothering you ...

richti83's picture

richti83 | Wed, 11/12/2014 - 20:04

PATH should not link to the binary, I think
export PATH=$PATH:/home/gerhard/centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/gcc-4.8.2/bin/
(without gcc at the end) should be fine.
But when which tells you the correct path but the mpi-wrapper can't find a executable something is strange ...
I googled a bit arround and found out, that the underlaying compiler CAN be defined in ThirdParty-2.3.x/platforms/linux64/openmpi-1.6.5/share/openmpi/mpic++-wrapper-data.txt
Than I read you inital post and have seen that in the 2nd line of the error message $compiler$ is 'no'

The Open MPI wrapper compiler was unable to find the specified compiler
no in your PATH

Then I moved my g++ to g++483 to simulate a missing compiler and the error message becomes:

/home/dem/OpenFOAM/ThirdParty-2.2.1/platforms/linux64Gcc47/openmpi-1.6.3/bin/mpic++
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
g++ in your PATH.

Conclusion: your mpic++ wrapper is not setup correctly.
Here is mine: check the line compiler=?? in yours and change it to g++ if it is not ..

project=Open MPI
project_short=OMPI
version=1.6.3
language=C++
compiler_env=CXX
compiler_flags_env=CXXFLAGS
compiler=g++
extra_includes=
preprocessor_flags=
compiler_flags=-pthread
linker_flags=
libs=-lmpi_cxx -lmpi -ldl -lm -Wl,--export-dynamic -lrt -lnsl -lutil -lm -ldl
required_file=
includedir=${includedir}
libdir=${libdir}

Hope that helps.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Thu, 11/13/2014 - 23:07

GUESS WHAT YOU where RIGHT!!! THERE IS NO MORE MPI WRAPPER message and the cfdemSysTest doesn't fail anymore.
So I went on to compile liggghts ... The compilation took some time and so I was pretty optimistic, well it truned out ... too early. I was not able to compile Liggghts. It seems that it can not write the lmp_fedora_fpic binary. All I found it a lmp_fedora_fpic.a arcive file which I can not open. I copied that error message from the terminal: Note It is somewhere in the compilation script
collect2: error: ld returned 1 exit status
make[1]: *** [../lmp_fedora_fpic] Error 1
make[1]: Leaving directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic'
make: *** [fedora_fpic] Error 2
make[1]: Entering directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic'
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -Wno-uninitialized -fPIC -fPIC -DLAMMPS_GZIP -c universe.cpp

the end of the output is:
make[1]: Leaving directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic'

Compiling sub-libraries of LIGGGHTS now...
Please provide the libraries to be compiled in the //home/gerhard/CFDEM/CFDEMcoupling-PUBLIC-2.3.x/src/lagrangian/cfdemParticle/etc/library-liggghts-list.txt file.
Libraries must be in the /home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib directory.

Due to your earliey post I just checked I there was any binary. However, I could not fine one ...
Do you have any ideas ???
Thank you sooo much

richti83's picture

richti83 | Fri, 11/14/2014 - 07:55

this messages tells you that the linker was not able to find a needed libraray (in most cases the mpi-libs).
Normely one line above this error message the lib is named ( lmpicxx or lmpi or lm or something else).
Try to find out which lib the linker can not find.

Can you go to ~/LIGGGHTS/LIGGGHTS-PUBLIC/src/ and type a make fedora -j1 in the terminal ? what is the end of this ?

Best,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Fri, 11/14/2014 - 17:56

well you were right again !!! I just checked a make fedora -j1 and that came out:
Do you have any idea how I can fix that ?

/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make[1]: *** [../lmp_fedora] Error 1
make[1]: Leaving directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora'
make: *** [fedora] Error 2

Thank you sooooo much

richti83's picture

richti83 | Mon, 11/17/2014 - 13:51

Hi ,

I think something is mixxed in your centFOAM installation, your ld_PATH say "/home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/openmpi-1.6.5:"
to search for the mpi-libs, but your compiler lives in centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/ (without GccDPOpt suffix).
I don't remember where the suffix comes from, maybe in centfoam/etc/bashrc.

A quick and dirty hack is to copy the folder centFOAM/OpenFOAM/ThirdParty-2.3.x/platforms/linux64/lib/openmpi-1.6.5 to /home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/ or try to fix the $LD_LIBRARY_PATH
(add in $HOME/.bashrc export LD_LIBRARY_PATH=/home/gerhard/centFOAM//OpenFOAM/OpenFOAM-2.3.x/platforms/linux64/lib/openmpi-1.6.5/lib/:$LD_LIBRARY_PATH)

Best,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

hulli | Tue, 11/18/2014 - 06:51

Hi,
I am sorry I tried it the entire day but I still end up with this errror message ... This is soo wiered ... do you have any other suggestions ?

/usr/bin/ld: cannot find -lmpi
collect2: error: ld returned 1 exit status
make[1]: *** [../lmp_fedora_fpic] Error 1
make[1]: Leaving directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic'
make: *** [fedora_fpic] Error 2
make[1]: Entering directory `/home/gerhard/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_fedora_fpic'
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -Wno-uninitialized -fPIC -fPIC -DLAMMPS_GZIP -c universe.cpp
Thank you sooo much
G