compilers / python interpreters

Hello,

I am totally new with palabos, I am trying to run the case ExternalFlowAroundObstacle. I have followed the user guide concerning compilers (I use linux). But when i try the command “make”. I have the log below :

python …/…/…/scons/scons.py -j 2 -f …/…/…/SConstruct palabosRoot=…/…/… projectFiles=“tutorial_1_1.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 tutorial_1_1.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries tutorial_1_1.cpp
mpicxx -o /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.cpp
pgcpp-Error-Unknown switch: -Wall
pgcpp-Error-Unknown switch: -Wnon-virtual-dtor
scons: *** [tutorial_1_1.o] Error 1
pgcpp-Error-Unknown switch: -Wall
pgcpp-Error-Unknown switch: -Wnon-virtual-dtor
scons: *** [/data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.o] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2

Apparently, the issue is coming from -Wall. My compiler is g++ and I think it is well-installed. Concerning python, python 2.7 is loaded on my computer. And I have loaded openmpi too. Do I need to download something else for python?

To solve that issue, I’ve tried a non-parallele calculation. I wrote false for # Set MPI-parallel mode on/off (parallelism in cluster-like environment). But it still not works …
I had this log :

python …/…/…/scons/scons.py -j 2 -f …/…/…/SConstruct palabosRoot=…/…/… projectFiles=“tutorial_1_1.cpp” optimize=true debug=false profile=false MPIparallel=false 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 …
g++ -o tutorial_1_1.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries tutorial_1_1.cpp
g++ -o /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.o -c -Wall -Wnon-virtual-dtor -O3 -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.cpp
In file included from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/bits/localefwd.h:42:0,
from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/string:45,
from /data/me4mgs/palabos-v1.4r1/src/core/globalDefs.h:36,
from /data/me4mgs/palabos-v1.4r1/src/parallelism/mpiManager.h:32,
from /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.cpp:28:
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:45: error: invalid type in declaration before ‘;’ token
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, …)’:
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:72:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:97:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
scons: *** [/data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.o] Error 1
In file included from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/bits/localefwd.h:42:0,
from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/string:45,
from /data/me4mgs/palabos-v1.4r1/src/core/globalDefs.h:36,
from /data/me4mgs/palabos-v1.4r1/src/palabos2D.h:25,
from tutorial_1_1.cpp:28:
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:52:45: error: invalid type in declaration before ‘;’ token
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, …)’:
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:72:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
/usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/x86_64-unknown-linux-gnu/bits/c++locale.h:97:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
In file included from /usr/include/stdio.h:929:0,
from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/cstdio:45,
from /usr/local/packages5/gcc-4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/…/…/…/…/include/c++/4.5.3/fstream:43,
from /data/me4mgs/palabos-v1.4r1/src/core/runTimeDiagnostics.h:30,
from /data/me4mgs/palabos-v1.4r1/src/core/util.h:34,
from /data/me4mgs/palabos-v1.4r1/src/core/dynamics.h:33,
from /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelDynamics.h:33,
from /data/me4mgs/palabos-v1.4r1/src/parallelism/headers2D.h:30,
from /data/me4mgs/palabos-v1.4r1/src/palabos2D.h:26,
from tutorial_1_1.cpp:28:
/usr/include/bits/stdio.h: In function ‘__ssize_t getline(char**, size_t*, FILE*)’:
/usr/include/bits/stdio.h:118:52: error: ‘__getdelim’ was not declared in this scope
scons: *** [tutorial_1_1.o] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2

Please excuse my bad english …

Thanks in advance for your help
Anna

Hello Anna,

It seems that when you run a parallel compilation, your system uses the Portland compiler, and not GCC (you can see this from the pgcpp-Error… error messages). You should therefore only use compilation options known by the Portland compiler, or non at all. Simply edit the Makefile, and replace

compileFlags = -Wall -Wnon-virtual-dtor

by

compileFlags =

Regards,
Jonas

Hello Jonas,

Thank you for your help. I tried but compilation still doesn’t work in parallele mode. I have a new error message, and I don’t understand where is the problem. I past here an extract from the log :

mpicxx -o /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelBlockCommunicator2D.o -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelBlockCommunicator2D.cpp
mpicxx -o /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.o -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelStatistics.cpp
mpicxx -o /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelBlockCommunicator3D.o -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/parallelBlockCommunicator3D.cpp
“/data/me4mgs/palabos-v1.4r1/src/multiPhysics/freeSurfaceUtil3D.h”, line 53: warning:
missing return statement at end of non-void function
“plb::twoPhaseFlag::flagToString”
}
^

“/data/me4mgs/palabos-v1.4r1/src/multiPhysics/freeSurfaceUtil3D.h”, line 64: warning:
missing return statement at end of non-void function
“plb::twoPhaseFlag::invert”
}
^

“/data/me4mgs/palabos-v1.4r1/src/multiPhysics/twoPhaseModel3D.h”, line 216: warning:
missing return statement at end of non-void function
“plb::stringToTwoPhaseModel”
}
^

mpicxx -o /data/me4mgs/palabos-v1.4r1/src/parallelism/mpiManager.o -c -O3 -g -DPLB_DEBUG -DPLB_MPI_PARALLEL -DPLB_USE_POSIX -I/data/me4mgs/palabos-v1.4r1/src -I/data/me4mgs/palabos-v1.4r1/externalLibraries /data/me4mgs/palabos-v1.4r1/src/parallelism/mpiManager.cpp
“/data/me4mgs/palabos-v1.4r1/externalLibraries/Eigen3/src/Core/util/Memory.h”, line 206: error:
identifier “_mm_malloc” is undefined
result = _mm_malloc(size, 16);
^

“/data/me4mgs/palabos-v1.4r1/externalLibraries/Eigen3/src/Core/util/Memory.h”, line 229: error:
identifier “_mm_free” is undefined
_mm_free(ptr);
^

“/data/me4mgs/palabos-v1.4r1/externalLibraries/Eigen3/src/Core/arch/SSE/PacketMath.h”, line 161: warning:
controlling expression is constant
{ eigen_assert(false && “packet integer division are not supported by SSE”);
^

“/data/me4mgs/palabos-v1.4r1/externalLibraries/Eigen3/src/Core/products/Parallelizer.h”, line 20: warning:
variable “m_maxThreads” was set but never used
static EIGEN_UNUSED int m_maxThreads = -1;
^
I don’t understand why there is a problem with those elements undefined.

Thank your for your help

Anna

Hello,

Palabos ships with a library called “Eigen”, and your version of the Portland compiler appears to have issues with it. The easiest solution is to use the GCC or Intel compiler instead (your sysadmin certainly has a solution to propose).

Cheers,
Jonas

[i]Edit: On second thought, you could also try to stay with the Portland compiler but remove usage of Eigen in Palabos (it is unlikely that you are going to need it). Just edit the following files:

src/boundaryCondition/headers2D.h
src/boundaryCondition/headers2D.hh
src/boundaryCondition/headers3D.h
src/boundaryCondition/headers3D.hh
src/offLattice/headers3D.h

And delete all lines in which the word “generalized” appears. This should do it.[/i]