Skip to content

Commit 4114562

Browse files
committed
Catalyst Adaptor: Update configuration pipeline.
1 parent 1198879 commit 4114562

8 files changed

+43
-11
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ set(METIS_ROOT CACHE PATH "Metis root directory")
1515
set(LIBHILBERT_ROOT CACHE PATH "LibHilbert root path")
1616
set(HDF5_ROOT CACHE PATH "HDF5 root path")
1717
set(TINYOBJLOADER_ROOT CACHE PATH "TinyObjLoader library path")
18+
set(catalyst_DIR CACHE PATH "Catalyst library path")
1819
set(SE_CLASS1 CACHE BOOL "Activate compilation with SE_CLASS1")
1920
set(SE_CLASS2 CACHE BOOL "Activate compilation with SE_CLASS2")
2021
set(SE_CLASS3 CACHE BOOL "Activate compilation with SE_CLASS3")
@@ -50,6 +51,7 @@ find_package(TinyObjLoader)
5051
find_package(MPI REQUIRED)
5152
find_package(METIS)
5253
find_package(ParMETIS)
54+
find_package(catalyst 2.0)
5355

5456
if (CUDA_ON_BACKEND STREQUAL "HIP")
5557
find_package(HIP)
@@ -311,4 +313,4 @@ include(CPack)
311313

312314
cpack_add_component(OpenFPM
313315
DISPLAY_NAME OpenFPM
314-
DESCRITION OpenFPM binary files)
316+
DESCRITION OpenFPM binary files)

config/config_cmake.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ ${DEFINE_HAVE_BOOST_CONTEXT} /**/
5050
/* define if the Boost::Fiber library is available */
5151
${DEFINE_HAVE_BOOST_FIBER} /**/
5252

53+
/* Defined if you have Catalyst library */
54+
${DEFINE_HAVE_CATALYST}
55+
5356
/* Have clock time */
5457
${DEFINE_HAVE_CLOCK_GETTIME} /**/
5558

openfpm_data

script/conf_CMake.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ if [ -d "$prefix_dependencies/EIGEN" ]; then
160160
configure_options=" $configure_options -DEIGEN3_ROOT=$prefix_dependencies/EIGEN "
161161
fi
162162

163+
if [ -d "$prefix_dependencies/CATALYST/lib" ]; then
164+
configure_options=" $configure_options -Dcatalyst_DIR=$prefix_dependencies/CATALYST/lib/cmake/catalyst-2.0 "
165+
elif [ -d "$prefix_dependencies/CATALYST/lib64" ]; then
166+
configure_options=" $configure_options -Dcatalyst_DIR=$prefix_dependencies/CATALYST/lib64/cmake/catalyst-2.0 "
167+
fi
163168

164169
echo "CXX=mpic++ DYLD_LIBRARY_PATH=$ld_lib_pathopt cmake ../. $configure_options"
165-
printf "CXX=mpic++ DYLD_LIBRARY_PATH=$ld_lib_pathopt cmake ../. $configure_options" > cmake_build_options
166-
170+
printf "CXX=mpic++ DYLD_LIBRARY_PATH=$ld_lib_pathopt cmake ../. $configure_options" > cmake_build_options

