Installing and compiling the code under ubuntu

hello,
I have installed gcc and g++ but have some trouble in compiling the code.I operate according to the use’s guide "Getting started with Palabos"but cannot compile cylinder2D.The situation after I type ‘make’ is shown as below:

python …/…/…/scons/scons.py -j 2 -f …/…/…/SConstruct palabosRoot=…/…/… projectFiles=“cylinder2d.cpp” optimize=true debug=false profile=false MPIparallel=true SMPparallel=false usePOSIX=true serialCXX=g++ parallelCXX=mpicxx compileFlags="-Wall -Wnon-virtual-dtor" linkFlags="" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" libraryPaths="" includePaths="" libraries=""
scons: Reading SConscript files …
scons: done reading SConscript files.
scons: Building targets …
mpicxx -o cylinder2d.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/home/mawentao/palabos/src -I/home/mawentao/palabos/externalLibraries cylinder2d.cpp
sh: 1: mpicxx: not found
mpicxx -o /home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/home/mawentao/palabos/src -I/home/mawentao/palabos/externalLibraries /home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.cpp
scons: *** [cylinder2d.o] Error 127
sh: 1: mpicxx: not found
scons: *** [/home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.o] Error 127
scons: building terminated because of errors.
make: *** [compile] Error 2

hoping someone can help :slight_smile:
robinson

the problem is ‘building terminated because of errors’.who can tell me the reason and solution methods?

robinson :slight_smile:

Dear Robinson,

You need to install an MPI library (we recommend OpenMPI) in order to be able to compile Palabos for parallel execution. If you are not interesded in running Palabos in parallel, then you need to edit the “Makefile” and set:

MPIparallel = false

Best,
Dimitris

Dear Dimitris,

Thanks for your help!

I haved installed OpenMPI1.6.5 and compiling the code without changing makefile.But errors still occured,the response after I type ‘make’ is listed below:

python …/…/…/scons/scons.py -j 2 -f …/…/…/SConstruct palabosRoot=…/…/… projectFiles=“cavity2d.cpp” optimize=true debug=false profile=false MPIparallel=true SMPparallel=false usePOSIX=true serialCXX=g++ parallelCXX=mpicxx compileFlags="-Wall -Wnon-virtual-dtor" linkFlags="" optimFlags="-O3" debugFlags="-g" profileFlags="-pg" libraryPaths="" includePaths="" libraries=""
scons: Reading SConscript files …
scons: done reading SConscript files.
scons: Building targets …
mpicxx -o cavity2d.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/home/mawentao/palabos/src -I/home/mawentao/palabos/externalLibraries cavity2d.cpp
mpicxx: error while loading shared libraries: libopen-pal.so.4: cannot open shared object file: No such file or directory
scons: *** [cavity2d.o] Error 127
mpicxx -o /home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/home/mawentao/palabos/src -I/home/mawentao/palabos/externalLibraries /home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.cpp
mpicxx: error while loading shared libraries: libopen-pal.so.4: cannot open shared object file: No such file or directory
scons: *** [/home/mawentao/palabos/src/atomicBlock/dataProcessingFunctional2D.o] Error 127
scons: building terminated because of errors.
make: *** [compile] Error 2

can you tell me what I should do to deal with this situation?

Robinson :slight_smile:

You should google the error message. First result is this one which seems to fit your case:

http://www.open-mpi.org/community/lists/users/2011/08/17074.php

hth

Dear Dimitris,

I solve the problem by typing ‘sudo apt-get install mpi-defaut-bin’ and ‘sudo apt-get install mpi-default-dev’ in the terminal.
Thanks for your patience!

Robinson:-)