Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sbalzarini Lab
S
Software
P
Parallel Computing
OpenFPM
openfpm_pdata
Commits
49f7ef9c
Commit
49f7ef9c
authored
Jun 16, 2020
by
incardon
Browse files
merging with master
parents
d0fb3919
34449ccd
Changes
15
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
49f7ef9c
...
...
@@ -7,6 +7,10 @@ endif ()
enable_testing
()
if
(
POLICY CMP0074
)
cmake_policy
(
SET CMP0074 NEW
)
endif
()
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_CURRENT_LIST_DIR
}
/cmake_modules/
)
set
(
BOOST_INCLUDE
${
Boost_INCLUDE_DIR
}
CACHE PATH
"Include directory for BOOST"
)
...
...
@@ -208,6 +212,7 @@ file(WRITE cuda_lib "${CUDA_cudart_static_LIBRARY} ${CUDA_cudadevrt_LIBRARY}")
file
(
WRITE cuda_include
"-I
${
CUDA_INCLUDE_DIRS
}
"
)
file
(
WRITE mpi_include
"-I
${
MPI_C_INCLUDE_DIRS
}
"
)
file
(
WRITE mpi_libs
"
${
MPI_C_LINK_FLAGS
}
${
MPI_C_LIBRARIES
}
"
)
file
(
WRITE cuda_suppress_wr
"
${
WARNING_SUPPRESSION_AND_OPTION_NVCC_TEXT
}
"
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/config/config_cmake.h.in
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/config/config.h
)
...
...
Jenkinsfile_numerics_mpi
View file @
49f7ef9c
...
...
@@ -29,13 +29,16 @@ parallel (
stage
(
'run centos'
)
{
parallel
(
"1"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
},
"2"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
},
"3"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 3 0 0 numerics"
},
"4"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 4 0 0 numerics"
}
)
timeout
(
30
)
{
parallel
(
"1"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
},
"2"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
},
"3"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 3 0 0 numerics"
},
"4"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 4 0 0 numerics"
}
)
sh
"./success.sh 2 gin openfpm_numerics"
}
}
}
},
...
...
@@ -70,9 +73,12 @@ parallel (
stage
(
'run mac'
)
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
sh
"./success.sh 2 sbalzarini-mac-15 openfpm_numerics"
timeout
(
30
)
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
sh
"./success.sh 2 sbalzarini-mac-15 openfpm_numerics"
}
}
}
},
...
...
@@ -104,13 +110,16 @@ parallel (
stage
(
'run ubuntu'
)
{
parallel
(
"1"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
},
"2"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
},
"3"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 3 0 0 numerics"
},
"4"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 4 0 0 numerics"
}
)
sh
"./success.sh 2 gin openfpm_numerics"
timeout
(
30
)
{
parallel
(
"1"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 1 0 0 numerics"
},
"2"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 2 0 0 numerics"
},
"3"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 3 0 0 numerics"
},
"4"
:
{
sh
"cd openfpm_numerics && ./run.sh $WORKSPACE $NODE_NAME 4 0 0 numerics"
}
)
sh
"./success.sh 2 gin openfpm_numerics"
}
}
}
}
...
...
configure
View file @
49f7ef9c
#!/bin/sh
#!/bin/
ba
sh
# configure script
#
#
...
...
@@ -126,6 +126,8 @@ if [ ! -d "build" ]; then
mkdir
build
fi
echo
"/usr/local"
>
install_dir
##### Go over all options
for
ac_option
do
...
...
example/Vector/1_gpu_first_step/main.cu
View file @
49f7ef9c
...
...
@@ -112,6 +112,9 @@
#define OPENMPI
//! \cond [using_openmpi] \endcond
//#define SCAN_WITH_CUB <------ MODERNGPU is broken on RTX use CUB library for scan
//#define EXTERNAL_SET_GPU <----- In case you want to distribute the GPUs differently from the default
#include "Vector/vector_dist.hpp"
//! \cond [kernel_translate_fill_prop] \endcond
...
...
@@ -139,6 +142,20 @@ __global__ void translate_fill_prop(vector_type vd)
int
main
(
int
argc
,
char
*
argv
[])
{
// OpenFPM GPU distribution
// OpenFPM by default select GPU 0 for process 0, gpu 1 for process 1 and so on ... . In case of multi-node is the same each node has
// has a group of processes and these group of processes are distributed across the available GPU on that node.
// If you want to override this behaviour use #define EXTERNAL_SET_GPU at the very beginning of the program and use
// cudaSetDevice to select the GPU for that particular process before openfpm_init
// Note: To get the process number do MPI_Init and and use the MPI_Comm_rank. VCluster is not available before openfpm_init
// A code snippet in case we want to skip GPU 0
// MPI_Init(&argc,&argv);
// int rank;
// MPI_Comm_rank(MPI_COMM_WORLD,&rank);
// cudaSetDevice(1+rank);
//! \cond [cpu_like_gpu] \endcond
// initialize the library
...
...
example/Vector/7_SPH_dlb/main.cpp
View file @
49f7ef9c
...
...
@@ -949,7 +949,7 @@ inline void sensor_pressure(Vector & vd,
}
// Get the position of the neighborhood particle q
Point
<
3
,
double
>
xq
=
vd
.
template
getPos
(
q
);
Point
<
3
,
double
>
xq
=
vd
.
getPos
(
q
);
// Calculate the contribution of the particle to the pressure
// of the probe
...
...
example/Vector/7_SPH_dlb_gpu_opt/main.cu
View file @
49f7ef9c
...
...
@@ -40,11 +40,13 @@
#ifdef __NVCC__
#define PRINT_STACKTRACE
#define STOP_ON_ERROR
//
#define STOP_ON_ERROR
#define OPENMPI
//#define SE_CLASS1
//#define USE_LOW_REGISTER_ITERATOR
//#define SCAN_WITH_CUB <------ In case you want to use CUB for scan operations
//#define EXTERNAL_SET_GPU <----- In case you want to distribute the GPUs differently from the default
#include "Vector/vector_dist.hpp"
#include <math.h>
...
...
@@ -701,6 +703,20 @@ inline void sensor_pressure(Vector & vd,
int
main
(
int
argc
,
char
*
argv
[])
{
// OpenFPM GPU distribution
// OpenFPM by default select GPU 0 for process 0, gpu 1 for process 1 and so on ... . In case of multi-node is the same each node has
// has a group of processes and these group of processes are distributed across the available GPU on that node.
// If you want to override this behaviour use #define EXTERNAL_SET_GPU at the very beginning of the program and use
// cudaSetDevice to select the GPU for that particular process before openfpm_init
// Note: To get the process number do MPI_Init and and use the MPI_Comm_rank. VCluster is not available before openfpm_init
// A code snippet in case we want to skip GPU 0
// MPI_Init(&argc,&argv);
// int rank;
// MPI_Comm_rank(MPI_COMM_WORLD,&rank);
// cudaSetDevice(1+rank);
// initialize the library
openfpm_init
(
&
argc
,
&
argv
);
...
...
images/CMakeLists.txt
View file @
49f7ef9c
...
...
@@ -39,32 +39,32 @@ include_directories (${LIBHILBERT_INCLUDE_DIRS})
target_link_libraries
(
cart_dec
${
Boost_LIBRARIES
}
)
target_link_libraries
(
cart_dec -L
${
PARMETIS_ROOT
}
/lib parmetis
)
target_link_libraries
(
cart_dec -L
${
METIS_ROOT
}
/lib metis
)
target_link_libraries
(
cart_dec -L
${
HDF5_ROOT
}
/lib hdf5 hdf5_hl
)
#
target_link_libraries(cart_dec ${HDF5_LIBRARIES})
#
target_link_libraries(cart_dec -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries
(
cart_dec
${
HDF5_LIBRARIES
}
)
target_link_libraries
(
cart_dec -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
cart_dec
${
MPI_C_LIBRARIES
}
)
target_link_libraries
(
metis_dec
${
Boost_LIBRARIES
}
)
target_link_libraries
(
metis_dec -L
${
PARMETIS_ROOT
}
/lib parmetis
)
target_link_libraries
(
metis_dec -L
${
METIS_ROOT
}
/lib metis
)
target_link_libraries
(
metis_dec -L
${
HDF5_ROOT
}
/lib hdf5 hdf5_hl
)
#
target_link_libraries(metis_dec ${HDF5_LIBRARIES})
#
target_link_libraries(metis_dec -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries
(
metis_dec
${
HDF5_LIBRARIES
}
)
target_link_libraries
(
metis_dec -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
metis_dec
${
MPI_C_LIBRARIES
}
)
target_link_libraries
(
dom_box
${
Boost_LIBRARIES
}
)
target_link_libraries
(
dom_box -L
${
PARMETIS_ROOT
}
/lib parmetis
)
target_link_libraries
(
dom_box -L
${
METIS_ROOT
}
/lib metis
)
target_link_libraries
(
dom_box -L
${
HDF5_ROOT
}
/lib hdf5 hdf5_hl
)
#
target_link_libraries(dom_box ${HDF5_LIBRARIES})
#
target_link_libraries(dom_box -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries
(
dom_box
${
HDF5_LIBRARIES
}
)
target_link_libraries
(
dom_box -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
dom_box
${
MPI_C_LIBRARIES
}
)
target_link_libraries
(
vector_dist
${
Boost_LIBRARIES
}
)
target_link_libraries
(
vector_dist -L
${
PARMETIS_ROOT
}
/lib parmetis
)
target_link_libraries
(
vector_dist -L
${
METIS_ROOT
}
/lib metis
)
target_link_libraries
(
vector_dist -L
${
HDF5_ROOT
}
/lib hdf5 hdf5_hl
)
#
target_link_libraries(vector_dist ${HDF5_LIBRARIES})
#
target_link_libraries(vector_dist -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries
(
vector_dist
${
HDF5_LIBRARIES
}
)
target_link_libraries
(
vector_dist -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
vector_dist
${
MPI_C_LIBRARIES
}
)
...
...
install
View file @
49f7ef9c
...
...
@@ -434,7 +434,12 @@ else
echo
"LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc
$lin_alg_lib
-ldl"
>>
example.mk
echo
"LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert -lVc
$lin_alg_lib
"
>>
example.mk
fi
<<<<<<
< HEAD
echo
"INCLUDE_PATH_NVCC=-Xcompiler="
-Wno-deprecated-declarations
"
$(
cat
openmp_flags
)
"
$(
cat
cuda_options
)
" -I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/PARMETIS/include -I
$i_dir
/BOOST/include -I
$i_dir
/HDF5/include -I
$i_dir
/LIBHILBERT/include
$lin_alg_inc
"
>>
example.mk
=======
sup_cuda_wr
=
$(
cat
cuda_suppress_wr
)
echo
"INCLUDE_PATH_NVCC=-Xcompiler="
-Wno-deprecated-declarations
"
$(
cat
openmp_flags
)
$sup_cuda_wr
--expt-extended-lambda -I. -I
$install_base
/openfpm_numerics/include -I
$install_base
/openfpm_pdata/include/config -I
$install_base
/openfpm_pdata/include -I
$install_base
/openfpm_data/include -I
$install_base
/openfpm_vcluster/include -I
$install_base
/openfpm_io/include -I
$install_base
/openfpm_devices/include -I
$i_dir
/METIS/include -I
$i_dir
/PARMETIS/include -I
$i_dir
/BOOST/include -I
$i_dir
/HDF5/include -I
$i_dir
/LIBHILBERT/include
$lin_alg_inc
"
>>
example.mk
>>>>>>>
master
cp
example.mk src/example.mk
cp
example.mk example/example.mk
...
...
script/update_openfpm
View file @
49f7ef9c
#! /bin/bash
source script/show_solutions
...
...
@@ -46,7 +45,7 @@ function update_openfpm()
git stash -u
git submodule foreach 'git stash'
git pull origin master
git pull
--no-edit
origin master
else
#### New version require new version of CMAKE
...
...
@@ -89,26 +88,33 @@ function update_openfpm()
if [ x"$1" == x"update" -a x"$force_up" == x"" ]; then
source $HOME/openfpm_vars
sh autogen.sh
./config.status
# Reconfigure
conf_command=$(cat config.log)
$conf_command
if [ $? -ne 0 ]; then
echo -e "Update summary\033[91;5;1m FAILED \033[0m"
return
fi
make
if [ $? -ne 0 ]; then
echo -e "Update summary\033[91;5;1m FAILED \033[0m"
return
else
echo -e "Update summary\033[92;5;1m SUCCEED \033[0m"
echo -e "To make the update active do: \033[1m make install \033[0m"
return
fi
else
#### Remove .deps for fresh install
./install $dir_prev_inst $for_opt
if [ $? -ne 0 ]; then
echo -e "Upgrade summary\033[91;5;1m FAILED \033[0m"
return
else
echo -e "Upgrade summary\033[92;5;1m SUCCEED \033[0m"
echo -e "To make the upgrade active do: \033[1m make install \033[0m"
rm force_upgrade
return
fi
fi
...
...
src/CMakeLists.txt
View file @
49f7ef9c
...
...
@@ -91,7 +91,7 @@ target_include_directories (pdata PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries
(
pdata
${
Boost_LIBRARIES
}
)
target_link_libraries
(
pdata
${
PARMETIS_LIBRARIES
}
)
target_link_libraries
(
pdata -L
${
METIS_ROOT
}
/lib metis
)
target_link_libraries
(
pdata
-L
${
HDF5_
ROOT
}
/lib hdf5 hdf5_hl
)
target_link_libraries
(
pdata
${
HDF5_
LIBRARIES
}
)
target_link_libraries
(
pdata -L
${
LIBHILBERT_LIBRARY_DIRS
}
${
LIBHILBERT_LIBRARIES
}
)
target_link_libraries
(
pdata
${
PETSC_LIBRARIES
}
)
target_link_libraries
(
pdata
${
Vc_LIBRARIES
}
)
...
...
src/Vector/cuda/vector_dist_cuda_func_test.cu
View file @
49f7ef9c
...
...
@@ -11,6 +11,7 @@
#include "util/cuda/scan_cuda.cuh"
#include "util/cuda/moderngpu/kernel_scan.hxx"
#include "Vector/vector_dist.hpp"
#include "util/cuda/scan_ofp.cuh"
#define SUB_UNIT_FACTOR 1024
...
...
src/Vector/tests/vector_dist_cell_list_tests.cpp
View file @
49f7ef9c
...
...
@@ -1991,9 +1991,9 @@ void test_vector_dist_particle_NN_MP_iteration()
{
auto
key
=
it
.
get
();
vd
.
template
getPosWrite
(
key
)[
0
]
=
ud
(
eg
);
vd
.
template
getPosWrite
(
key
)[
1
]
=
ud
(
eg
);
vd
.
template
getPosWrite
(
key
)[
2
]
=
ud
(
eg
);
vd
.
getPosWrite
(
key
)[
0
]
=
ud
(
eg
);
vd
.
getPosWrite
(
key
)[
1
]
=
ud
(
eg
);
vd
.
getPosWrite
(
key
)[
2
]
=
ud
(
eg
);
// Fill some properties randomly
...
...
src/Vector/vector_dist_comm.hpp
View file @
49f7ef9c
...
...
@@ -19,6 +19,7 @@
#include "Vector/util/vector_dist_funcs.hpp"
#include "cuda/vector_dist_comm_util_funcs.cuh"
#include "util/cuda/scan_ofp.cuh"
constexpr
int
NO_POSITION
=
1
;
constexpr
int
WITH_POSITION
=
2
;
...
...
update
View file @
49f7ef9c
http://openfpm.mpi-cbg.de/upload/update_
11
0
http://openfpm.mpi-cbg.de/upload/update_
20
0
upgrade
View file @
49f7ef9c
openfpm.mpi-cbg.de/upload/upgrade_
1
10
openfpm.mpi-cbg.de/upload/upgrade_
2
10
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment