The MPIGuard fails right off the bat when I run 'dunecontrol make build_tests' (see the attached log file + dune-common/build-cmake/CMakeCache.txt).
I am using gcc 6.2 + MPT (the SGI MPI) 2.12r6. All modules are from the master.build_tests.logCMakeCache.txt.zip
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
In file included from /u/amazaher/dune-project/dune-common/dune/common/test/mpiguardtest.cc:6:0:/u/amazaher/dune-project/dune-common/dune/common/parallel/mpiguard.hh:In instantiation of 'static Dune::GuardCommunicator*Dune::GuardCommunicator::create(const C&) [with C = <anonymous enum>]':
I am surprised that the communicator is an anonymous enum.
Would you please run "make VERBOSE=1 mpiguardtest" and post the output.
My assumption is that our buildsystem fails to deactivate the C++ bindings for SGI mpt. (I am not a C expert but I guess there should be no such thing as an anonymous enum there? But MPI_COMM_WORLD seems to be such athing)
Would you mind asking the people responsible for that package whether there is a define that we need to set to make mpt behave like C? E.g. for MPICH that is MPICH_SKIP_MPICXX.
After looking into /nasa/sgi/mpt/2.15r20/include/mpi.h (attached) the flag is MPI_NO_CPPBIND. I added this in cmake/modules/DuneMPI.cmake:
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_MPI=1;MPI_NO_CPPBIND;MPICH_SKIP_MPICXX;MPIPP_H" INCLUDE_DIRS "${MPI_DUNE_INCLUDE_PATH}" LIBRARIES "${MPI_DUNE_LIBRARIES}")
but still the same thing. Attached are the log files for 'make VERBOSE=1 mpiguardtest' with and without MPI_NO_CPPBIND. Perhaps I am doing something incorrect(?)
You updated the cmake file, but cmake uses very agressive caching. To
be sure everything shows up in your setup, you should remove your
build directory and do a full reconfiguration.
I, too, thought that might be an issue, so I did what you just suggested and still the same thing (see the full log file.)
I also added CXX_DEFINES += MPI_NO_CPPBIND in the dune_config.opts file (to be completely sure MPI_NO_CPPBIND is everywhere).
If I understand Markus comment, he thought that there should be no such thing as anonymous enum for MPI_COMM_WORLD, but doesn't the mpi.h file (attached earlier) seem to suggest otherwise?
I tried to guess a fix in !266 (merged) to get rid of the anoymous enum problem. Would be nice if you would test this.
I am not 100% sure but MPIGuard should not be used that often (at least initiliazed with a MPI_Comm directly). Therefore compilation and usage of the rest of DUNE might even work in your case without this problem being fixed. At least it might be worth a try.
Success! I could at least build the tests (dune-common/bin/dunecontrol make build_tests). However, 'dune-common/bin/dunecontrol make test' failed, and this could be because I am not running the tests properly. Please see the attached log files + my evolving .opts file.
Ok, there is a library problem; it expects libopenblas.so while it should have looked for libblas.so. Is the BLAS library name assumed? I don't see FindBLAS.cmake in the dune-common/cmake directory. Please see also the CMakeCache.txt file[CMakeCache.txt.zip]. One option is to manually modify the CMakeCache.txt file ...
cd /u/amazaher/dune-project/dune-common/build-cmake/dune/common/test./classnametest./classnametest: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directoryls /nasa/pkgsrc/sles12/2016Q4/lib/libblas.*/nasa/pkgsrc/sles12/2016Q4/lib/libblas.a /nasa/pkgsrc/sles12/2016Q4/lib/libblas.so /nasa/pkgsrc/sles12/2016Q4/lib/libblas.so.4.0.0/nasa/pkgsrc/sles12/2016Q4/lib/libblas.la /nasa/pkgsrc/sles12/2016Q4/lib/libblas.so.4
... I just noticed that the LAPACK_goto_LIBRARY is also not found (see the CMakeCache.txt attached earlier). Interestingly, the 'dunecontrol make build_tests' didn't fail the first time but it did when the CMakeCache.txt file was manually edited (libopenbals --> libblas).
with manual mods to CMakeCache.txt: Most but not all (dune-common) tests passed (see the log file). The tests that are failed are identified (by our system) as MPI applications and so are not allowed to be run without the prefix 'mpiexec -np [number-of-processors]'. BTW, is there a way to include this prefix to the tests (preferably to all of them) when, for example, '--enable-parallel' is set/used?
PBS r587i1n14 128> cd dune-common/build-cmake/dune/common/testPBS r587i1n14 129> ./mpiguardtest MPT ERROR: mpiexec_mpt must be used to launch all MPI applications
Running the failed tests manually seem to pass, with the exception of the 'mpiguardtest':
PBS r587i1n14 130> mpiexec_mpt -np 1 ./mpiguardtest ---- default constructor---- guard(MPI_COMM_WORLD)---- guard(MPIHelper)---- manual errorError (rank 0): MPIGuardError [finalize:/u/amazaher/dune-project/dune-common/dune/common/parallel/mpiguard.hh:225]: Terminating process 0 due to 1 remote error(s)---- done