Commit 0d524637 authored by incardon's avatar incardon

Sparse_cl mooving on

parent ee81919a
......@@ -6,7 +6,7 @@ centos_build:
paths:
- ./build/src/pdata
script:
- ./build.sh $CI_PROJECT_DIR unused pdata full $CI_COMMIT_REF_NAME
- ./build.sh $CI_PROJECT_DIR unused pdata 0 $CI_COMMIT_REF_NAME
centos_run:
stage: test
......@@ -15,8 +15,8 @@ centos_run:
dependencies:
- centos_build
script:
- ./run.sh $CI_PROJECT_DIR unused 1 pdata full $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 2 pdata full $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 1 pdata 0 $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 2 pdata 0 $CI_COMMIT_REF_NAME
#mac_build:
......@@ -46,7 +46,7 @@ ubuntu_build:
paths:
- ./build/src/pdata
script:
- ./build.sh $CI_PROJECT_DIR unused pdata full $CI_COMMIT_REF_NAME
- ./build.sh $CI_PROJECT_DIR unused pdata 0 $CI_COMMIT_REF_NAME
ubuntu_run:
stage: test
......@@ -55,6 +55,6 @@ ubuntu_run:
dependencies:
- ubuntu_build
script:
- ./run.sh $CI_PROJECT_DIR unused 1 pdata full $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 2 pdata full $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 1 pdata 0 $CI_COMMIT_REF_NAME
- ./run.sh $CI_PROJECT_DIR unused 2 pdata 0 $CI_COMMIT_REF_NAME
# Change Log
All notable changes to this project will be documented in this file.
## [2.0.0] December 2018 (Codename Elisa)
## [2.0.0] February 2018 (Codename Elisa)
### Added
......
......@@ -18,6 +18,7 @@ set(TINYOBJLOADER_ROOT CACHE PATH "TinyObjLoader library path")
set(SE_CLASS1 CACHE BOOL "Activate compilation with SE_CLASS1")
set(SE_CLASS2 CACHE BOOL "Activate compilation with SE_CLASS2")
set(SE_CLASS3 CACHE BOOL "Activate compilation with SE_CLASS3")
set(ACTION_ON_ERROR CACHE STRING "Action to perform in case of error")
set(PROFILE_WITH_SCOREP CACHE BOOL "Enable profiling with scorep")
set(ENV{PETSC_DIR} ${PETSC_ROOT})
set(ENV{HDF5_ROOT} ${HDF5_ROOT})
......@@ -44,6 +45,11 @@ if(ENABLE_GPU)
if (CUDA_VERSION_MAJOR EQUAL 9 AND CUDA_VERSION_MINOR EQUAL 2)
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda)
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 1 )
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 " --expt-extended-lambda)
else()
message(FATAL_ERROR "CUDA is incompatible, version 9.2 is only supported")
endif()
......@@ -83,6 +89,10 @@ if(SE_CLASS1)
set(DEFINE_SE_CLASS1 "#define SE_CLASS1")
endif()
if(ACTION_ON_ERROR)
set(DEFINE_ACTION_ON_ERROR "#define ${ACTION_ON_ERROR}")
endif()
if(SE_CLASS2)
set(DEFINE_SE_CLASS2 "#define SE_CLASS2")
endif()
......@@ -95,6 +105,14 @@ if(PETSC_FOUND)
set(DEFINE_HAVE_PETSC "#define HAVE_PETSC")
endif()
if(SCAN_COVERTY)
set(DEFINE_SCAN_COVERTY "#define COVERTY_SCAN")
endif()
if(TEST_PERFORMANCE)
set(DEFINE_PERFORMANCE_TEST "#define PERFORMANCE_TEST")
endif()
if(CUDA_FOUND)
set(DEFINE_CUDA_GPU "#define CUDA_GPU")
endif()
......@@ -167,6 +185,9 @@ endif()
file(WRITE error_code "0")
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}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config/config_cmake.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config/config.h)
......
......@@ -42,9 +42,17 @@ fi
if [ x"$hostname" == x"falcon1" ]; then
# rm -rf $HOME/openfpm_dependencies/openfpm_pdata/$branch/
echo "falcon1 settings"
dependency_dir=/projects/ppm/rundeck/openfpm_dependencies/
if [ x"$comp_type" == x"intel" ]; then
module load parallel_studio_xe/2019u1
mkdir $HOME/openfpm_dependencies_intel/openfpm_pdata/$branch
dependency_dir=/projects/ppm/rundeck/openfpm_dependencies_intel/
else
mkdir $HOME/openfpm_dependencies/openfpm_pdata/$branch
dependency_dir=/projects/ppm/rundeck/openfpm_dependencies/
fi
else
dependency_dir=$HOME/openfpm_dependencies/openfpm_pdata/$branch
mkdir $HOME/openfpm_dependencies/openfpm_pdata/$branch
fi
if [ x"$with_gpu" == x"1" ]; then
......@@ -73,39 +81,36 @@ installation_dir="--prefix=$HOME/openfpm_install/$branch"
#echo "StrictHostKeyChecking=no" > $HOME/.ssh/config
#chmod 600 $HOME/.ssh/config
mkdir $HOME/openfpm_dependencies/openfpm_pdata/$branch
install_options=
if [ x"$comp_type" == x"full" ]; then
echo "Installing with: ./install -i $dependency_dir -s -c \"$installation_dir\" "
./install -i $dependency_dir -s -c "$installation_dir"
make install
if [ $? -ne 0 ]; then
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$hostname failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
exit 1 ;
fi
mv $HOME/openfpm_vars $HOME/openfpm_vars_$branch
source $HOME/openfpm_vars_$branch
elif [ x"$comp_type" == x"numerics" ]; then
./install -i $dependency_dir -m -s -c "$installation_dir"
if [ $? -ne 0 ]; then
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$hostname failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
exit 1 ;
fi
mv $HOME/openfpm_vars $HOME/openfpm_vars_$branch
source $HOME/openfpm_vars_$branch
make VERBOSE=1 -j 8
install_options="-s"
elif [ x"$comp_type" == x"intel" ]; then
install_options=" "
else
echo "Installing with: ./install $gpu_support -i $dependency_dir -m -s -c \"$installation_dir --no-recursion\""
./install $gpu_support -i $dependency_dir -m -s -c "$installation_dir"
install_options="-s -m"
fi
foward_options=
if [ x"$comp_type" == x"se_class" ]; then
foward_options="--enable-se-class1 --with-action-on-error=STOP_ON_ERROR"
fi
if [ $? -ne 0 ]; then
echo "Installing with: ./install $gpu_support -i $dependency_dir $install_options -c \"$installation_dir $foward_options \" "
./install $gpu_support -i $dependency_dir $install_options -c "$installation_dir $foward_options "
if [ $? -ne 0 ]; then
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Error:\", \"color\": \"#FF0000\", \"text\":\"$hostname failed to complete the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
exit 1 ;
fi
mv $HOME/openfpm_vars $HOME/openfpm_vars_$branch
source $HOME/openfpm_vars_$branch
fi
make VERBOSE=1 -j 8
# Check of we have to do a make install
if [ x"$comp_type" == x"full" ]; then
make install
else
mv $HOME/openfpm_vars $HOME/openfpm_vars_$branch
source $HOME/openfpm_vars_$branch
make VERBOSE=1 -j 8
fi
if [ $? -ne 0 ]; then
......
......@@ -81,7 +81,7 @@ try_run(
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:STRING=${LIBHILBERT_ROOT}/include"
"-DLINK_LIBRARIES:STRING=${LIBHILBERT_ROOT}/lib"
LINK_LIBRARIES libhilbert
LINK_LIBRARIES libhilbert m
COMPILE_OUTPUT_VARIABLE LIBHILBERT_TEST_LIB_COMPILE_OUTPUT
RUN_OUTPUT_VARIABLE LIBHILBERT_TEST_LIB_OUTPUT)
......
......@@ -226,6 +226,15 @@ do
se_class3)
conf_options="$conf_options -DSE_CLASS3=ON"
;;
test_coverage)
conf_options="$conf_options -DTEST_COVERAGE=ON"
;;
scan_coverty)
conf_options="$conf_options -DSCAN_COVERTY=ON"
;;
test_performance)
conf_options="$conf_options -DTEST_PERFORMANCE=ON"
;;
gpu)
if [ x"$CXX" == x"" ]; then
conf_options="$conf_options"
......@@ -466,6 +475,9 @@ do
boost)
conf_options="$conf_options -DBOOST_ROOT=$ac_optarg"
;;
action_on_error)
conf_options="$conf_options -DACTION_ON_ERROR=$ac_optarg"
;;
mpivendor)
conf_options="$conf_options -DMPI_VENDOR=$ac_optarg"
;;
......
......@@ -10,7 +10,7 @@ OBJ = main.o
$(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
se_classes: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SE2)
all: se_classes
......
......@@ -9,8 +9,11 @@
#define SE_CLASS1
#define SE_CLASS2
// SE_CLASS2 only is unsupported, without SE_CLASS2_ONLY_TRACK
#define SE_CLASS2_ONLY_TRACK
#define SE_CLASS3
#define THROW_ON_ERROR
#define PRINT_STACKTRACE
#include "Memleak_check.hpp"
#include "Vector/vector_dist.hpp"
#include "Decomposition/CartDecomposition.hpp"
......@@ -100,7 +103,7 @@ int main(int argc, char* argv[])
vect_dist_key_dx vt(5048);
auto it = vd.getPos(vt);
}
catch (size_t e)
catch (std::exception e)
{
std::cerr << "Error notification of overflow \n";
}
......
......@@ -7,10 +7,10 @@ LDIR =
OBJ = main.o
%.o: %.cpp
$(CC) -O3 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
$(CC) -O0 -g3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
se_classes: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS_SE2)
all: se_classes
......
......@@ -14,7 +14,10 @@
#define SE_CLASS1
#define SE_CLASS2
// SE_CLASS2 is unsupported if not used in combination with SE_CLASS2_TRACK_ONLY
#define SE_CLASS2_ONLY_TRACK
#define SE_CLASS3
#define PRINT_STACKTRACE
#define THROW_ON_ERROR
#include "Memleak_check.hpp"
#include "Grid/grid_dist_id.hpp"
......@@ -80,7 +83,7 @@ int main(int argc, char* argv[])
//
if (v_cl.getProcessUnitID() == 0)
print_alloc();
{print_alloc();}
//
// ### WIKI 5 ###
......
......@@ -90,7 +90,8 @@ void init(grid_dist_id<2,double,aggregate<double> > & g_dist, const size_t (& sz
/*!
* \page Grid_2_solve_eq Solve equation
*
* Initialize to 0, domain + boundary
* Initialize to 0, domain + boundary (Careful the end of the domain is at the point -1 and the point sz, where
* sz is the grid size in that dimension )
*
* \snippet Grid/2_solve_eq/main.cpp init field zero
*
......@@ -102,8 +103,8 @@ void init(grid_dist_id<2,double,aggregate<double> > & g_dist, const size_t (& sz
//! \cond [init field zero] \endcond
if (key_g.get(0) == 0 || key_g.get(0) == sz[0] ||
key_g.get(1) == 0 || key_g.get(1) == sz[1])
if (key_g.get(0) < 0 || key_g.get(0) == sz[0] ||
key_g.get(1) < 0 || key_g.get(1) == sz[1])
{
// Boundary part
g_dist.template get<0>(key) = 0.0;
......
......@@ -365,6 +365,12 @@ int main(int argc, char* argv[])
// save in vtk binary format
vd.write("particles_bin",VTK_WRITER | FORMAT_BINARY);
// save in vtk format with time
vd.write("particles_with_time","time=1.234");
// save in vtk format with time
vd.write("particles_with_time_bin","time=1.234",VTK_WRITER | FORMAT_BINARY);
//! \cond [vtk] \endcond
/*!
......
......@@ -5,7 +5,7 @@ ifeq (, $(shell which nvcc))
CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
INCLUDE_PATH_NVCC=
else
CUDA_CC=nvcc
CUDA_CC=nvcc -ccbin=mpic++
endif
ifeq ($(PROFILE),ON)
......
[pack]
files = main.cu main_cpu.cpp Makefile
files = main_gpu.cu main_cpu.cpp main_cpu_best.cpp main_cpu.cpp Makefile
......@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o
%.o: %.cpp
$(CC) -O0 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
$(CC) -O3 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
multip: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
......@@ -9,8 +9,8 @@ ifeq (, $(shell which nvcc))
INCLUDE_PATH_NVCC=
CUDA_CC_LINK=mpic++
else
CUDA_CC=nvcc
CUDA_CC_LINK=nvcc
CUDA_CC=nvcc -ccbin=mpic++
CUDA_CC_LINK=nvcc -ccbin=mpic++
endif
CC=mpic++
......
[pack]
files = main.cpp Makefile
files = main.cu Makefile
......@@ -8,17 +8,19 @@ ifeq (, $(shell which nvcc))
CUDA_CC=mpic++ -x c++ $(INCLUDE_PATH)
INCLUDE_PATH_NVCC=
CUDA_CC_LINK=mpic++
CUDA_OPTIONS=
else
CUDA_CC=nvcc
CUDA_CC_LINK=nvcc
CUDA_CC=nvcc -ccbin=mpic++
CUDA_CC_LINK=nvcc -ccbin=mpic++
CUDA_OPTIONS=-use_fast_math -arch=sm_61 -lineinfo
endif
ifeq ($(PROFILE),ON)
CUDA_CC=scorep --nocompiler --cuda --mpp=mpi nvcc
CUDA_CC_LINK=scorep --nocompiler --cuda --mpp=mpi nvcc
else
CUDA_CC=nvcc
CUDA_CC_LINK=nvcc
CUDA_CC:=$(CUDA_CC)
CUDA_CC_LINK:=$(CUDA_CC_LINK)
endif
LDIR =
......@@ -31,7 +33,7 @@ sph_dlb_test: OPT += -DTEST_RUN
sph_dlb_test: sph_dlb
%.o: %.cu
$(CUDA_CC) -O0 -g $(OPT) -use_fast_math -arch=sm_61 -lineinfo -g -c -isystem=/home/i-bird/MPI/include --std=c++11 -o $@ $< $(INCLUDE_PATH_NVCC)
$(CUDA_CC) -O3 $(OPT) $(CUDA_OPTIONS) -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH_NVCC)
%.o: %.cpp
$(CC) -O3 $(OPT) -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH)
......@@ -39,6 +41,9 @@ sph_dlb_test: sph_dlb
sph_dlb: $(OBJ)
$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
sph_dlb2: $(OBJ)
$(CUDA_CC_LINK) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
all: sph_dlb
run: sph_dlb_test
......
[pack]
files = main.cpp Makefile
files = main.cu Makefile
......@@ -394,8 +394,8 @@ else
done
if [ x"$inst_lin_alg" == x"y" ]; then
./script/install_EIGEN.sh $i_dir $ncore
./script/install_PETSC.sh $i_dir $ncore $CC $CXX $F77 $FC
CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_EIGEN.sh $i_dir $ncore
CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_PETSC.sh $i_dir $ncore $CC $CXX $F77 $FC
fi
### collect PETSC configuration options
......@@ -407,6 +407,9 @@ fi
### Create example.mk
install_base=$(cat install_dir)
openmp_flags="$(cat openmp_flags)"
cuda_include_dirs=$(cat cuda_include)
mpi_include_dirs=$(cat mpi_include)
mpi_libs=$(cat mpi_libs)
if [ -d "$i_dir/HDF5/lib" ]; then
hdf5_lib=$i_dir/HDF5/lib
......@@ -414,14 +417,14 @@ elif [ -d "$i_dir/HDF5/lib64" ]; then
hdf5_lib=$i_dir/HDF5/lib64
fi
echo "INCLUDE_PATH=-Wno-deprecated-declarations $openmp_flags -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
echo "LIBS_PATH= $openmp_flags -L$install_base/openfpm_devices/lib -L$install_base/openfpm_pdata/lib -L$install_base/openfpm_vcluster/lib -L$i_dir/METIS/lib -L$i_dir/PARMETIS/lib -L$i_dir/BOOST/lib -L$hdf5_lib -L$i_dir/LIBHILBERT/lib $lin_alg_dir " >> example.mk
echo "INCLUDE_PATH=$cuda_include_dirs -Wno-deprecated-declarations $openmp_flags -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
echo "LIBS_PATH=$openmp_flags -L$install_base/openfpm_devices/lib -L$install_base/openfpm_pdata/lib -L$install_base/openfpm_vcluster/lib -L$i_dir/METIS/lib -L$i_dir/PARMETIS/lib -L$i_dir/BOOST/lib -L$hdf5_lib -L$i_dir/LIBHILBERT/lib $lin_alg_dir " >> example.mk
if [ x"$gpu_support" == x"1" ]; then
echo "LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert $(cat cuda_lib) $lin_alg_lib $(cat mpi_libs) -ldl" >> example.mk
echo "LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert $(cat cuda_lib) $lin_alg_lib" >> example.mk
echo "LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert $(cat cuda_lib) $lin_alg_lib -ldl" >> example.mk
echo "LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert $(cat cuda_lib) $lin_alg_lib" >> example.mk
else
echo "LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert $lin_alg_lib $(cat mpi_libs) -ldl" >> example.mk
echo "LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lhdf5 -llibhilbert $lin_alg_lib" >> example.mk
echo "LIBS=-lvcluster -lofpm_pdata -lofpmmemory -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert $lin_alg_lib -ldl" >> example.mk
echo "LIBS_SE2=-lvcluster -lofpmmemory_se2 -lparmetis -lmetis -lboost_iostreams -lboost_program_options -lhdf5 -llibhilbert $lin_alg_lib" >> example.mk
fi
echo "INCLUDE_PATH_NVCC=-Xcompiler="-Wno-deprecated-declarations" $(cat openmp_flags) -Xcudafe \"--display_error_number --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111\" --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
cp example.mk src/example.mk
......@@ -441,7 +444,7 @@ echo ""
echo -e "\033[1m ./configure $options $configure_options \033[0m "
echo ""
if [ x"$platform" = x"linux" ]; then
if [ x"$platform" == x"linux" -o x"$platform" == x"cygwin" ]; then
bash_library="export LD_LIBRARY_PATH=\"\$LD_LIBRARY_PATH:/$install_base/openfpm_devices/lib:/$install_base/openfpm_vcluster/lib"
else
bash_library="export DYLD_LIBRARY_PATH=\"\$DYLD_LIBRARY_PATH:/$install_base/openfpm_devices/lib:/$install_base/openfpm_vcluster/lib"
......@@ -457,7 +460,7 @@ echo ""
if [ -d "$i_dir/MPI" ]; then
installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m $i_dir/MPI \033[0m\n"
bash_path="$bash_path:$i_dir/MPI/bin:"
bash_path="$bash_path$i_dir/MPI/bin:"
bash_library="$bash_library:$i_dir/MPI/lib"
elif [ $MPI_System_prv -eq 1 ]; then
installation_report="$installation_report \033[92;1mMPI\033[0m Installed: \033[1m System installation \033[0m\n"
......
openfpm_data @ 94b1ef6d
Subproject commit 804ad6310e36bb777937613168f98d4c29f2f367
Subproject commit 94b1ef6d6df8ef1cdbff4025685e80222283040d
......@@ -18,7 +18,7 @@ echo "Machine: $hostname"
echo "Num of processors: $nproc"
echo "Branch: $branch"
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" ]; then
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" -o x"$hostname" == x"suitcase" ]; then
mpi_options="--oversubscribe"
fi
......
......@@ -68,7 +68,7 @@ fi
function pc_install_command() {
if [ x"$1" == x"pacman" ]; then
pc_install_command_ret="pacman -Sy"
pc_install_command_ret="pacman -Syu"
else
pc_install_command_ret="$1 install"
fi
......
......@@ -7,7 +7,7 @@ if [ -d "$1/EIGEN" ]; then
exit 0
fi
./script/install_OPENBLAS.sh $1 $2
CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_OPENBLAS.sh $1 $2
if [ ! -d "$1/OPENBLAS" ]; then
exit 1
fi
......
#! /bin/bash
source script/discover_os
discover_os
# check if the directory $1/METIS exist
if [ -d "$1/METIS" ]; then
......@@ -13,17 +16,24 @@ rm -rf metis-5.1.0
wget http://ppmcore.mpi-cbg.de/upload/metis-5.1.0.tar.gz
tar -xf metis-5.1.0.tar.gz
cd metis-5.1.0
if [ x"$platform" == x"cygwin" ]; then
shared_opt="-DSHARED=OFF"
else
shared_opt="-DSHARED=ON"
fi
cputype=$(uname -m | sed "s/\\ /_/g")
systype=$(uname -s)
BUILDDIR=build/$systype-$cputype
mkdir -p $BUILDDIR
cd $BUILDDIR
if [ "$#" -eq 4 ]; then
echo "cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS -DCMAKE_C_COMPILER=$2 -DCMAKE_CXX_COMPILER=$3"
cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS -DCMAKE_C_COMPILER=$2 -DCMAKE_CXX_COMPILER=$3
if [ "$#" -eq 4 ]; then
echo "cmake ../../. $shared_opt -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS -DCMAKE_C_COMPILER=$2 -DCMAKE_CXX_COMPILER=$3"
cmake ../../. $shared_opt -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS -DCMAKE_C_COMPILER=$2 -DCMAKE_CXX_COMPILER=$3
else
echo "cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS"
cmake ../../. -DSHARED=1 -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS
echo "cmake ../../. $shared_opt -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS"
cmake ../../. $shared_opt -DGKLIB_PATH=../../GKlib -DCMAKE_INSTALL_PREFIX=$1/METIS
fi
make -j $4
make install
......
......@@ -17,7 +17,7 @@ cd OpenBLAS-0.2.20
# configuration
make
make FC=$FC CC=$CC
mkdir $1/OPENBLAS
make install PREFIX=$1/OPENBLAS
......
......@@ -86,7 +86,7 @@ fi
### are compiled without optimization enabled, so we provide manual installation for that packages
if [ ! -d "$1/OPENBLAS" ]; then
./script/install_OPENBLAS.sh $1
CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_OPENBLAS.sh $1
if [ $? -eq 0 ]; then
configure_options="$configure_options --with-blas-lib=$1/OPENBLAS/lib/libopenblas.a --with-lapack-lib=$1/OPENBLAS/lib/libopenblas.a"
fi
......@@ -94,20 +94,22 @@ else
configure_options="$configure_options --with-blas-lib=$1/OPENBLAS/lib/libopenblas.a --with-lapack-lib=$1/OPENBLAS/lib/libopenblas.a"
fi
if [ ! -d "$1/SUITESPARSE" ]; then
if [ -d "$1/SUITESPARSE" -a -f "$1/SUITESPARSE/include/umfpack.h" ]; then
CXX="$CXX" CC="$CC" FC="$FC" F77="$F77" ./script/install_SUITESPARSE.sh $1 $2
fi
#### OK here we check if we can configure work with SUITESPARSE
echo "Testing if PETSC work with SUITESPARSE"
configure_options2="$configure_options --with-suitesparse=yes --with-suitesparse-dir=$1/SUITESPARSE "
test_configure_options
if [ $error -eq 0 ]; then
configure_options="$configure_options --with-suitesparse=yes --with-suitesparse-dir=$1/SUITESPARSE "
if [ -d "$1/SUITESPARSE" -a -f "$1/SUITESPARSE/include/umfpack.h" ]; then
echo "Testing if PETSC work with SUITESPARSE"
configure_options2="$configure_options --with-suitesparse=yes --with-suitesparse-dir=$1/SUITESPARSE "
test_configure_options
if [ $error -eq 0 ]; then
echo "SUITESPARSE work with PETSC"
configure_options="$configure_options --with-suitesparse=yes --with-suitesparse-dir=$1/SUITESPARSE "
fi
fi
configure_options="$configure_options --download-scalapack --download-mumps"
configure_options="$configure_options --download-superlu_dist"
configure_options="$configure_options --download-hypre"
......@@ -130,7 +132,11 @@ if [ x"$CXX" != x"icpc" ]; then
[ -x "$(command -v $1)" ]
}
$python_command ./configure COPTFLAGS="-O3 -g" CXXOPTFLAGS="-O3 -g" FOPTFLAGS="-O3 -g" $ldflags_petsc --with-cxx-dialect=C++11 $petsc_openmp --with-mpi-dir=$mpi_dir $configure_options --prefix=$1/PETSC --with-debugging=0
if [ x"$platform" != x"cygwin" ]; then
$python_command ./configure COPTFLAGS="-O3 -g" CXXOPTFLAGS="-O3 -g" FOPTFLAGS="-O3 -g" $ldflags_petsc --with-cxx-dialect=C++11 $petsc_openmp --with-mpi-dir=$mpi_dir $configure_options --prefix=$1/PETSC --with-debugging=0
else
echo "Sorry PETSC installation in not supported on CYGWIN"
fi
else
......
......@@ -12,6 +12,7 @@ if [ -d "$1/SUITESPARSE" -a -f "$1/SUITESPARSE/include/umfpack.h" ]; then
exit 0
fi
rm SuiteSparse-5.3.0.tar.gz
wget http://ppmcore.mpi-cbg.de/upload/SuiteSparse-5.3.0.tar.gz
rm -rf SuiteSparse
tar -xf SuiteSparse-5.3.0.tar.gz
......
......@@ -9,13 +9,17 @@ function set_mpi()
configure_options="$configure_options CXX=mpic++ "
fi
else
if [ $call_test_working_mpi_options -eq 1 ]; then
test_working_mpi_options
if [ x"$platform" == x"cygwin" ]; then
echo "We do not support installation of OpenMPI on cygwin, we assume has been preinstalled"
else
if [ $call_test_working_mpi_options -eq 1 ]; then
test_working_mpi_options
fi
./script/install_MPI.sh $1 $2 $3 $4 $5 $6 $7 "$openmpi_working_options"
fi
./script/install_MPI.sh $1 $2 $3 $4 $5 $6 $7 "$openmpi_working_options"
MPI_installed=1
export PATH="$1/MPI/bin:$PATH"
configure_options="$configure_options CXX=mpic++ --mpivendor=openmpi"
configure_options="$configure_options CXX=mpic++ --with-mpivendor=openmpi"
fi
}
......
......@@ -49,6 +49,34 @@ function update_openfpm()
git pull origin master
else
#### New version require new version of CMAKE
dgc_major=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$(cmake --version | grep "cmake version" | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
cmake_result=0
if [ $dgc_major -gt 3 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
elif [ $dgc_major -lt 3 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your cmake $dgc_major.$dgc_middle;$dgc_minor is too old, 3.8.X or higher is required"
elif [ $dgc_middle -gt 8 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
elif [ $dgc_middle -lt 8 ]; then
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your cmake $dgc_major.$dgc_middle;$dgc_minor is too old, 3.8.X or higher is required"
else
echo -e "cmake $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
cmake_result=1
fi
if [ $cmake_result -ne 0 ]; then
echo -e "Upgrade summary\033[91;5;1m FAILED \033[0m"
return
fi
rm -rf {,.[!.],..?}*
echo "Cloning Repo: $repo"
git clone $repo .
......
......@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
########################### Executables
if(CUDA_FOUND)
set(CUDA_SOURCES Vector/cuda/vector_dist_cuda_func_test.cu Decomposition/cuda/decomposition_cuda_tests.cu Vector/cuda/vector_dist_gpu_unit_tests.cu ../openfpm_devices/src/memory/CudaMemory.cu)
set(CUDA_SOURCES Vector/cuda/vector_dist_gpu_MP_tests.cu Vector/cuda/vector_dist_cuda_func_test.cu Decomposition/cuda/decomposition_cuda_tests.cu Vector/cuda/vector_dist_gpu_unit_tests.cu ../openfpm_devices/src/memory/CudaMemory.cu)
else()
set(CUDA_SOURCES)
endif()
......@@ -13,6 +13,9 @@ add_executable(pdata ${OPENFPM_INIT_FILE} ${CUDA_SOURCES} main.cpp Debug/debug_t
if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(pdata PRIVATE "-Wno-deprecated-declarations")
if (TEST_COVERAGE)
target_compile_options(pdata PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fprofile-arcs -ftest-coverage>)
endif()
endif()
......@@ -24,10 +27,16 @@ add_test(NAME pdata_4_proc COMMAND mpirun -np 4 ./pdata)
###########################
if (CUDA_FOUND)
target_compile_options(pdata PUBLIC $<$<COMPILE_LANGUAGE:CUDA>: -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda>)
target_compile_options(pdata PUBLIC $<$<COMPILE_LANGUAGE:CUDA>: ${WARNING_SUPPRESSION_AND_OPTION_NVCC}>)
target_include_directories (pdata PUBLIC ${MPI_C_INCLUDE_DIRS})
if (TEST_COVERAGE)
target_compile_options(pdata PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage">)
endif()
endif()
if(TEST_PERFORMANCE)
target_include_directories (pdata PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../openfpm_numerics/src/)
endif()
target_include_directories (pdata PUBLIC ${PARMETIS_ROOT}/include)
target_include_directories (pdata PUBLIC ${METIS_ROOT}/include)
target_include_directories (pdata PUBLIC ${CUDA_INCLUDE_DIRS})
......@@ -50,6 +59,12 @@ target_link_libraries(pdata -L${HDF5_ROOT}/lib hdf5 hdf5_hl)
target_link_libraries(pdata -L${LIBHILBERT_LIBRARY_DIRS} ${LIBHILBERT_LIBRARIES})
target_link_libraries(pdata ${PETSC_LIBRARIES})
if (TEST_COVERAGE)
target_link_libraries(pdata -lgcov --coverage)
endif()
target_include_directories (ofpm_pdata PUBLIC ${CUDA_INCLUDE_DIRS})
target_include_directories (ofpm_pdata PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories (ofpm_pdata PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../openfpm_data/src/)
......@@ -70,6 +85,11 @@ endif()
# will also build with -std=c++11