Error compiling CFDEM - cannot find -lmpi_cxx

Submitted by paulsh11 on Thu, 11/08/2012 - 23:44

I have been trying to compile CFDEM for some time now but I just can't seem to get it to compile. I am working on a Scientific Linus 6.3 system and following the instructions from this site in the CFD-DEM>Downloads page. OpenFOAM 2.1, ParaView 3.12, and LIGGGHTS current git clone all compile without errors. OpenFOAM and paraView test out correctly. Executing the cfdemCompCFDEM command leads to this error:

...POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/readLiggghtsData.o
/usr/bin/ld: cannot find -lmpi_cxx
collect2: ld returned 1 exit status
make: *** [/home/jps70/OpenFOAM/jps70-2.1.x/platforms/linux64GccDPOpt/lib/liblagrangian.so] Error 1

Running the commands from teh posting by e.derakhshani from 2/24/12; rmdepall, wclean, wmake libso from the cfdemParticle directory gives the same error. The LD_LIBRARY_PATH is:

$LD_LIBRARY_PATH = /home/jps70/OpenFOAM/ThirdParty-2.1.x/platforms/linux64Gcc/paraview-3.12.0/lib/paraview-3.12:/home/jps70/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-1.5.3:/home/jps70/OpenFOAM/ThirdParty-2.1.x/platforms/linux64GccDPOpt/lib/openmpi-1.5.3:/home/jps70/OpenFOAM/ThirdParty-2.1.x/platforms/linux64Gcc/openmpi-1.5.3/lib:/home/jps70/OpenFOAM/ThirdParty-2.1.x/platforms/linux64Gcc/openmpi-1.5.3/lib64:/home/jps70/OpenFOAM/jps70-2.1.x/platforms/linux64GccDPOpt/lib:/home/jps70/OpenFOAM/site/2.1.x/platforms/linux64GccDPOpt/lib:/home/jps70/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib:/home/jps70/OpenFOAM/ThirdParty-2.1.x/platforms/linux64GccDPOpt/lib:/home/jps70/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/dummy:/usr/lib64/openmpi:/usr/lib64/openmpi/lib

I am confused as to why the system is looking for mpi_cxx rather than libmpi_cxx. Any help would be appreciated. Attached are the log files from teh cfdemSysTest and the cfdemCompCFDEM.

cmake is version 2.8.10, openmpi is version 1.5.3.

Thanks!

AttachmentSize
Plain text icon log_cfdemSysTest.txt2.52 KB
Plain text icon log_comp_cfdem3.txt94.78 KB

rqwang | Fri, 11/09/2012 - 03:57

To install in the cluster, the common problem is libmpi_cxx.so is missing.
I found this lib is disabled in openfoam Thirdparty compilation.

So my solution is

1) download openfoam and thirdparty packages.

2) comment $HOME/OpenFOAM/ThirdParty-2.1.x/Allwmake line:100 --disable-mpi-cxx \

3) Then install openfoam and follow githubAccess_public.pdf

PS: for some compatibility problem I have to repeatedly use "dos2unix" and "chmod 777"

rq

paulsh11 | Fri, 11/09/2012 - 16:37

Thank you for the comments, I will try them shortly.

There is an openmpi directory in the ThirdParty directory that gets populated. Does that contain a full implementation of openmpi or does the compilation require the system-wide (/usr/lib64/openmpi) installation? This would be important for a chmod command.

paulsh11

paulsh11 | Fri, 11/09/2012 - 22:59

Thanks again for the suggestions but I ran into other problems in the compilation process that I am trying to piece together.

I tried commenting the line for mpi_cxx and recompiling OpenFOAM. The compile "blew up" with a multitude of errors. So I tried a clean install of OpenFOAM, ThirdParty, LIGGGHTS, and CFDEM sources. OpenFOAM and ParaView compiled correctly but cfdemCompLIG hung during execution requiring a restart of the machine.

I tried a clean install of sources again with the addition of the mph include and path to the fedora_fpic makefile. I also adjusted the makeParaView file to compile withMPI, withPython, and pointed to the qmake and cmake executables.

cfdemCompLIG still hangs requiring a restart.

I am going to try a clean install and making openmpi in the ThirdParty directory.

Reguards,
paulsh11

rqwang | Sat, 11/10/2012 - 05:03

Please go ahead.
For my case, it's in the cluster. So I don't have a display and didn't bother to install paraview.
Therefore, I am not sure whether my solution works with paraview.
I wonder whether you can save the steps of paraview until the whole process complete.
It's not directly related to other softwares.

Good luck.

rq

paulsh11 | Mon, 11/12/2012 - 20:11

I was finally able to compile LIGGGHTS and CFDEM. The solution that seemed to help was to download and expand the latest LIGGGHTS tarball. The git distribution just didn't seem to work. I also had to include the opnmpi information in the Makefile.fedora_fpic. The information placed goes right into the compil/linking command so it needs "-I" for the include files. I also compiled manually with make fedora_fpic, make makelib, make -f Makefile.lib fedora_fpic.

Testing the installation by going in to the settlingTestMPI directory and running the ./Allrun.sh command failed. It seems like the calculation fails in the mpirun -np 2 cfdemSolverPiso step with an unknown command. I suspect my openmpi is not configured correctly.

Thanks for all the help. Any further help will be appreciated.

paulsh11

cgoniva's picture

cgoniva | Tue, 12/04/2012 - 13:38

Hi,

it is highly recommended to use the git versions, to get bug fixes and compatible versions.
There are several protocols for getting the files from github (git@..., http, https) - you might try these.

Cheers,
Chris

cgoniva's picture

cgoniva | Tue, 12/04/2012 - 13:36

Hi,

for me it worked to simply remove the line with -lmpi_cxx in CFDEM's Make/options to get it running on the cluster.
(on a Unbutu Desktop on the other hand I needed this line.)

Cheers,
Chris