script/create_env_vars.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ if [ -d "$prefix_dependencies/SUITESPARSE" -a -f "$prefix_dependencies/SUITESPA
5050
bash_library="$bash_library:$prefix_dependencies/SUITESPARSE/lib"
5151
fi
5252

53+
if [ -d "$prefix_dependencies/CATALYST/lib" ]; then
54+
bash_library="$bash_library:$prefix_dependencies/CATALYST/lib"
55+
elif [ -d "$prefix_dependencies/CATALYST/lib64" ]; then
56+
bash_library="$bash_library:$prefix_dependencies/CATALYST/lib64"
57+
fi
58+
5359
# in cygwin we have to add to PATH additional directories
5460
if [[ "$OSTYPE" == "cygwin" ]]; then
5561
bash_path="$bash_path:$prefix_dependencies/BOOST/bin:$prefix_dependencies/HDF5/bin"
@@ -62,4 +68,4 @@ bash_library="$bash_library\""
6268

6369
echo "$bash_path" > openfpm_vars
6470
echo "$bash_library" >> openfpm_vars
65-
echo "export PURE_PYTHON=1" >> openfpm_vars
71+
echo "export PURE_PYTHON=1" >> openfpm_vars

script/create_example.mk.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,19 @@ if [[ "$OSTYPE" == "linux-gnu" || "$OSTYPE" == "linux" ]]; then
5454
lin_alg_lib="$lin_alg_lib -lrt"
5555
fi
5656

57-
echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs $openmp_flags -I. -I$prefix_openfpm/openfpm_numerics/include -I$prefix_openfpm/openfpm_pdata/include/config -I$prefix_openfpm/openfpm_pdata/include -I$prefix_openfpm/openfpm_data/include -I$prefix_openfpm/openfpm_vcluster/include -I$prefix_openfpm/openfpm_io/include -I$prefix_openfpm/openfpm_devices/include -I$prefix_dependencies/VCDEVEL/include -I$prefix_dependencies/METIS/include -I$prefix_dependencies/PARMETIS/include -I$prefix_dependencies/BOOST/include -I$prefix_dependencies/HDF5/include -I$prefix_dependencies/LIBHILBERT/include $lin_alg_inc -I$prefix_dependencies/BLITZ/include -I$prefix_dependencies/ALGOIM/include -I$prefix_dependencies/SUITESPARSE/include " > example.mk
58-
echo "LIBS_PATH=$mpi_libs -L$prefix_openfpm/openfpm_devices/lib -L$prefix_openfpm/openfpm_pdata/lib -L$prefix_openfpm/openfpm_vcluster/lib -L$prefix_dependencies/VCDEVEL/lib -L$prefix_dependencies/METIS/lib -L$prefix_dependencies/PARMETIS/lib -L$prefix_dependencies/BOOST/lib $hdf5_lib_dir -L$prefix_dependencies/LIBHILBERT/lib $lin_alg_dir " >> example.mk
57+
if [ -d "$prefix_dependencies/CATALYST/lib" ]; then
58+
catalyst_lib=$prefix_dependencies/CATALYST/lib
59+
catalyst_lib_dir=-L$prefix_dependencies/CATALYST/lib
60+
elif [ -d "$prefix_dependencies/CATALYST/lib64" ]; then
61+
catalyst_lib=$prefix_dependencies/CATALYST/lib64
62+
catalyst_lib_dir=-L$prefix_dependencies/CATALYST/lib64
63+
fi
64+
65+
echo "INCLUDE_PATH=$mpi_include_dirs $cuda_include_dirs $openmp_flags -I. -I$prefix_openfpm/openfpm_numerics/include -I$prefix_openfpm/openfpm_pdata/include/config -I$prefix_openfpm/openfpm_pdata/include -I$prefix_openfpm/openfpm_data/include -I$prefix_openfpm/openfpm_vcluster/include -I$prefix_openfpm/openfpm_io/include -I$prefix_openfpm/openfpm_devices/include -I$prefix_dependencies/VCDEVEL/include -I$prefix_dependencies/METIS/include -I$prefix_dependencies/PARMETIS/include -I$prefix_dependencies/BOOST/include -I$prefix_dependencies/HDF5/include -I$prefix_dependencies/LIBHILBERT/include $lin_alg_inc -I$prefix_dependencies/BLITZ/include -I$prefix_dependencies/ALGOIM/include -I$prefix_dependencies/SUITESPARSE/include -I$prefix_dependencies/CATALYST/include/catalyst-2.0 " > example.mk
66+
echo "LIBS_PATH=$mpi_libs -L$prefix_openfpm/openfpm_devices/lib -L$prefix_openfpm/openfpm_pdata/lib -L$prefix_openfpm/openfpm_vcluster/lib -L$prefix_dependencies/VCDEVEL/lib -L$prefix_dependencies/METIS/lib -L$prefix_dependencies/PARMETIS/lib -L$prefix_dependencies/BOOST/lib $hdf5_lib_dir -L$prefix_dependencies/LIBHILBERT/lib $lin_alg_dir $catalyst_lib_dir " >> example.mk
5967
if [ x"$cuda_on_cpu" == x"YES" ]; then
6068
echo "CUDA_ON_CPU=YES" >> example.mk
6169
fi
62-
echo "LIBS=$openmp_flags $mpi_libs $openmp_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $cuda_lib $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk
63-
echo "LIBS_NVCC=-Xcompiler=$openmp_flags $mpi_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $cuda_lib $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost" >> example.mk
64-
echo "INCLUDE_PATH_NVCC=-Xcompiler=$openmp_flags "$cuda_options" $mpi_include_dirs -I. -I$prefix_openfpm/openfpm_numerics/include -I$prefix_openfpm/openfpm_pdata/include/config -I$prefix_openfpm/openfpm_pdata/include -I$prefix_openfpm/openfpm_data/include -I$prefix_openfpm/openfpm_vcluster/include -I$prefix_openfpm/openfpm_io/include -I$prefix_openfpm/openfpm_devices/include -I$prefix_dependencies/METIS/include -I$prefix_dependencies/PARMETIS/include -I$prefix_dependencies/BOOST/include -I$prefix_dependencies/HDF5/include -I$prefix_dependencies/LIBHILBERT/include $lin_alg_inc -I$prefix_dependencies/BLITZ/include -I$prefix_dependencies/ALGOIM/include -I$prefix_dependencies/SUITESPARSE/include " >> example.mk
70+
echo "LIBS=$openmp_flags $mpi_libs $openmp_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $cuda_lib $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost -lcatalyst" >> example.mk
71+
echo "LIBS_NVCC=-Xcompiler=$openmp_flags $mpi_libs -lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc $cuda_lib $lin_alg_lib -ldl -lboost_filesystem -lboost_system $optional_boost -lcatalyst" >> example.mk
72+
echo "INCLUDE_PATH_NVCC=-Xcompiler=$openmp_flags "$cuda_options" $mpi_include_dirs -I. -I$prefix_openfpm/openfpm_numerics/include -I$prefix_openfpm/openfpm_pdata/include/config -I$prefix_openfpm/openfpm_pdata/include -I$prefix_openfpm/openfpm_data/include -I$prefix_openfpm/openfpm_vcluster/include -I$prefix_openfpm/openfpm_io/include -I$prefix_openfpm/openfpm_devices/include -I$prefix_dependencies/METIS/include -I$prefix_dependencies/PARMETIS/include -I$prefix_dependencies/BOOST/include -I$prefix_dependencies/HDF5/include -I$prefix_dependencies/LIBHILBERT/include $lin_alg_inc -I$prefix_dependencies/BLITZ/include -I$prefix_dependencies/ALGOIM/include -I$prefix_dependencies/SUITESPARSE/include -I$prefix_dependencies/CATALYST/include/catalyst-2.0 " >> example.mk

script/install_CATALYST.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! /bin/bash
2+
3+
rm -rf catalyst
4+
git clone https://gitlab.kitware.com/paraview/catalyst.git
5+
cd catalyst
6+
mkdir build && cd build
7+
cmake -DCMAKE_INSTALL_PREFIX:PATH=$1/CATALYST ..
8+
make -j $2
9+
make install

0 commit comments

Comments
 (0)