denisbertini / mpi-sdf2opmd

SDF to openPMD compliant format via openpmd-api interface
GNU General Public License v3.0
7 stars 0 forks source link

Installation troubles #1

Closed jhornung-gh closed 1 year ago

jhornung-gh commented 1 year ago

Hi,

I have some difficulties with the installation. Step by step I am

This results in the output attachment_1

This results in the following output and error attachment_2

I also attached the CMake Error and Output files.

CMakeOutput.log CMakeError.log

Am I doing something wrong?

Thanks,

Johannes

denisbertini commented 1 year ago

On centos7 submit machine lxbk0596 ( should be the same for any centos7 submit node on virgo) Commands:


dbertini@lxbk0596:~/gsi_git/mpi-sdf2opmd > . ./setup_mpi.sh -c gcc8
selected compiler = gcc8
selected vae: centos7
loading spack gcc v8 + openmpi v3.1...
General setup ->
gcc is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gcc
mpicc is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/bin/mpicc
python is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/python-3.8.12-27khn6eagb3ieg2mfelcpnczrdpd25bg/bin/python
Epoch setup ->
epoch1d is /lustre/rz/dbertini/plasma/epoch_dev/epoch1d/bin/epoch1d
epoch2d is /lustre/rz/dbertini/plasma/epoch_dev/epoch2d/bin/epoch2d
epoch3d is /lustre/rz/dbertini/plasma/epoch_dev/epoch3d/bin/epoch3d

and

dbertini@lxbk0596:~/gsi_git/mpi-sdf2opmd > cd ../ 
dbertini@lxbk0596:~/gsi_git > mkdir build_test
dbertini@lxbk0596:~/gsi_git > cd build_test
dbertini@lxbk0596:~/gsi_git/build_test > cmake ../mpi-sdf2opmd
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- The Fortran compiler identification is GNU 8.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gfortran - skipped
-- Checking whether /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gfortran supports Fortran 90
-- Checking whether /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gfortran supports Fortran 90 - yes
-- Found MPI_C: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/lib/libmpi.so (found version "3.1") 
-- Found MPI_CXX: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/lib/libmpi_cxx.so (found version "3.1") 
-- Found MPI_Fortran: /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/lib/libmpi_usempif08.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- MPI_INCLUDE_PATH : /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/include
-- C++ compiler is : /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/g++
-- C++ compiler Flags are : -fPIC -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -Wextra -std=c++17 -g
-- C++ compiler identification is : GNU
-- EPOCH     PATH is : /lustre/rz/dbertini/plasma/epoch_dev
-- EPOCH SDF PATH is : /lustre/rz/dbertini/plasma/epoch_dev/SDF/FORTRAN
-- MPI_INCLUDE_PATH : /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/include
-- ROOT_INCLUDE_PATH : 
-- C++ compiler is : /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/g++
-- C++ compiler Flags are : -fPIC -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -Wextra -std=c++17 -g
-- C++ compiler identification is : GNU
-- EPOCH     PATH is : /lustre/rz/dbertini/plasma/epoch_dev
-- EPOCH SDF PATH is : /lustre/rz/dbertini/plasma/epoch_dev/SDF/FORTRAN
-- Found HDF5: hdf5-shared (found version "1.10.7")  
-- Found ADIOS2: /lustre/rz/dbertini/soft/adios2/lib64/cmake/adios2/adios2-config.cmake (found version "2.8.3") found components: C CXX Fortran MPI 
-- Configuring done
-- Generating done
-- Build files have been written to: /u/dbertini/gsi_git/build_test

So could you cross-check your build using . ./setup_mpi.sh -c gcc8 instead ?

denisbertini commented 1 year ago

BTW trying without source the setup script ( ./setup_mpi.sh -c gcc8) gives me immediately the following problem:

dbertini@lxbk0595:~/gsi_git/mpi-sdf2opmd > ./setup_mpi.sh -c gcc8
selected compiler = gcc8
selected vae: centos7
loading spack gcc v8 + openmpi v3.1...
General setup ->
gcc is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-x86_64/gcc-4.8.5/gcc-8.1.0-nswpump2zjkpne3ipmxkqt75dq6s2g7w/bin/gcc
mpicc is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/openmpi-3.1.6-mzgrfwlfj5it47wjcnz7el56ttf6rour/bin/mpicc
python is /cvmfs/vae.gsi.de/centos7/spack-0.17/opt/linux-centos7-zen/gcc-8.1.0/python-3.8.12-27khn6eagb3ieg2mfelcpnczrdpd25bg/bin/python
Epoch setup ->
epoch1d is /lustre/rz/dbertini/plasma/epoch_dev/epoch1d/bin/epoch1d
epoch2d is /lustre/rz/dbertini/plasma/epoch_dev/epoch2d/bin/epoch2d
epoch3d is /lustre/rz/dbertini/plasma/epoch_dev/epoch3d/bin/epoch3d
dbertini@lxbk0595:~/gsi_git/mpi-sdf2opmd > ls
CMakeLists.txt  LICENSE  README.md  sdf2opmd_1d/  sdf2opmd_2d/  sdf2opmd_3d/  setup_mpi.sh*
dbertini@lxbk0595:~/gsi_git/mpi-sdf2opmd > cd .. 
dbertini@lxbk0595:~/gsi_git > mkdir build-test
dbertini@lxbk0595:~/gsi_git > cd build-test/
dbertini@lxbk0595:~/gsi_git/build-test > cmake ../mpi-sdf2opmd
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.2 or higher is required.  You are running version 2.8.12.2

