Running MPM code with Berkeley Savio

#1

Available packages from Savio:

  • cmake/3.7.2
  • tbb/2016.4.072
  • eigen/3.3.3
  • boost/1.63.0-gcc
  • gcc/6.3.0
  • clang/3.9.1

Need to install using spack:

  • hdf5
git clone https://github.com/spack/spack.git
. spack/share/spack/setup-env.sh
spack install hdf5
spack load hdf5

However, upon configuring, it says -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_HL_LIBRARYIES) (found version "1.8.18")

Any solution?

#2

Please check under what name hdf5 is installed. To do that you can do module av hdf5. This will show a long name like hdf5-1.10.3-wexfti13z or something like that, then do module load hdf5-1.10.3-wexfti13z. Before you do this make sure you do module swap hdf5. Please share the output of module av hdf5.

#3
[ezrayst@ln002 build]$ module av hdf5

--- /global/home/users/ezrayst/spack/share/spack/modules/linux-rhel7-x86_64 ----
hdf5-1.10.3-gcc-6.3.0-4uw53ra
#4

Please do module swap hdf5, before you try module load hdf5-1.10.3-gcc-6.3.0-4uw53ra

#5

Still not good…

[ezrayst@ln002 build]$ module list
Currently Loaded Modulefiles:
  1) vim/7.4                         6) boost/1.66.0
  2) emacs/25.1                      7) tbb/2016.4.072
  3) gcc/6.3.0                       8) boost/1.63.0-gcc
  4) cmake/3.7.2                     9) hdf5-1.10.3-gcc-6.3.0-4uw53ra
  5) eigen/3.3.3
[ezrayst@ln002 build]$ cmake -DC_MAKE_TYPE=Release ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
CMake Error at cmake/FindHDF5.cmake:363 (separate_arguments):
  separate_arguments given unknown argument NATIVE_COMMAND
Call Stack (most recent call first):
  cmake/FindHDF5.cmake:588 (_HDF5_parse_compile_line)
  CMakeLists.txt:50 (find_package)


-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_HL_LIBRARIES) (found version "1.8.18")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeOutput.log".
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeError.log".
[ezrayst@ln002 build]$

#6

I see you have DC_MAKE_TYPE, I’m not sure, I don’t think that’s right. It should be cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ ... Try adding the following to that -DHDF5_INCLUDE_DIR=/global/home/users/ezrayst/spack/share/spack/modules/linux-rhel7-x86_64/hdf5-1.10.3-gcc-6.3.0-4uw53ra/include. The path I have above may not be right, find the path to the include files and use that above.

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DHDF5_INCLUDE_DIR=/spack/path/to/hdf5/include ..
#7

/global/home/users/ezrayst/spack/share/spack/modules/linux-rhel7-x86_64/hdf5-1.10.3-gcc-6.3.0-4uw53ra/ is not a directory. It is like a file. I can’t access beyond this file (supposedly folder)

#8

Do spack find -p hdf5 to find where it it installed, like I said, it will depend on your machine, but in that directory you should find the include folder and link to -DHDF5_INCLUDE_DIR=/path/

#9

Not quite working… (solved, but still missing hdf5_hl.h)

[ezrayst@ln003 ~]$ cd spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include/
[ezrayst@ln003 include]$ ls
H5ACpublic.h  H5FDdirect.h  H5FDsec2.h    H5Opublic.h   H5Zpublic.h
H5Apublic.h   H5FDfamily.h  H5FDstdio.h   H5PLextern.h  H5api_adpt.h
H5Cpublic.h   H5FDlog.h     H5Fpublic.h   H5PLpublic.h  H5overflow.h
H5Dpublic.h   H5FDmpi.h     H5Gpublic.h   H5Ppublic.h   H5pubconf.h
H5Epubgen.h   H5FDmpio.h    H5Ipublic.h   H5Rpublic.h   H5public.h
H5Epublic.h   H5FDmulti.h   H5Lpublic.h   H5Spublic.h   H5version.h
H5FDcore.h    H5FDpublic.h  H5MMpublic.h  H5Tpublic.h   hdf5.h
[ezrayst@ln003 include]$ cd
[ezrayst@ln003 ~]$ cd mpm/build/
[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release .. -DHDF5_INCLUDE_DIR=../../spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include/
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
CMake Error at cmake/FindHDF5.cmake:363 (separate_arguments):
  separate_arguments given unknown argument NATIVE_COMMAND
Call Stack (most recent call first):
  cmake/FindHDF5.cmake:588 (_HDF5_parse_compile_line)
  CMakeLists.txt:50 (find_package)


-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_HL_LIBRARIES) (found version "1.8.18")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeOutput.log".
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeError.log".

