opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: 18001331171 AT 189.cn
- To: Snuverink Jochem <jochem.snuverink AT psi.ch>, "Pedro.Calvo AT ciemat.es" <Pedro.Calvo AT ciemat.es>
- Cc: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
- Subject: Re: [Opal] Compile error when compiling OPAL
- Date: Thu, 15 Jun 2023 17:34:58 +0800 (CST)
- Hmm_attache_num: 0000
- Hmm_source_ip: wmail.10.64.8.43.1347150739
- Hmm_source_type: WEBMAIL
- Hmm_webcln_ip: 124.152.207.217
Dear Pedro,
Thanks for your help! I have successfully compiled OPAL 2.4, removing unnecessary compile options such as AMR and SAAMG.
But during the process, I met an error saying "can not be used when making a PIE object; recompile with -fPIE"
This should be some problem related to my own computer. By searching the web, this problem is solved by adding the following command in the CMakeList.txt file
"set(CMAKE_POSITION_INDEPENDENT_CODE ON)"
Best Regards,
Weizhuang
------------------ 原始邮件 ------------------
发件人:Calvo Portela, Pedro "Pedro.Calvo AT ciemat.es"
时 间:2023/06/05 15:11:29 周一
收件人:"18001331171 AT 189.cn" "18001331171 AT 189.cn", Snuverink Jochem "jochem.snuverink AT psi.ch"
抄送人:"opal AT lists.psi.ch" "opal AT lists.psi.ch"
主 题:Re: [Opal] Compile error when compiling OPAL
Dear Weizhuang
As Jochem explain you, Zoltan2 and Muelu are external package needed to install OPAL with AMR solver, but if you don't want this solver, you could skip their installation. Some of the external packages included in the build-recipe are not estricted need to install OPAL. For example, parmetis, OpenBLAS and trilinos are required if you want to enable SAAMG and AMR_MG solvers, AMRex is needed for AMR solver and Mithra if you want to include FEL simulations. You can check the required optional softwareneeded here: https://gitlab.psi.ch/OPAL/src/-/wikis/For%20Developers/Supported-OS-and-required-Software-to-build-OPAL.
I suggest you that if you do not need this specific OPAL features, you skip the installation of the associated software, as the compilationbecomes easier. There are some optional flags in OPAL configuration to control those features (https://gitlab.psi.ch/OPAL/src/-/wikis/For%20Developers/Compile-OPAL).
Best regards
Pedro
Enviado: lunes, 5 de junio de 2023 4:32:00
Para: Snuverink Jochem; Calvo Portela, Pedro
Cc: opal AT lists.psi.ch
Asunto: Re: AW: [Opal] Compile error when compiling OPAL
Hi Jochem,
Sorro for the late reply. I don't remember I installed the Zoltan2 and MeuLu packages, but maybe they are included in other packages I installed.
Most of the package versions are the defaults ones in the build-recipts from the official website.
And the compiler is cmake version 3.22.1.
Best Regards,
Weizhuang
------------------ 原始邮件 ------------------
发件人:Snuverink Jochem "jochem.snuverink AT psi.ch"
时 间:2023/06/02 15:30:31 周五
收件人:"Pedro.Calvo AT ciemat.es" "Pedro.Calvo AT ciemat.es", "18001331171 AT 189.cn" "18001331171 AT 189.cn"
抄送人:"opal AT lists.psi.ch" "opal AT lists.psi.ch"
主 题:AW: [Opal] Compile error when compiling OPAL
<style>P {margin-top:0;margin-bottom:0;}</style>
Gesendet: Donnerstag, 1. Juni 2023 10:13
An: Pedro.Calvo AT ciemat.es <Pedro.Calvo AT ciemat.es>
Cc: opal AT lists.psi.ch <opal AT lists.psi.ch>
Betreff: Re: [Opal] Compile error when compiling OPAL
Hi Pedro,
Today I try to recompole OPAL 2022.1.0 again. When the error I mentioned before appeared I rerun the compile command and this time the compile is successful.
But there comes another problem. Previously I used the pre-compiled OPAL2.4 to run programs and when I used OPAL 2022.1.0 version, the program is not working.
So I try to compile OPAL2.4. But when compiling OPAL2.4, the following errors will appears:
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp: In member function ‘long long unsigned int StepSizeConfig::getMaxSteps() const’:
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:119:21: error: loop variable ‘config’ creates a copy from type ‘const std::tuple<double, double, long unsigned int>’ [-Werror=range-loop-construct]
119 | for (const auto config: configurations_m) {
| ^~~~~~
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:119:21: note: use reference type to prevent copying
119 | for (const auto config: configurations_m) {
| ^~~~~~
| &
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp: In member function ‘long long unsigned int StepSizeConfig::getNumStepsFinestResolution() const’:
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:130:21: error: loop variable ‘config’ creates a copy from type ‘const std::tuple<double, double, long unsigned int>’ [-Werror=range-loop-construct]
130 | for (const auto config: configurations_m) {
| ^~~~~~
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:130:21: note: use reference type to prevent copying
130 | for (const auto config: configurations_m) {
| ^~~~~~
| &
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp: In member function ‘double StepSizeConfig::getMinTimeStep() const’:
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:147:21: error: loop variable ‘config’ creates a copy from type ‘const std::tuple<double, double, long unsigned int>’ [-Werror=range-loop-construct]
147 | for (const auto config: configurations_m) {
| ^~~~~~
/home/peng/OPAL/tmp/src/OPAL/src-OPAL-2.4/src/Algorithms/StepSizeConfig.cpp:147:21: note: use reference type to prevent copying
147 | for (const auto config: configurations_m) {
| ^~~~~~
| &
[ 24%] Linking CXX executable TestFFT-2
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/libOPAL.dir/build.make:482: src/CMakeFiles/libOPAL.dir/Algorithms/StepSizeConfig.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:3276: src/CMakeFiles/libOPAL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:136: all] Error 2
: error in compiling the software!
------------------ 原始邮件 ------------------
发件人:18001331171 AT 189.cn
时 间:2023/06/01 13:54:34 周四
收件人:"Pedro.Calvo AT ciemat.es" "Pedro.Calvo AT ciemat.es"
抄送人:"opal AT lists.psi.ch" "opal AT lists.psi.ch"
主 题:Re: [Opal] Compile error when compiling OPAL
Hi Pedro,
The error is as follows when I changed the boost version to 1.73. It seems the error is not from boost but something else.
In file included from /home/peng/OPAL/include/MueLu_SegregatedAFactory.hpp:2,
from /home/peng/OPAL/include/MueLu_FactoryFactory_decl.hpp:126,
from /home/peng/OPAL/include/MueLu_FactoryFactory.hpp:1,
from /home/peng/OPAL/include/MueLu_ParameterListInterpreter_def.hpp:74,
from /home/peng/OPAL/include/MueLu_ParameterListInterpreter.hpp:2,
from /home/peng/OPAL/include/MueLu_CreateTpetraPreconditioner.hpp:22,
from /home/peng/OPAL/tmp/src/OPAL/OPAL-2022.1.0/src/Solvers/MGPoissonSolver.cpp:69:
/home/peng/OPAL/include/MueLu_SegregatedAFactory_def.hpp: In member function ‘void MueLu::SegregatedAFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Build(MueLu::SegregatedAFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Level&) const’:
/home/peng/OPAL/include/MueLu_SegregatedAFactory_def.hpp:108: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
108 | } else if (mapFact != "null") {
|
/home/peng/OPAL/include/MueLu_SegregatedAFactory_def.hpp:108: note: adding ‘-flarge-source-files’ will allow for more column-tracking support, at the expense of compilation time and memory
[ 85%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/H5PartWrapperForPT.cpp.o
[ 85%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/MonitorStatisticsWriter.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/MultiBunchDump.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/IpplInfoWrapper.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/H5Writer.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/MemoryWriter.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/LBalWriter.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/StatBaseWriter.cpp.o
[ 86%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/StatWriter.cpp.o
[ 87%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/SDDSColumn.cpp.o
[ 87%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/SDDSColumnSet.cpp.o
[ 87%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/SDDSWriter.cpp.o
[ 87%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/GridLBalWriter.cpp.o
[ 87%] Building CXX object src/CMakeFiles/libOPALObj.dir/Structure/MemoryProfiler.cpp.o
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/CMakeFiles/libOPALObj.dir/build.make:5480: src/CMakeFiles/libOPALObj.dir/Solvers/AMR_MG/AmrMultiGrid.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/peng/OPAL/include/Zoltan2_PartitioningAlgorithms.hpp:55,
from /home/peng/OPAL/include/Zoltan2_PartitioningProblem.hpp:54,
from /home/peng/OPAL/include/MueLu_Zoltan2Interface_def.hpp:57,
from /home/peng/OPAL/include/MueLu_Zoltan2Interface.hpp:2,
from /home/peng/OPAL/include/MueLu_FactoryFactory_decl.hpp:150,
from /home/peng/OPAL/include/MueLu_FactoryFactory.hpp:1,
from /home/peng/OPAL/include/MueLu_ParameterListInterpreter_def.hpp:74,
from /home/peng/OPAL/include/MueLu_ParameterListInterpreter.hpp:2,
from /home/peng/OPAL/tmp/src/OPAL/OPAL-2022.1.0/src/Solvers/AMR_MG/MueLuBottomSolver.h:34,
from /home/peng/OPAL/tmp/src/OPAL/OPAL-2022.1.0/src/Solvers/AMR_MG/AmrMultiGridCore.h:38,
from /home/peng/OPAL/tmp/src/OPAL/OPAL-2022.1.0/src/Solvers/AMR_MG/AmrMultiGrid.h:32,
from /home/peng/OPAL/tmp/src/OPAL/OPAL-2022.1.0/src/Structure/FieldSolver.cpp:55:
/home/peng/OPAL/include/Zoltan2_AlgZoltan.hpp: In member function ‘void Zoltan2::AlgZoltan<Adapter>::partition(const Teuchos::RCP<Zoltan2::PartitioningSolution<Adapter> >&)’:
/home/peng/OPAL/include/Zoltan2_AlgZoltan.hpp:768: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
768 | for (lno_t i = 0; i < nObj; i++)
|
/home/peng/OPAL/include/Zoltan2_AlgZoltan.hpp:768: note: adding ‘-flarge-source-files’ will allow for more column-tracking support, at the expense of compilation time and memory
make[1]: *** [CMakeFiles/Makefile2:3329: src/CMakeFiles/libOPALObj.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
: error in compiling the software!
Best Regards,
Weizhuang
------------------ 原始邮件 ------------------
发件人:Calvo Portela, Pedro "Pedro.Calvo@ciemat...es"
时 间:2023/05/31 15:59:10 周三
收件人:"18001331171 AT 189.cn" "18001331171 AT 189.cn"
抄送人:"opal AT lists.psi.ch" "opal AT lists.psi.ch"
主 题:Re: [Opal] Compile error when compiling OPAL
Hi Weizhuang
I find it strange, I've compiled OPAL-2022.1 with boost-1.73.0 without any failure. Could you please specify the error you get during compilation? I will try to take a look at it in the next days.
Cheers
Pedro
Enviado: martes, 30 de mayo de 2023 9:06:50
Para: Snuverink Jochem
Cc: opal AT lists.psi.ch
Asunto: Re: [Opal] Compile error when compiling OPAL
Hi Jochem,
Thanks for your advice. In fact I have tried this method before, but after removing this some new kind of error appeared. Looks like the following:
" /OPAL/include/MueLu_NotayAggregationFactory_def.hpp:155: note: ‘-Wmisleading-indentation’ is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers"
Also, the two methods Pedro mentioned also didn't work for me. The error I mentioned before disappered but some new error will appear again
and I'm still working on it.
Best regards,
Weizhuang
------------------ 原始邮件 ------------------
发件人:Snuverink Jochem "jochem.snuverink AT psi.ch"
时 间:2023/05/30 14:29:48 周二
收件人:"18001331171 AT 189.cn" "18001331171 AT 189.cn", "Calvo Portela, Pedro" "Pedro.Calvo@ciemat....es"
抄送人:"opal AT lists.psi.ch" "opal AT lists.psi.ch"
主 题:AW: [Opal] Compile error when compiling OPAL
<style>P {margin-top:0;margin-bottom:0;}</style>
Gesendet: Montag, 22. Mai 2023 12:45
An: 18001331171 AT 189.cn <18001331171 AT 189.cn>
Cc: opal AT lists.psi.ch <opal AT lists.psi.ch>
Betreff: Re: [Opal] Compile error when compiling OPAL
Hi Weizhuang
This bug has been solved in the master branch, so it will be fixed in the next OPAL release. I suggest to two options to compile OPAL 2022.1.0
- Use a previous version of boost. The minimum version to compile OPAL is boost 1.66.0
- Try to compile OPAL master branch, but this a not stable branch with some bugs to be fixed, so I don't really recommend this solution
Best regards
Pedro
Enviado: lunes, 22 de mayo de 2023 12:02
Para: Calvo Portela, Pedro
Asunto: Re: Re: [Opal] Compile error when compiling OPAL
Hi Pedro,
I am compiling OPAL on ubuntu 22.04 on Windows.
The boost version is 1.81.0. The OPAL version is 2022.1.0.
Best Regards,
Weizhuang
------------------ 原始邮件 ------------------
发件人:Calvo Portela, Pedro "Pedro.Calvo@ciemat.....es"
时 间:2023/05/22 17:54:10 周一
收件人:"18001331171 AT 189.cn" "18001331171 AT 189.cn"
抄送人:
主 题:Re: [Opal] Compile error when compiling OPAL
Hi Weizhuang
I've never got this error. Please, we need some info about your system to approach the issue
What version of Boost do you have installed on your system? What OPAL release are you trying to compile?
Cheers
Pedro
Unidad de Aceleradores - CIEMAT
Avenida Complutense 40, Edificio 7
28040 Madrid
Tel: +34 – 91 496 2554 / ext. 362542
Enviado: lunes, 22 de mayo de 2023 11:05
Para: opal
Asunto: [Opal] Compile error when compiling OPAL
Hello,
I tried to compile the OPAL from source following the build-recipes in the website. When compiling OPAL, the following error message occured:
"/OPAL/src/Optimize/OpalSimulation.cpp:659:59: error: ‘std::string boost::filesystem::extension(const boost::filesystem::path&)’ is deprecated: Use path::extension() instead [-Werror=deprecated-declarations]
659 | std::string extension = Util::toUpper(fs::extension(it->path().filename())); "
Does anyone knows how to do with this error?
Best Regards,
Weizhuang Peng
-
Re: [Opal] Compile error when compiling OPAL,
18001331171, 06/01/2023
- <Possible follow-up(s)>
-
Re: [Opal] Compile error when compiling OPAL,
18001331171, 06/01/2023
- AW: [Opal] Compile error when compiling OPAL, Snuverink Jochem, 06/02/2023
-
Re: [Opal] Compile error when compiling OPAL,
18001331171, 06/05/2023
- Re: [Opal] Compile error when compiling OPAL, Calvo Portela, Pedro, 06/05/2023
- Re: [Opal] Compile error when compiling OPAL, 18001331171, 06/15/2023
Archive powered by MHonArc 2.6.24.