-- Configuring incomplete, errors occurred!

I am wondering why in you case you do not see the CMake version problem, user-defined profile ?

jhornung-gh commented 1 year ago

I have this issue if I don't load the modulefiles from cvmfs.

Not sure what exactly the problem was, if it was the use of quotes for the "gcc8" or if I am not allowed to call cmake within the base folder and I have to create a build folder. Now the compilation works.

Thank you! I will try to run it after lunch.

denisbertini commented 1 year ago

great !

jhornung-gh commented 1 year ago

Hi Denis, it seems like you changed the directory of the epoch installation which affects the sdf2opmd converter. Can you tell me the path of the new "/lustre/rz/dbertini/plasma/epoch_dev" directory which I should include?

I tried to exchange it by "/lustre/rz/dbertini/plasma/epoch_git" but I only get warnings of non-existing include directories and I cannot build the fortran code using "make" in the "sdf2opmd_2d" subfolder. Running cmake on "mpi-sdf2opmd" works fine.

Cheers,

Johannes

denisbertini commented 1 year ago

Sorry for that, i recreated the link epoch_dev to

bertini@lxbk0596:/lustre/rz/dbertini/plasma > ls -al epoch_dev
lrwxrwxrwx. 1 dbertini 14 Feb 20 13:03 epoch_dev -> epoch-4.17.13//

Tell me if this works now

jhornung-gh commented 1 year ago

Unfortunately not. I tried it with "epoch_dev" and by exchanging it to "epoch-4.17.13", however I always get an error when trying to compile the fortran code. See the attached image. error_make

Running the setup_mpi.sh and performing cmake runs without errors.

denisbertini commented 1 year ago

Sorry my mistake ! Should be fixed now ! Just now, compilation ran ok:

dbertini@lxbk0596:~/gsi_git/sdf2opmd-build > make clean
dbertini@lxbk0596:~/gsi_git/sdf2opmd-build > make
[ 14%] Building Fortran object sdf2opmd_2d/CMakeFiles/SDFOPMD2D.dir/src/sdf_reader.f90.o
f951: Warning: Nonexistent include directory '/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/include' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/}' [-Wmissing-include-dirs]
f951: Warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for Fortran
[ 28%] Building Fortran object sdf2opmd_2d/CMakeFiles/SDFOPMD2D.dir/src/sdf_interface.f90.o
f951: Warning: Nonexistent include directory '/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/include' [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory '/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/}' [-Wmissing-include-dirs]
f951: Warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for Fortran
[ 42%] Linking CXX shared library libSDFOPMD2D.so
[ 42%] Built target SDFOPMD2D
[ 57%] Building CXX object sdf2opmd_2d/converter/CMakeFiles/sdf2opmd_2d.dir/sdf2opmd_2d.cxx.o
/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/converter/sdf2opmd_2d.cxx: In function 'int main(int, char**)':
/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/converter/sdf2opmd_2d.cxx:372:8: warning: unused variable 'mpi_size' [-Wunused-variable]
   auto mpi_size = static_cast<uint64_t>(mpi_s);
        ^~~~~~~~
/u/dbertini/gsi_git/mpi-sdf2opmd/sdf2opmd_2d/converter/sdf2opmd_2d.cxx:373:8: warning: unused variable 'mpi_rank' [-Wunused-variable]
   auto mpi_rank = static_cast<uint64_t>(mpi_r);
        ^~~~~~~~
[ 71%] Linking CXX executable sdf2opmd_2d
[ 71%] Built target sdf2opmd_2d
[ 85%] Building CXX object sdf2opmd_2d/reader/CMakeFiles/opmd_reader_2d.dir/opmd_reader_2d.cxx.o
[100%] Linking CXX executable opmd_reader_2d
[100%] Built target opmd_reader_2d
jhornung-gh commented 1 year ago

Thanks for the help, now it is working again :)

Cheers

denisbertini commented 1 year ago

Great !