#10

Tried using the available hdf5 as well. It seems that they have it somewhere…

[ezrayst@ln003 ~]$ module avail hdf5

--- /global/home/users/ezrayst/spack/share/spack/modules/linux-rhel7-x86_64 ----
hdf5-1.10.3-gcc-6.3.0-4uw53ra

--------------- /global/software/sl-7.x86_64/modfiles/gcc/6.3.0 ----------------
hdf5/1.8.18-gcc-p hdf5/1.8.18-gcc-s
[ezrayst@ln003 ~]$ module load hdf5/1.8.18-gcc-s
[ezrayst@ln003 ~]$ module load hdf5/1.8.18-gcc-p
[ezrayst@ln003 ~]$ cd mpm/build/
[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
CMake Error at cmake/FindHDF5.cmake:363 (separate_arguments):
  separate_arguments given unknown argument NATIVE_COMMAND
Call Stack (most recent call first):
  cmake/FindHDF5.cmake:588 (_HDF5_parse_compile_line)
  CMakeLists.txt:50 (find_package)


-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_HL_LIBRARIES) (found version "1.8.18")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring incomplete, errors occurred!
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeOutput.log".
See also "/global/home/users/ezrayst/mpm/build/CMakeFiles/CMakeError.log".
#11

Seems that the one from spack does not have hdf5_hl.h file, which is the high level optimization. I am not sure how to install this in spack

