Hello!
When compiling OpenLB with OpenMP parallelisation using g++, I get this error message:
ompManager.cpp:47: error: ‘omp’ cannot be thread-local because it has non-POD type ‘ompManager’
This error has been reported once before (search for “non-POD” in this forum). But the solution from that thread, namely to use mpicxx instead of g++, doesn’t work for me, because mpicxx doesn’t support openmp.
Both with g++ version 4.3.2 and version 4.2.4 I get the error at ompManager.cpp:47 (see above). What can I do to use OpenLB in parallel with OpenMP? I don’t have access to commercial compilers.
It seems that OpenMP parallelization in OpenLB currently works with the Intel compiler but not with GCC. We are working on it, but the issue has not been solved yet.
In the meantime, the recommendation for you to work on a multi-core platform without commercial compiler is to abandon OpenMP and work with MPI instead (choose PARALLEL_MODE := MPI instead of OMP in the file Makefile.inc in the OpenLB root directory). There exist many free implementations of MPI, including mpich which is part of most Linux distros. Starting an MPI-parallel program with several threads on a multi-core processor (or on a multi-processor) allows you to do shared-memory parallelism without OpenMP.
I am trying to run OpenLB with the Intel compiler and PARALLEL_MODE:= MPI.
To avoid the error message
In file included from vtkDataOutput.cpp:29:
serializerIO.hh: In function ‘void olb::serializer2ostr(const olb::DataSerializer&, std::ostream*, bool)’:
serializerIO.hh:45: error: ‘numeric_limits’ was not declared in this scope
This message was not shown when olb was compiled by the g++ compiler witthout parallelisation.
I added an “include <limits.h>” in the file above and changed “numeric_limits” to “std::numeric_limits”.
Now the error message is gone and vtkDataOutput.o is created.
“std::numeric_limits” was already specified in the olb-0.5r1 distribution at all the other occurences of numeric_limits.