Open GitPaean opened 4 years ago
The only difference I did is to set to use
clang
andclang++
formpicc
andmpicxx
, and everything else keeps the same as before.
Not sure what you mean by this. Shouldn't it be sufficient to the right compilers to CMake via -DCMAKE_CXX_COMPILER=clang++ -D-DCMAKE_C_COMPILER=clang -DUSE_MPI=ON
and let the build system doe its magic?
The command triggered the problem is as follows
/usr/bin/mpicxx -DHAVE_CONFIG_H=1 -DSILENCE_EXTERNAL_WARNINGS -I/home/kaib/OPM-master-test/debug/opm-common-build -I/home/kaib/OPM-master-test/debug/opm-common/external/cjson -I/home/kaib/OPM-master-test/debug/opm-common-build/include -I/home/kaib/OPM-master-test/debug/opm-common -pipe -std=c++14 -pedantic -Wall -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith -Wmissing-declarations -Wcast-qual -Wshadow -Wwrite-strings -Wchar-subscripts -Wredundant-decls -fopenmp=libomp -pthread -O2 -g -DDEBUG -std=c++14 -o CMakeFiles/genkw.dir/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp.o -c /home/kaib/OPM-master-test/debug/opm-common/src/opm/parser/eclipse/Parser/raw/RawRecord.cpp
Not sure what you mean by this. Shouldn't it be sufficient to the right compilers to CMake via
-DCMAKE_CXX_COMPILER=clang++ -D-DCMAKE_C_COMPILER=clang -DUSE_MPI=ON
and let the build system doe its magic?
What I did is to set OMPI_CC=clang
and OMPI_CXX=clang++
, which makes mpicc and mpicxx to use clang and calng++.
I guess it might be similar to your suggestion, while I will try to see whether it makes a difference.
Not sure what you mean by this. Shouldn't it be sufficient to the right compilers to CMake via
-DCMAKE_CXX_COMPILER=clang++ -D-DCMAKE_C_COMPILER=clang -DUSE_MPI=ON
and let the build system doe its magic?What I did is to set
OMPI_CC=clang
andOMPI_CXX=clang++
, which makes mpicc and mpicxx to use clang and calng++.
Please try my approach. There should be no need to fiddle around with MPI directly.
Even with your approach, there are some parts that will not be compiled with MPI support. As long as you do not either set the other compilers to clang or the MPI compilers, these might be compiled with gcc/g++. But maybe you did that already?
Please try my approach. There should be no need to fiddle around with MPI directly.
The result is the same. The compilation crashed due to the same reason with the same symptom.
Even with your approach, there are some parts that will not be compiled with MPI support. As long as you do not either set the other compilers to clang or the MPI compilers, these might be compiled with gcc/g++. But maybe you did that already?
Because USE_MPI=ON
, it might be true while I have not seen that.
as suggested by some colleagues, it uses less memory to compile OPM with clang than gcc, which will probably help me to build the full flow fast on my machine. I gave it a try.
Similar claims was made earlier, and we spent quite a bit of time figuring out that is was not true. In any case, consider asking for a hardware upgrade. Your time is valuable, RAM is cheap. There are a few places during compilation where the memory consumption goes up significantly, but I am not sure how much effort it makes sense to use bringing it down.
This does not look like anything solvable by a hardware upgrade. We should check CMakeCachte.txt whether the settings make sense and maybe try my suggested settings and another version of clang.
If that does not help it seems to be a compiler error and should be reported like suggested in the error message.
If that does not help it seems to be a compiler error and should be reported like suggested in the error message.
I will do that. Since OPM is open-source, we can send the full report which will include some code. But if someone manage to build OPM with clang 9.0, please let us know. When I got time, I might try to test other versions of clang, might not.
In anyway, it is not an urgent issue.
I just wanted to confirm the issue with Clang 9 on Ubuntu 19.10. Things are fine with Clang 7 and 8.
as suggested by some colleagues, it uses less memory to compile OPM with clang than gcc, which will probably help me to build the full flow fast on my machine. I gave it a try.
The only difference I did is to set to use
clang
andclang++
formpicc
andmpicxx
, and everything else keeps the same as before.I ran into the following error. Can someone point me to the correct direction? Thanks. It was on ubuntu 19.10.