Skip to Content.
Sympa Menu

opal - Re: [Opal] Compile error when compiling OPAL

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Compile error when compiling OPAL


Chronological Thread  
  • From: 18001331171 AT 189.cn
  • To: "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, 1 Jun 2023 16:13:06 +0800 (CST)
  • Hmm_attache_num: 0000
  • Hmm_source_ip: wmail.10.64.8.31.1333351665
  • Hmm_source_type: WEBMAIL
  • Hmm_webcln_ip: 124.152.207.217

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 AT 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


De: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch> en nombre de 18001331171 AT 189.cn <18001331171 AT 189.cn>
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>

Hi Weizhuang

Another easy solution could be to remove the line "add_compile_options (-Werror)" from CMakeLists.txt (main directory), then this error will be turned into a warning.

Best regards,
Jochem

Von: opal-request AT lists.psi..ch <opal-request AT lists.psi.ch> im Auftrag von Calvo Portela, Pedro <Pedro.Calvo AT ciemat.es>
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



De: 18001331171 AT 189.cn <18001331171 AT 189.cn>
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


------------------------------------------------
Dr. Pedro Calvo Portela
Unidad de Aceleradores - CIEMAT
Avenida Complutense 40, Edificio 7
28040 Madrid
Tel: +34 – 91 496 2554 / ext. 362542


De: opal-request AT lists.psi.ch <opal-request AT lists.psi.ch> en nombre de 18001331171 AT 189.cn <18001331171 AT 189.cn>
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















Archive powered by MHonArc 2.6.24.

Top of Page