[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_INCLUDE_DIR=../../spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include/ ..
-- The CXX compiler identification is GNU 6.3.0
-- Check for working CXX compiler: /global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/bin/c++
-- Check for working CXX compiler: /global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found Eigen3: /global/software/sl-7.x86_64/modules/tools/eigen/3.3.3/include/eigen3 (Required is at least version "2.91.0")
-- The C compiler identification is GNU 6.3.0
-- Check for working C compiler: /global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/bin/gcc
-- Check for working C compiler: /global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find HDF5 (missing:  HDF5_LIBRARIES HDF5_INCLUDE_DIRS HDF5_HL_LIBRARIES CXX HL)
-- Found TBB: /global/software/sl-7.x86_64/modules/langs/intel/2016.4.072/tbb/include (found version "4.4")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


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

    HDF5_INCLUDE_DIR


-- Build files have been written to: /global/home/users/ezrayst/mpm/build
[ezrayst@ln003 build]$ make -j24
Scanning dependencies of target lmpm
[  2%] Building CXX object CMakeFiles/lmpm.dir/src/affine_transform.cc.o
[ 13%] Building CXX object CMakeFiles/lmpm.dir/src/material.cc.o
[ 13%] Building CXX object CMakeFiles/lmpm.dir/src/cell.cc.o
[ 13%] Building CXX object CMakeFiles/lmpm.dir/src/io.cc.o
[ 13%] Building CXX object CMakeFiles/lmpm.dir/src/logger.cc.o
[ 21%] Building CXX object CMakeFiles/lmpm.dir/src/read_mesh.cc.o
[ 26%] Building CXX object CMakeFiles/lmpm.dir/src/node.cc.o
[ 26%] Building CXX object CMakeFiles/lmpm.dir/src/particle.cc.o
[ 26%] Building CXX object CMakeFiles/lmpm.dir/src/mpm.cc.o
[ 26%] Building CXX object CMakeFiles/lmpm.dir/src/element.cc.o
In file included from /global/home/users/ezrayst/mpm/include/particle_base.h:10:0,
                 from /global/home/users/ezrayst/mpm/include/particle.h:12,
                 from /global/home/users/ezrayst/mpm/src/particle.cc:1:
/global/home/users/ezrayst/mpm/include/hdf5.h:6:21: fatal error: hdf5_hl.h: No such file or directory
 #include "hdf5_hl.h"
                     ^
compilation terminated.

...

In file included from /global/home/users/ezrayst/mpm/include/mesh.h:17:0,
                 from /global/home/users/ezrayst/mpm/include/mpm.h:13,
                 from /global/home/users/ezrayst/mpm/src/mpm.cc:5:
/global/home/users/ezrayst/mpm/include/hdf5.h:6:21: fatal error: hdf5_hl.h: No such file or directory
 #include "hdf5_hl.h"
                     ^
compilation terminated.
make[2]: *** [CMakeFiles/lmpm.dir/src/mpm.cc.o] Error 1
make[1]: *** [CMakeFiles/lmpm.dir/all] Error 2
make: *** [all] Error 2

#12

My bad, you need -DHDF5_INCLUDE_DIRS not -DHDF5_INCLUDE_DIR looking at the CMake output.

#13

For some reason it does not connect to the folder, and still we are missing hdf5_hl.h

[ezrayst@ln003 build]$ cd /global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include/
[ezrayst@ln003 include]$ ls
H5ACpublic.h  H5FDdirect.h  H5FDsec2.h    H5Opublic.h   H5Zpublic.h
H5Apublic.h   H5FDfamily.h  H5FDstdio.h   H5PLextern.h  H5api_adpt.h
H5Cpublic.h   H5FDlog.h     H5Fpublic.h   H5PLpublic.h  H5overflow.h
H5Dpublic.h   H5FDmpi.h     H5Gpublic.h   H5Ppublic.h   H5pubconf.h
H5Epubgen.h   H5FDmpio.h    H5Ipublic.h   H5Rpublic.h   H5public.h
H5Epublic.h   H5FDmulti.h   H5Lpublic.h   H5Spublic.h   H5version.h
H5FDcore.h    H5FDpublic.h  H5MMpublic.h  H5Tpublic.h   hdf5.h
[ezrayst@ln003 include]$ cd
[ezrayst@ln003 ~]$ cd mpm/build/
[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_INCLUDE_DIRS=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include/ ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Could NOT find HDF5 (missing:  HDF5_INCLUDE_DIRS) (found version "1.10.3")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /global/home/users/ezrayst/mpm/build

#14

You would also need -DHDF5_HL_LIBRARIES=/path/to/hdf5/lib/hdf5_hl.so and -DHDF5_CXX_LIBRARIES=/path/to/hdf5/lib/hdf5.so

#15

But we don’t have hdf5_hl.so and hdf5.so

#16

Run CMake with these options for HDF5

-DHDF5_INCLUDE_DIR=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include

-DHDF5_LIBRARIES=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/lib/libhdf5.so
#17

No luck yet… Tried with DIR and DIRS

[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_INCLUDE_DIR=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include -DHDF5_LIBRARIES=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/lib/libhdf5.so ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Could NOT find HDF5 (missing:  HDF5_INCLUDE_DIRS) (found version "1.10.3")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /global/home/users/ezrayst/mpm/build
[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_INCLUDE_DIRS=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include -DHDF5_LIBRARIES=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/lib/libhdf5.so ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Could NOT find HDF5 (missing:  HDF5_INCLUDE_DIRS) (found version "1.10.3")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /global/home/users/ezrayst/mpm/build
[ezrayst@ln003 build]$

#18

Please use DIRS, I can’t see errors, could you try compiling?

#19

Add -DHDF5_ROOT=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/ to your configuration.

-DHDF5_ROOT=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/
-DHDF5_INCLUDE_DIRS=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include
-DHDF5_LIBRARIES=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/lib/libhdf5.so
#20

It is still complaining about INCLUDE_DIRS. I tried both DIR and DIRS

[ezrayst@ln003 build]$ cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_ROOT=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/ -DHDF5_INCLUDE_DIRS=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/include -DHDF5_LIBRARIES=/global/home/users/ezrayst/spack/opt/spack/linux-rhel7-x86_64/gcc-6.3.0/hdf5-1.10.3-4uw53ra6nrju4tss6l3tmpkcz2itjqtw/lib/libhdf5.so ..
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Could NOT find HDF5 (missing:  HDF5_INCLUDE_DIRS) (found version "1.10.3")
CMake Warning at cmake/FindVTK.cmake:58 (find_package):
  Could not find a package configuration file provided by "VTK" with any of
  the following names:

    VTKConfig.cmake
    vtk-config.cmake

  Add the installation prefix of "VTK" to CMAKE_PREFIX_PATH or set "VTK_DIR"
  to a directory containing one of the above files.  If "VTK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:68 (find_package)


-- Configuring done
-- Generating done
-- Build files have been written to: /global/home/users/ezrayst/mpm/build