esm-tools / esm_tools

Simple Infrastructure for Earth System Simulations
https://esm-tools.github.io/
GNU General Public License v2.0
25 stars 12 forks source link

PISM not compiling on mistral #413

Closed ackerlar closed 2 years ago

ackerlar commented 3 years ago

Describe the bug I know this already has been an issue but I could not find a working solution for me. When I try to compile pism-github1.2.1 on mistral, I get the following error:

When I run esm_master comp-pism-github1.2.1 using esm_tools on release:

[ 16%] Building CXX object src/coupler/CMakeFiles/boundary.dir/frontalmelt/Constant.cc.o
cd /pf/a/a270124/pism-github1.2.1/build/src/coupler && /sw/rhel6-x64/intel/impi/2018.5.288/compilers_and_libraries/linux/mpi/bin64/mpiicpc   -I/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-parallel-impi-intel14/include -I/sw/rhel6-x64/util/udunits-2.2.26-gcc64/include -I/sw/rhel6-x64/numerics/fftw-3.3.7-openmp-gcc64/include -I/sw/rhel6-x64/numerics/PETSc-3.12.2-impi2018-intel18/include -I/pf/a/a270124/pism-github1.2.1/build  -std=c++11 -O3 -fp-model precise -no-fast-transcendentals -march=native -O2 -g -DNDEBUG   -fPIC -std=c++11 -o CMakeFiles/boundary.dir/frontalmelt/Constant.cc.o -c /pf/a/a270124/pism-github1.2.1/src/coupler/frontalmelt/Constant.cc
/pf/a/a270124/pism-github1.2.1/src/coupler/frontalmelt/FrontalMelt.cc(126): error: no instance of constructor "pism::frontalmelt::FrontalMelt::FrontalMelt" matches the argument list
            argument types are: (pism::IceGrid::ConstPtr, std::nullptr_t)
    : FrontalMelt(g, nullptr) {
                 ^
/pf/a/a270124/pism-github1.2.1/build/pism/coupler/FrontalMelt.hh(46): note: this candidate was rejected because mismatch in count of arguments
  class FrontalMelt : public Component {
        ^
/pf/a/a270124/pism-github1.2.1/src/coupler/frontalmelt/FrontalMelt.cc(125): note: this candidate was rejected because mismatch in count of arguments
  FrontalMelt::FrontalMelt(IceGrid::ConstPtr g)
               ^
/pf/a/a270124/pism-github1.2.1/src/coupler/frontalmelt/FrontalMelt.cc(114): note: this candidate was rejected because arguments do not match
  FrontalMelt::FrontalMelt(IceGrid::ConstPtr g, std::shared_ptr<FrontalMelt> input)
               ^

compilation aborted for /pf/a/a270124/pism-github1.2.1/src/coupler/frontalmelt/FrontalMelt.cc (code 2)
make[2]: *** [src/coupler/CMakeFiles/boundary.dir/frontalmelt/FrontalMelt.cc.o] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/mnt/lustre01/pf/a/a270124/pism-github1.2.1/build'
make[1]: *** [src/coupler/CMakeFiles/boundary.dir/all] Error 2
make[1]: Leaving directory `/mnt/lustre01/pf/a/a270124/pism-github1.2.1/build'
make: *** [all] Error 2
Traceback (most recent call last):
  File "/pf/a/a270124/.local/bin/esm_master", line 8, in <module>
    sys.exit(main())
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/cli.py", line 103, in main
    main_flow(parsed_args, target)
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/esm_master.py", line 84, in main_flow
    user_task.execute(ignore_errors) #env)
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/task.py", line 492, in execute
    shell=(command.startswith("./") and command.endswith(".sh")),
  File "/sw/rhel6-x64/conda/anaconda3-bleeding_edge/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['./comp-pism-github1.2.1_script.sh']' returned non-zero exit status 2.

When I apply the changes from hotfix/mistral_pism branch, I get this error:

[ 32%] Building CXX object src/coupler/CMakeFiles/boundary.dir/surface/EISMINTII.cc.o
cd /pf/a/a270124/pism-github1.2.1/build/src/coupler && /sw/rhel6-x64/intel/impi/2018.5.288/compilers_and_libraries/linux/mpi/bin64/mpiicpc   -I/sw/rhel6-x64/netcdf/netcdf_c-4.4.1.1-parallel-impi-intel14/include -I/sw/rhel6-x64/util/udunits-2.2.26-gcc64/include -I/sw/rhel6-x64/numerics/fftw-3.3.7-openmp-gcc64/include -I/sw/rhel6-x64/numerics/PETSc-3.12.2-impi2018-intel18/include -I/pf/a/a270124/pism-github1.2.1/build  -std=c++11 -O3 -fp-model precise -no-fast-transcendentals -march=native -gcc-name=/sw/rhel6-x64/gcc/gcc-6.4.0/bin/gcc -gxx-name=/sw/rhel6-x64/gcc/gcc-6.4.0/bin/g++ -O2 -g -DNDEBUG   -fPIC -std=c++11 -o CMakeFiles/boundary.dir/surface/EISMINTII.cc.o -c /pf/a/a270124/pism-github1.2.1/src/coupler/surface/EISMINTII.cc
make[2]: Leaving directory `/mnt/lustre01/pf/a/a270124/pism-github1.2.1/build'
[ 32%] Built target boundary
make[1]: Leaving directory `/mnt/lustre01/pf/a/a270124/pism-github1.2.1/build'
make: *** [all] Error 2
Traceback (most recent call last):
  File "/pf/a/a270124/.local/bin/esm_master", line 8, in <module>
    sys.exit(main())
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/cli.py", line 103, in main
    main_flow(parsed_args, target)
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/esm_master.py", line 84, in main_flow
    user_task.execute(ignore_errors) #env)
  File "/pf/a/a270124/.local/lib/python3.6/site-packages/esm_master/task.py", line 492, in execute
    shell=(command.startswith("./") and command.endswith(".sh")),
  File "/sw/rhel6-x64/conda/anaconda3-bleeding_edge/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['./comp-pism-github1.2.1_script.sh']' returned non-zero exit status 2.

System (please complete the following information):

pgierz commented 3 years ago

To refresh my memory, the hot fix pism branch was mine I did sometime in spring, right?

I'll have another look at the build tomorrow. In the very worst case, we just build pism somehow by hand and bind it in. Although that might induce runtime incompatibilities. I'll put it on my todo list.

ackerlar commented 3 years ago

@pgierz Yes, here is the pull request #276

ackerlar commented 3 years ago

I managed to compile a running PISM with the preinstalled dependencies. However, I used my own script (/pf/a/a270124/pism_build_sebastian02/BuildPismMistral.sh) for compiling and I had to use a different gcc version in configs/machines/mistral.yaml:

165 LD_LIBRARY_PATH[(1)]: /sw/spack-rhel6/gcc-9.1.0-lsnsye/lib64:$LD_LIBRARY_PATH

and

165 LD_LIBRARY_PATH[(1)]: /sw/rhel6-x64/gcc/gcc-5.1.0/lib64:$LD_LIBRARY_PATH

seem to work.

I am trying to include the building settings into esm_tools

denizural commented 3 years ago

Hi @ackerlar, when you build PISM can you also redirect the output with &>. Sometimes models fully compile but there are warning messages which say that there can be runtime issues.

pgierz commented 3 years ago

Alright, my own two cents: I am also able to build a PISM reliably one mistral, but with self-made scripts. @ackerlar, it sounds like you and I are currently in the middle of doing the same thing.

I would recommend the following:

Thoughts? Comments?

ackerlar commented 3 years ago

@denizural a log file is here /pf/a/a270124/pism_build_sebastian02/build_pism.48828.log. Except for:

CMake Warning:
  Manually-specified variables were not used by the project:

    Pism_USE_PARALLEL_HDF5

I cannot find any warning. However, I guess this warning shouldn't occur?

@pgierz sounds good! I will do some test runs and keep you updated.

ackerlar commented 2 years ago

solved in #547