Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mosaic/software/parallel-computing/openfpm/openfpm_io
  • argupta/openfpm_io
2 results
Show changes
Showing
with 55 additions and 1220 deletions
#! /bin/bash
# check if the directory $1/VCDEVEL exist
if [ -d "$1/VCDEVEL" -a -f "$1/VCDEVEL/include/Vc/Vc" ]; then
echo "VCDEVEL already installed"
exit 0
fi
wget http://ppmcore.mpi-cbg.de/upload/Vc-1.4.1.tar.gz
#rm -rf Vc
tar -xf Vc-1.4.1.tar.gz
cd Vc-1.4.1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$1/VCDEVEL -DCMAKE_C_COMPILER=$3 -DCMAKE_CXX_COMPILER=$4 ..
make
make install
#! /bin/bash
hostname=$(hostname)
branch=$3
# Make a directory in /tmp/openfpm_data
cd "openfpm_io"
echo "CHECKING MACHINE"
if [ x"$hostname" == x"cifarm-centos-node.mpi-cbg.de" ]; then
echo "CENTOS"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/HDF5/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/BOOST/lib"
fi
if [ x"$hostname" == x"cifarm-ubuntu-node" ]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/HDF5/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/BOOST/lib"
fi
if [ x"$hostname" == x"cifarm-mac-node.mpi-cbg.de" ]; then
echo "MACOS X"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/HDF5/lib"
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$HOME/openfpm_dependencies/openfpm_io/$branch/BOOST/lib"
fi
pwd
./build/src/io
#! /bin/bash
function discover_os() {
platform=unknown
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo -e "We are on\033[1;34m LINUX \033[0m"
platform=linux
elif [[ "$OSTYPE" == "linux" ]]; then
echo -e "We are on\033[1;34m LINUX \033[0m"
platform=linux
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo -e "We are on\033[1;34m MAC OSX \033[0m"
platform=osx
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo -e "We are on\033[1;34m CYGWIN \033[0m"
platform=cygwin
elif [[ "$OSTYPE" == "msys" ]]; then
echo -e "We are on\033[1;34m Microsoft Window \033[0m"
echo "This platform is not supported"
exit 1
elif [[ "$OSTYPE" == "win32" ]]; then
echo -e "We are on\033[1;34m Microsoft Window \033[0m"
echo "This platform is not supported"
exit 1
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo -e "We are on\033[1;34m FREEBSD \033[0m"
echo "This platform is not supported"
exit 1
else
echo -e "We are on an\033[1;34m unknown OS \033[0m"
echo "This platform is not supported"
exit 1
fi
}
#!/bin/bash
# check if the directory $1/MPI exist
rm -rf openmpi-4.1.1
rm openmpi-4.1.1.tar.gz
wget http://ppmcore.mpi-cbg.de/upload/openmpi-4.1.1.tar.gz
tar -xvf openmpi-4.1.1.tar.gz
...@@ -7,50 +7,45 @@ if(NOT CUDA_ON_BACKEND STREQUAL "None") ...@@ -7,50 +7,45 @@ if(NOT CUDA_ON_BACKEND STREQUAL "None")
endif() endif()
if ( CUDA_ON_BACKEND STREQUAL "HIP" AND HIP_FOUND ) if ( CUDA_ON_BACKEND STREQUAL "HIP" AND HIP_FOUND )
list(APPEND HIP_HIPCC_FLAGS ${CMAKE_CXX_FLAGS_DEBUG})
list(APPEND HIP_HIPCC_FLAGS ${CMAKE_CXX_FLAGS_DEBUG}) if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND HIP_HIPCC_FLAGS -O0)
if (CMAKE_BUILD_TYPE STREQUAL "Debug") endif()
list(APPEND HIP_HIPCC_FLAGS -O0)
endif()
# set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE}) #set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
list(APPEND HIP_HIPCC_FLAGS -D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0) list(APPEND HIP_HIPCC_FLAGS -D__NVCC__ -D__HIP__ -DCUDART_VERSION=11000 -D__CUDACC__ -D__CUDACC_VER_MAJOR__=11 -D__CUDACC_VER_MINOR__=0 -D__CUDACC_VER_BUILD__=0)
set_source_files_properties(${CUDA_SOURCES} PROPERTIES LANGUAGE CXX) set_source_files_properties(${CUDA_SOURCES} PROPERTIES LANGUAGE CXX)
hip_add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
${CUDA_SOURCES}
ObjReader/ObjReader_unit_test.cpp
CSVReader/tests/CSVReader_unit_test.cpp)
hip_add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp
${CUDA_SOURCES}
ObjReader/ObjReader_unit_test.cpp
CSVReader/tests/CSVReader_unit_test.cpp)
else() else()
add_executable(io main.cpp add_executable(io main.cpp
MetaParser/MetaParser_unit_test.cpp MetaParser/MetaParser_unit_test.cpp
${CUDA_SOURCES} ${CUDA_SOURCES}
ObjReader/ObjReader_unit_test.cpp ObjReader/ObjReader_unit_test.cpp
CSVReader/tests/CSVReader_unit_test.cpp) CSVReader/tests/CSVReader_unit_test.cpp)
set_property(TARGET io PROPERTY CUDA_ARCHITECTURES OFF) set_property(TARGET io PROPERTY CUDA_ARCHITECTURES OFF)
endif() endif()
add_dependencies(io ofpmmemory) add_dependencies(io ofpmmemory)
add_dependencies(io vcluster) add_dependencies(io vcluster)
if ( CMAKE_COMPILER_IS_GNUCC ) if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(io PRIVATE "-Wno-deprecated-declarations") target_compile_options(io PRIVATE "-Wno-deprecated-declarations")
if (TEST_COVERAGE) if (TEST_COVERAGE)
target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fprofile-arcs -ftest-coverage>) target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fprofile-arcs -ftest-coverage>)
endif() endif()
endif() endif()
if (CMAKE_CUDA_COMPILER_ID STREQUAL "Clang") if (CMAKE_CUDA_COMPILER_ID STREQUAL "Clang")
add_definitions(-D__STRICT_ANSI__) add_definitions(-D__STRICT_ANSI__)
endif() endif()
########################### ###########################
...@@ -58,12 +53,12 @@ endif() ...@@ -58,12 +53,12 @@ endif()
if (CUDA_FOUND) if (CUDA_FOUND)
target_include_directories (io PUBLIC ${MPI_C_INCLUDE_DIRS}) target_include_directories (io PUBLIC ${MPI_C_INCLUDE_DIRS})
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 ) if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 )
add_compile_options( "-fabi-version=6" ) add_compile_options( "-fabi-version=6" )
endif() endif()
if (TEST_COVERAGE) if (TEST_COVERAGE)
target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage" >) target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage" >)
endif() endif()
endif() endif()
...@@ -73,11 +68,10 @@ target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_ ...@@ -73,11 +68,10 @@ target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_vcluster/src/) target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_vcluster/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_data/src/) target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../openfpm_data/src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../src/) target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../../src/)
target_include_directories (io PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/config) target_include_directories (io PUBLIC ${CMAKE_BINARY_DIR}/config)
target_include_directories (io PUBLIC ${HDF5_ROOT}/include) target_include_directories (io PUBLIC ${HDF5_ROOT}/include)
target_include_directories (io PUBLIC ${TINYOBJLOADER_INCLUDE_DIRS} ) target_include_directories (io PUBLIC ${TINYOBJLOADER_INCLUDE_DIRS} )
target_include_directories (io PUBLIC ${Boost_INCLUDE_DIRS}) target_include_directories (io PUBLIC ${Boost_INCLUDE_DIRS})
target_include_directories (io PUBLIC ${OPENFPM_PDATA_DIR}/src)
target_include_directories (io PUBLIC ${ALPAKA_ROOT}/include) target_include_directories (io PUBLIC ${ALPAKA_ROOT}/include)
if (PETSC_FOUND) if (PETSC_FOUND)
...@@ -89,12 +83,13 @@ target_link_libraries(io ${HDF5_LIBRARIES}) ...@@ -89,12 +83,13 @@ target_link_libraries(io ${HDF5_LIBRARIES})
target_link_libraries(io ${TINYOBJLOADER_LIBRARIES} ) target_link_libraries(io ${TINYOBJLOADER_LIBRARIES} )
target_link_libraries(io vcluster) target_link_libraries(io vcluster)
target_link_libraries(io ofpmmemory) target_link_libraries(io ofpmmemory)
if (OPENMP_FOUND) if (OPENMP_FOUND)
target_link_libraries(io OpenMP::OpenMP_CXX) target_link_libraries(io OpenMP::OpenMP_CXX)
endif() endif()
if (PETSC_FOUND) if (PETSC_FOUND)
target_link_libraries(io ${PETSC_LIBRARIES}) target_link_libraries(io ${PETSC_LIBRARIES})
endif() endif()
# Request that particles be built with -std=c++11 # Request that particles be built with -std=c++11
...@@ -103,25 +98,26 @@ endif() ...@@ -103,25 +98,26 @@ endif()
target_compile_features(io PUBLIC cxx_std_11) target_compile_features(io PUBLIC cxx_std_11)
target_link_libraries(io ${MPI_C_LIBRARIES}) target_link_libraries(io ${MPI_C_LIBRARIES})
target_link_libraries(io ${MPI_CXX_LIBRARIES}) target_link_libraries(io ${MPI_CXX_LIBRARIES})
if (TEST_COVERAGE) if (TEST_COVERAGE)
target_link_libraries(io -lgcov) target_link_libraries(io -lgcov)
endif() endif()
install(FILES RawReader/RawReader.hpp install(FILES RawReader/RawReader.hpp
RawReader/RawReader_unit_tests.hpp RawReader/RawReader_unit_tests.hpp
DESTINATION openfpm_io/include/RawReader DESTINATION openfpm_io/include/RawReader
COMPONENT OpenFPM) COMPONENT OpenFPM)
install(FILES CSVWriter/csv_multiarray.hpp install(FILES CSVWriter/csv_multiarray.hpp
CSVWriter/CSVWriter.hpp CSVWriter/CSVWriter.hpp
CSVWriter/is_csv_writable.hpp CSVWriter/is_csv_writable.hpp
DESTINATION openfpm_io/include/CSVWriter/ DESTINATION openfpm_io/include/CSVWriter/
COMPONENT OpenFPM) COMPONENT OpenFPM)
install(FILES CSVReader/CSVReader.hpp install(FILES CSVReader/CSVReader.hpp
DESTINATION openfpm_io/include/CSVReader/ DESTINATION openfpm_io/include/CSVReader/
COMPONENT OpenFPM) COMPONENT OpenFPM)
install(FILES GraphMLWriter/GraphMLWriter.hpp install(FILES GraphMLWriter/GraphMLWriter.hpp
DESTINATION openfpm_io/include/GraphMLWriter DESTINATION openfpm_io/include/GraphMLWriter
COMPONENT OpenFPM) COMPONENT OpenFPM)
...@@ -131,15 +127,15 @@ install(FILES util/util.hpp util/GBoxes.hpp ...@@ -131,15 +127,15 @@ install(FILES util/util.hpp util/GBoxes.hpp
COMPONENT OpenFPM) COMPONENT OpenFPM)
install(FILES VTKWriter/VTKWriter.hpp install(FILES VTKWriter/VTKWriter.hpp
VTKWriter/byteswap_portable.hpp VTKWriter/byteswap_portable.hpp
VTKWriter/VTKWriter_dist_graph.hpp VTKWriter/VTKWriter_dist_graph.hpp
VTKWriter/VTKWriter_graph.hpp VTKWriter/VTKWriter_graph.hpp
VTKWriter/VTKWriter_point_set.hpp VTKWriter/VTKWriter_point_set.hpp
VTKWriter/VTKWriter_grids.hpp VTKWriter/VTKWriter_grids.hpp
VTKWriter/VTKWriter_grids_st.hpp VTKWriter/VTKWriter_grids_st.hpp
VTKWriter/VTKWriter_grids_util.hpp VTKWriter/VTKWriter_grids_util.hpp
VTKWriter/VTKWriter_vector_box.hpp VTKWriter/VTKWriter_vector_box.hpp
VTKWriter/is_vtk_writable.hpp VTKWriter/is_vtk_writable.hpp
DESTINATION openfpm_io/include/VTKWriter/ DESTINATION openfpm_io/include/VTKWriter/
COMPONENT OpenFPM) COMPONENT OpenFPM)
...@@ -148,11 +144,11 @@ install(FILES MetaParser/MetaParser.hpp ...@@ -148,11 +144,11 @@ install(FILES MetaParser/MetaParser.hpp
COMPONENT OpenFPM) COMPONENT OpenFPM)
install(FILES HDF5_wr/HDF5_wr.hpp install(FILES HDF5_wr/HDF5_wr.hpp
HDF5_wr/HDF5_writer.hpp HDF5_wr/HDF5_writer.hpp
HDF5_wr/HDF5_writer_vd.hpp HDF5_wr/HDF5_writer_vd.hpp
HDF5_wr/HDF5_writer_gd.hpp HDF5_wr/HDF5_writer_gd.hpp
HDF5_wr/HDF5_reader_gd.hpp HDF5_wr/HDF5_reader_gd.hpp
HDF5_wr/HDF5_reader.hpp HDF5_wr/HDF5_reader.hpp
HDF5_wr/HDF5_reader_vd.hpp HDF5_wr/HDF5_reader_vd.hpp
DESTINATION openfpm_io/include/HDF5_wr DESTINATION openfpm_io/include/HDF5_wr
COMPONENT OpenFPM) COMPONENT OpenFPM)
...@@ -169,21 +165,3 @@ install(FILES Plot/GoogleChart.hpp Plot/util.hpp ...@@ -169,21 +165,3 @@ install(FILES Plot/GoogleChart.hpp Plot/util.hpp
DESTINATION openfpm_io/include/Plot DESTINATION openfpm_io/include/Plot
COMPONENT OpenFPM) COMPONENT OpenFPM)
#if(BUILD_TESTING)
# add_executable(particle_test test.cu)
# set_target_properties(particle_test PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
# target_link_libraries(particle_test PRIVATE particles)
# add_test(NAME particles_10k COMMAND particle_test 10000 )
# add_test(NAME particles_256k COMMAND particle_test 256000 )
# if(APPLE)
# We need to add the default path to the driver (libcuda.dylib) as an rpath,
# so that the static cuda runtime can find it at runtime.
# set_property(TARGET particle_test PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
# endif()
#endif()
...@@ -8,11 +8,7 @@ ...@@ -8,11 +8,7 @@
BOOST_AUTO_TEST_SUITE(CSVReaderTestSuite) BOOST_AUTO_TEST_SUITE(CSVReaderTestSuite)
BOOST_AUTO_TEST_CASE(csv_reader_int_test) BOOST_AUTO_TEST_CASE(csv_reader_int_test)
{ {
#ifdef OPENFPM_PDATA
std::string csv_file = std::string("openfpm_io/test_data/integer.csv");
#else
std::string csv_file = std::string("test_data/integer.csv"); std::string csv_file = std::string("test_data/integer.csv");
#endif
// Read csv file into vector while linearizing // Read csv file into vector while linearizing
openfpm::vector<int> v_lin; // Vector to which csv file will be read to openfpm::vector<int> v_lin; // Vector to which csv file will be read to
size_t m, n; // Number of rows m and columns n size_t m, n; // Number of rows m and columns n
...@@ -34,11 +30,7 @@ BOOST_AUTO_TEST_CASE(csv_reader_int_test) ...@@ -34,11 +30,7 @@ BOOST_AUTO_TEST_CASE(csv_reader_int_test)
BOOST_AUTO_TEST_CASE(csv_reader_char_test) BOOST_AUTO_TEST_CASE(csv_reader_char_test)
{ {
#ifdef OPENFPM_PDATA
std::string csv_file = std::string("openfpm_io/test_data/char.csv");
#else
std::string csv_file = std::string("test_data/char.csv"); std::string csv_file = std::string("test_data/char.csv");
#endif
// Read csv file into vector while linearizing // Read csv file into vector while linearizing
openfpm::vector<std::string> v_lin; // Vector to which csv file will be read to openfpm::vector<std::string> v_lin; // Vector to which csv file will be read to
size_t m, n; // Number of rows m and columns n size_t m, n; // Number of rows m and columns n
......
...@@ -14,20 +14,9 @@ BOOST_AUTO_TEST_CASE( csv_writer_particles ) ...@@ -14,20 +14,9 @@ BOOST_AUTO_TEST_CASE( csv_writer_particles )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/csv_out_test.csv");
std::string c3 = std::string("openfpm_io/test_data/csv_out_unk_test.csv");
#else
std::string c2 = std::string("test_data/csv_out_test.csv"); std::string c2 = std::string("test_data/csv_out_test.csv");
std::string c3 = std::string("test_data/csv_out_unk_test.csv"); std::string c3 = std::string("test_data/csv_out_unk_test.csv");
#endif
{ {
// Allocate a property vector // Allocate a property vector
auto v_prp = allocate_openfpm_prp(16); auto v_prp = allocate_openfpm_prp(16);
......
...@@ -87,19 +87,9 @@ BOOST_AUTO_TEST_CASE( graphml_writer_use) ...@@ -87,19 +87,9 @@ BOOST_AUTO_TEST_CASE( graphml_writer_use)
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/test_graph2_test.graphml");
std::string c3 = std::string("openfpm_io/test_data/test_graph_test.graphml");
#else
std::string c2 = std::string("test_data/test_graph2_test.graphml"); std::string c2 = std::string("test_data/test_graph2_test.graphml");
std::string c3 = std::string("test_data/test_graph_test.graphml"); std::string c3 = std::string("test_data/test_graph_test.graphml");
#endif
Graph_CSR<ne_cp,ne_cp> g_csr2; Graph_CSR<ne_cp,ne_cp> g_csr2;
// Add 4 vertex and connect // Add 4 vertex and connect
......
...@@ -76,16 +76,8 @@ BOOST_AUTO_TEST_CASE( vector_dist_hdf5_load_test ) ...@@ -76,16 +76,8 @@ BOOST_AUTO_TEST_CASE( vector_dist_hdf5_load_test )
{ {
Vcluster<> & v_cl = create_vcluster(); Vcluster<> & v_cl = create_vcluster();
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/vector_dist_24.h5");
#else
std::string c2 = std::string("test_data/vector_dist_24.h5"); std::string c2 = std::string("test_data/vector_dist_24.h5");
#endif
openfpm::vector<Point<3,float>> vpos; openfpm::vector<Point<3,float>> vpos;
openfpm::vector<aggregate<float[dim]>> vprp; openfpm::vector<aggregate<float[dim]>> vprp;
......
...@@ -21,16 +21,8 @@ BOOST_AUTO_TEST_CASE( google_chart_bar_string ) ...@@ -21,16 +21,8 @@ BOOST_AUTO_TEST_CASE( google_chart_bar_string )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out_sc_test.html");
#else
std::string c2 = std::string("test_data/gc_out_sc_test.html"); std::string c2 = std::string("test_data/gc_out_sc_test.html");
#endif
//! [Producing an Histogram graph] //! [Producing an Histogram graph]
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
...@@ -89,16 +81,8 @@ BOOST_AUTO_TEST_CASE( google_chart ) ...@@ -89,16 +81,8 @@ BOOST_AUTO_TEST_CASE( google_chart )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out_test.html");
#else
std::string c2 = std::string("test_data/gc_out_test.html"); std::string c2 = std::string("test_data/gc_out_test.html");
#endif
//! [Producing an Histogram graph] //! [Producing an Histogram graph]
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
...@@ -155,16 +139,8 @@ BOOST_AUTO_TEST_CASE( google_chart2 ) ...@@ -155,16 +139,8 @@ BOOST_AUTO_TEST_CASE( google_chart2 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out2_test.html");
#else
std::string c2 = std::string("test_data/gc_out2_test.html"); std::string c2 = std::string("test_data/gc_out2_test.html");
#endif
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
openfpm::vector<openfpm::vector<float>> y; openfpm::vector<openfpm::vector<float>> y;
openfpm::vector<std::string> yn; openfpm::vector<std::string> yn;
...@@ -214,16 +190,8 @@ BOOST_AUTO_TEST_CASE( google_chart3 ) ...@@ -214,16 +190,8 @@ BOOST_AUTO_TEST_CASE( google_chart3 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out3_test.html");
#else
std::string c2 = std::string("test_data/gc_out3_test.html"); std::string c2 = std::string("test_data/gc_out3_test.html");
#endif
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
openfpm::vector<openfpm::vector<float>> y; openfpm::vector<openfpm::vector<float>> y;
openfpm::vector<std::string> yn; openfpm::vector<std::string> yn;
...@@ -272,16 +240,8 @@ BOOST_AUTO_TEST_CASE( google_chart4 ) ...@@ -272,16 +240,8 @@ BOOST_AUTO_TEST_CASE( google_chart4 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out4_test.html");
#else
std::string c2 = std::string("test_data/gc_out4_test.html"); std::string c2 = std::string("test_data/gc_out4_test.html");
#endif
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
openfpm::vector<openfpm::vector<float>> y; openfpm::vector<openfpm::vector<float>> y;
openfpm::vector<std::string> yn; openfpm::vector<std::string> yn;
...@@ -323,16 +283,8 @@ BOOST_AUTO_TEST_CASE( google_chart5 ) ...@@ -323,16 +283,8 @@ BOOST_AUTO_TEST_CASE( google_chart5 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out5_test.html");
#else
std::string c2 = std::string("test_data/gc_out5_test.html"); std::string c2 = std::string("test_data/gc_out5_test.html");
#endif
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
openfpm::vector<openfpm::vector<float>> y; openfpm::vector<openfpm::vector<float>> y;
...@@ -366,16 +318,8 @@ BOOST_AUTO_TEST_CASE( google_chart6 ) ...@@ -366,16 +318,8 @@ BOOST_AUTO_TEST_CASE( google_chart6 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out6_test.html");
#else
std::string c2 = std::string("test_data/gc_out6_test.html"); std::string c2 = std::string("test_data/gc_out6_test.html");
#endif
openfpm::vector<openfpm::vector<float>> y; openfpm::vector<openfpm::vector<float>> y;
// Each colums can have multiple data-set // Each colums can have multiple data-set
...@@ -401,16 +345,8 @@ BOOST_AUTO_TEST_CASE( google_chart_with_inject_HTML ) ...@@ -401,16 +345,8 @@ BOOST_AUTO_TEST_CASE( google_chart_with_inject_HTML )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_out7_test.html");
#else
std::string c2 = std::string("test_data/gc_out7_test.html"); std::string c2 = std::string("test_data/gc_out7_test.html");
#endif
//! [Producing a set of histograms graphs] //! [Producing a set of histograms graphs]
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
...@@ -474,16 +410,8 @@ BOOST_AUTO_TEST_CASE( google_chart_number ) ...@@ -474,16 +410,8 @@ BOOST_AUTO_TEST_CASE( google_chart_number )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_num_plot_test.html");
#else
std::string c2 = std::string("test_data/gc_num_plot_test.html"); std::string c2 = std::string("test_data/gc_num_plot_test.html");
#endif
//! [Producing a set of histograms graphs] //! [Producing a set of histograms graphs]
openfpm::vector<float> x; openfpm::vector<float> x;
...@@ -538,16 +466,8 @@ BOOST_AUTO_TEST_CASE( google_chart_number_lines_different_x ) ...@@ -538,16 +466,8 @@ BOOST_AUTO_TEST_CASE( google_chart_number_lines_different_x )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_num_ydif_plot_test.html");
#else
std::string c2 = std::string("test_data/gc_num_ydif_plot_test.html"); std::string c2 = std::string("test_data/gc_num_ydif_plot_test.html");
#endif
//! [Producing a set of histograms graphs] //! [Producing a set of histograms graphs]
openfpm::vector<float> x1; openfpm::vector<float> x1;
...@@ -614,16 +534,8 @@ BOOST_AUTO_TEST_CASE( google_chart_linear_plot ) ...@@ -614,16 +534,8 @@ BOOST_AUTO_TEST_CASE( google_chart_linear_plot )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_plot_out_test.html");
#else
std::string c2 = std::string("test_data/gc_plot_out_test.html"); std::string c2 = std::string("test_data/gc_plot_out_test.html");
#endif
//! [Producing lines graph with style] //! [Producing lines graph with style]
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
...@@ -691,16 +603,8 @@ BOOST_AUTO_TEST_CASE( google_chart_linear_plot2 ) ...@@ -691,16 +603,8 @@ BOOST_AUTO_TEST_CASE( google_chart_linear_plot2 )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
std::string c2 = std::string("openfpm_io/test_data/gc_plot2_out_test.html");
#else
std::string c2 = std::string("test_data/gc_plot2_out_test.html"); std::string c2 = std::string("test_data/gc_plot2_out_test.html");
#endif
//! [Producing lines] //! [Producing lines]
openfpm::vector<std::string> x; openfpm::vector<std::string> x;
......
...@@ -20,17 +20,8 @@ BOOST_AUTO_TEST_CASE( raw_reader_read_test ) ...@@ -20,17 +20,8 @@ BOOST_AUTO_TEST_CASE( raw_reader_read_test )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/raw_read_sv_test.bin");
#else
std::string c2 = std::string("test_data/raw_read_sv_test.bin"); std::string c2 = std::string("test_data/raw_read_sv_test.bin");
#endif
grid_cpu<3,aggregate<float,float[3]>> read_bin_test; grid_cpu<3,aggregate<float,float[3]>> read_bin_test;
GridRawReader<3,aggregate<float,float[3]>,int> rr; GridRawReader<3,aggregate<float,float[3]>,int> rr;
......
...@@ -223,17 +223,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D ) ...@@ -223,17 +223,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D )
// Write the VTK file // Write the VTK file
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_graph_v2_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_graph_v2_test.vtk"); std::string c2 = std::string("test_data/vtk_graph_v2_test.vtk");
#endif
VTKWriter<Graph_CSR<vertex2,edge>,VTK_GRAPH> vtk(gr); VTKWriter<Graph_CSR<vertex2,edge>,VTK_GRAPH> vtk(gr);
vtk.write("vtk_graph_v2.vtk"); vtk.write("vtk_graph_v2.vtk");
...@@ -317,17 +308,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D_edge ) ...@@ -317,17 +308,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph3D_edge )
// Write the VTK file // Write the VTK file
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_graph_v4_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_graph_v4_test.vtk"); std::string c2 = std::string("test_data/vtk_graph_v4_test.vtk");
#endif
VTKWriter<Graph_CSR<vertex2,vertex2>,VTK_GRAPH> vtk(gr); VTKWriter<Graph_CSR<vertex2,vertex2>,VTK_GRAPH> vtk(gr);
vtk.write("vtk_graph_v4.vtk"); vtk.write("vtk_graph_v4.vtk");
...@@ -420,17 +402,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph2D ) ...@@ -420,17 +402,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph2D )
// Write the VTK file // Write the VTK file
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_graph_v3_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_graph_v3_test.vtk"); std::string c2 = std::string("test_data/vtk_graph_v3_test.vtk");
#endif
VTKWriter<Graph_CSR<vertex3,edge>,VTK_GRAPH> vtk(gr); VTKWriter<Graph_CSR<vertex3,edge>,VTK_GRAPH> vtk(gr);
vtk.write("vtk_graph_v3.vtk"); vtk.write("vtk_graph_v3.vtk");
...@@ -514,17 +487,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph) ...@@ -514,17 +487,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_graph)
gr.addEdge(7,3); gr.addEdge(7,3);
gr.addEdge(3,1); gr.addEdge(3,1);
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_graph_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_graph_test.vtk"); std::string c2 = std::string("test_data/vtk_graph_test.vtk");
#endif
// Write the VTK file // Write the VTK file
VTKWriter<Graph_CSR<vertex,edge>,VTK_GRAPH> vtk(gr); VTKWriter<Graph_CSR<vertex,edge>,VTK_GRAPH> vtk(gr);
...@@ -543,21 +507,10 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_vector_box) ...@@ -543,21 +507,10 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_vector_box)
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_box_test.vtk");
std::string c3 = std::string("openfpm_io/test_data/vtk_box_3D_test.vtk");
std::string c4 = std::string("openfpm_io/test_data/vtk_box_3D_2_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_box_test.vtk"); std::string c2 = std::string("test_data/vtk_box_test.vtk");
std::string c3 = std::string("test_data/vtk_box_3D_test.vtk"); std::string c3 = std::string("test_data/vtk_box_3D_test.vtk");
std::string c4 = std::string("test_data/vtk_box_3D_2_test.vtk"); std::string c4 = std::string("test_data/vtk_box_3D_2_test.vtk");
#endif
// Create a vector of boxes // Create a vector of boxes
openfpm::vector<Box<2,float>> vb; openfpm::vector<Box<2,float>> vb;
...@@ -717,25 +670,12 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_grids) ...@@ -717,25 +670,12 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_grids)
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
{return;} {return;}
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_grids_test_1d.vtk");
std::string c3 = std::string("openfpm_io/test_data/vtk_grids_test.vtk");
std::string c4 = std::string("openfpm_io/test_data/vtk_grids_st_test.vtk");
std::string c5 = std::string("openfpm_io/test_data/vtk_grids_prp_test.vtk");
std::string c6 = std::string("openfpm_io/test_data/vtk_grids_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_grids_test_1d.vtk"); std::string c2 = std::string("test_data/vtk_grids_test_1d.vtk");
std::string c3 = std::string("test_data/vtk_grids_test.vtk"); std::string c3 = std::string("test_data/vtk_grids_test.vtk");
std::string c4 = std::string("test_data/vtk_grids_st_test.vtk"); std::string c4 = std::string("test_data/vtk_grids_st_test.vtk");
std::string c5 = std::string("test_data/vtk_grids_prp_test.vtk"); std::string c5 = std::string("test_data/vtk_grids_prp_test.vtk");
std::string c6 = std::string("test_data/vtk_grids_test.vtk"); std::string c6 = std::string("test_data/vtk_grids_test.vtk");
#endif
{ {
// Create box grids // Create box grids
...@@ -1033,21 +973,10 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set ) ...@@ -1033,21 +973,10 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_points_test.vtk");
std::string c3 = std::string("openfpm_io/test_data/vtk_points_pp_test.vtk");
std::string c4 = std::string("openfpm_io/test_data/vtk_points_pp_header_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_points_test.vtk"); std::string c2 = std::string("test_data/vtk_points_test.vtk");
std::string c3 = std::string("test_data/vtk_points_pp_test.vtk"); std::string c3 = std::string("test_data/vtk_points_pp_test.vtk");
std::string c4 = std::string("test_data/vtk_points_pp_header_test.vtk"); std::string c4 = std::string("test_data/vtk_points_pp_header_test.vtk");
#endif
{ {
// Create 3 vectors with random particles // Create 3 vectors with random particles
openfpm::vector<Point<3,double>> v1ps; openfpm::vector<Point<3,double>> v1ps;
...@@ -1178,17 +1107,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_properties ) ...@@ -1178,17 +1107,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_properties )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_points_with_prp_names_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_points_with_prp_names_test.vtk"); std::string c2 = std::string("test_data/vtk_points_with_prp_names_test.vtk");
#endif
{ {
// Create 3 vectors with random particles // Create 3 vectors with random particles
openfpm::vector<Point<3,double>> v1ps; openfpm::vector<Point<3,double>> v1ps;
...@@ -1241,17 +1161,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_check_out_precision ) ...@@ -1241,17 +1161,8 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_check_out_precision )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_points_with_prp_names_prec_check_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_points_with_prp_names_prec_check_test.vtk"); std::string c2 = std::string("test_data/vtk_points_with_prp_names_prec_check_test.vtk");
#endif
{ {
// Create 3 vectors with random particles // Create 3 vectors with random particles
openfpm::vector<Point<3,double>> v1ps; openfpm::vector<Point<3,double>> v1ps;
...@@ -1300,23 +1211,11 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary ) ...@@ -1300,23 +1211,11 @@ BOOST_AUTO_TEST_CASE( vtk_writer_use_point_set_binary )
if (v_cl.getProcessUnitID() != 0) if (v_cl.getProcessUnitID() != 0)
return; return;
#ifdef OPENFPM_PDATA
if (v_cl.rank() != 0) {return;}
std::string c2 = std::string("openfpm_io/test_data/vtk_points_bin_test.vtk");
std::string c3 = std::string("openfpm_io/test_data/vtk_points_pp_bin_test.vtk");
std::string c4 = std::string("openfpm_io/test_data/vtk_points_2d_bin_test.vtk");
std::string c5 = std::string("openfpm_io/test_data/vtk_points_2d_pp_bin_test.vtk");
#else
std::string c2 = std::string("test_data/vtk_points_bin_test.vtk"); std::string c2 = std::string("test_data/vtk_points_bin_test.vtk");
std::string c3 = std::string("test_data/vtk_points_pp_bin_test.vtk"); std::string c3 = std::string("test_data/vtk_points_pp_bin_test.vtk");
std::string c4 = std::string("test_data/vtk_points_2d_bin_test.vtk"); std::string c4 = std::string("test_data/vtk_points_2d_bin_test.vtk");
std::string c5 = std::string("test_data/vtk_points_2d_pp_bin_test.vtk"); std::string c5 = std::string("test_data/vtk_points_2d_pp_bin_test.vtk");
#endif
{ {
// Create 3 vectors with random particles // Create 3 vectors with random particles
openfpm::vector<Point<3,double>> v1ps; openfpm::vector<Point<3,double>> v1ps;
......
/* Coverty scan */
${DEFINE_COVERTY_SCAN}
/* HIP GPU support */
${DEFINE_HIP_GPU}
/* HIP Cudify GPU support */
${DEFINE_CUDIFY_USE_HIP}
/* GPU support */
${DEFINE_CUDA_GPU}
/* Define CUDIFY backend */
${DEFINE_CUDIFY_BACKEND}
/* OpenMP support */
${DEFINE_HAVE_OPENMP}
/* HIP GPU support */
${DEFINE_HIP_GPU}
/* HIP Cudify GPU support */
${DEFINE_CUDIFY_USE_HIP}
/* Debug */
${DEFINE_DEBUG} /**/
/* Debug */
${DEFINE_DEBUG_MODE} /**/
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
${DEFINE_F77_DUMMY_MAIN}
/* Define if F77 and FC dummy `main' functions are identical. */
${DEFINE_FC_DUMMY_MAIN_EQ_F77}
/* Define if you have a BLAS library. */
${DEFINE_HAVE_BLAS}
/* define if the Boost library is available */
${DEFINE_HAVE_BOOST}
/* define if the Boost::IOStreams library is available */
${DEFINE_HAVE_BOOST_IOSTREAMS} /**/
/* define if the Boost::PROGRAM_OPTIONS library is available */
${DEFINE_HAVE_BOOST_PROGRAM_OPTIONS} /**/
/* define if the Boost::Unit_Test_Framework library is available */
${DEFINE_HAVE_BOOST_UNIT_TEST_FRAMEWORK} /**/
/* define if the Boost::Context library is available */
${DEFINE_HAVE_BOOST_CONTEXT} /**/
/* define if the Boost::Fiber library is available */
${DEFINE_HAVE_BOOST_FIBER} /**/
/* Have clock time */
${DEFINE_HAVE_CLOCK_GETTIME} /**/
/* Define to 1 if you have the <dlfcn.h> header file. */
${DEFINE_HAVE_DLFCN_H}
/* Define if you have EIGEN library. */
${DEFINE_HAVE_EIGEN}
/* Define to 1 if you have the <Eigen/Dense> header file. */
${DEFINE_HAVE_EIGEN_DENSE}
/* Define to 1 if you have the <Eigen/LU> header file. */
${DEFINE_HAVE_EIGEN_LU}
/* Defined if you have HDF5 support */
${DEFINE_HAVE_HDF5}
/* Define to 1 if you have the <inttypes.h> header file. */
${DEFINE_HAVE_INTTYPES_H}
/* Define if you have LAPACK library */
${DEFINE_HAVE_LAPACK}
/* Define if you have LIBHILBERT library */
${DEFINE_HAVE_LIBHILBERT}
/* Have quad math lib */
${DEFINE_HAVE_LIBQUADMATH}
/* Define to 1 if you have the <memory.h> header file. */
${DEFINE_HAVE_MEMORY_H}
/* Define if you have METIS library */
${DEFINE_HAVE_METIS}
/* MPI Enabled */
${DEFINE_HAVE_MPI}
/* We have OSX */
${DEFINE_HAVE_OSX}
/* Define if you have PARMETIS library */
${DEFINE_HAVE_PARMETIS}
/* Define if you have PETSC library */
${DEFINE_HAVE_PETSC}
/* Define to 1 if you have the <stdint.h> header file. */
${DEFINE_HAVE_STDINT_H}
/* Define to 1 if you have the <stdlib.h> header file. */
${DEFINE_HAVE_STDLIB_H}
/* Define to 1 if you have the <strings.h> header file. */
${DEFINE_HAVE_STRINGS_H}
/* Define to 1 if you have the <string.h> header file. */
${DEFINE_HAVE_STRING_H}
/* Define if you have SUITESPARSE library. */
${DEFINE_HAVE_SUITESPARSE}
/* Define to 1 if you have the <sys/stat.h> header file. */
${DEFINE_HAVE_SYS_STAT_H}
/* Define to 1 if you have the <sys/types.h> header file. */
${DEFINE_HAVE_SYS_TYPES_H}
/* Define to 1 if you have the <unistd.h> header file. */
${DEFINE_HAVE_UNISTD_H}
/* Test TinyObjLoader */
${DEFINE_HAVE_TINYOBJLOADER}
/* ACTION to take in case of error */
${DEFINE_ACTION_ON_ERROR}
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* NVCC compiling */
${DEFINE_NVCC} /**/
/* Define if we have Alpaka */
${DEFINE_HAVE_ALPAKA}
/* Additional alpaka definitions */
${ALPAKA_ACC_CPU_B_SEQ_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_THREADS_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_FIBERS_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE_DEF}
${ALPAKA_ACC_CPU_B_SEQ_T_OMP2_ENABLE_DEF}
${ALPAKA_ACC_CPU_BT_OMP4_ENABLE_DEF}
/* Name of package */
#define PACKAGE "openfpm_pdata"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "BUG-REPORT-ADDRESS"
/* Define to the full name of this package. */
#define PACKAGE_NAME "OpenFPM_pdata"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "OpenFPM_pdata 1.0.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "openfpm_pdata"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.0.0"
/* Test performance mode */
${DEFINE_PERFORMANCE_TEST}
/* Security enhancement class 1 */
${DEFINE_SE_CLASS1}
/* Security enhancement class 2 */
${DEFINE_SE_CLASS2}
/* Security enhancement class 3 */
${DEFINE_SE_CLASS3}
/* Define to 1 if you have the ANSI C header files. */
${DEFINE_STDC_HEADERS}
/* If an error occur stop the program */
${DEFINE_STOP_ON_ERROR}
/* Garbage injector*/
${DEFINE_GARBAGE_INJECTOR}
/* Test coverage mode */
${DEFINE_TEST_COVERAGE_MODE}
/* when an error accur continue but avoid unsafe operation */
/* #undef THROW_ON_ERROR */
/* Version number of package */
#define VERSION "1.0.0"
#define OPENFPM_IO
/*
* H5PartWriter.hpp
*
* Created on: Feb 7, 2016
* Author: i-bird
*/
#ifndef OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_HPP_
#define OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_HPP_
#define H5PART_WRITER 0x20000
#define H5_POINTSET 1
template <unsigned int imp>
class HDF5_XdmfWriter
{
};
#include "HDF5_XdmfWriter_point_set.hpp"
#endif /* OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_HPP_ */
/*
* H5PartWriter_point_set.hpp
*
* Created on: Feb 7, 2016
* Author: i-bird
*/
#ifndef OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_POINT_SET_HPP_
#define OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_POINT_SET_HPP_
#include "HDF5_XdmfWriter_util.hpp"
#include "Vector/map_vector.hpp"
#include "VCluster/VCluster.hpp"
/*! \brief this class is a functor for "for_each" algorithm
*
* This class is a functor for "for_each" algorithm. For each
* element of the boost::vector the operator() is called.
* Is mainly used to produce write each property in H5Part
*
* \tparam ele_v is the vector of properties
* \tparam seq, sequence of property to output
* \tparam has_name define if the structure define names for the properties
*
*/
template<typename ele_v, bool has_name>
struct H5_prop_out
{
//! HDF5 file
hid_t file_id;
//! vector that we are processing
ele_v & vv;
//! Up to which element to write
size_t stop;
/*! \brief constructor
*
* \param v_out string to fill with the vertex properties
*
*/
H5_prop_out(hid_t file_id, ele_v & vv, size_t stop)
:file_id(file_id),vv(vv),stop(stop)
{};
/*! \brief It produce an output for each property
*
* \param t property id
*
*/
template<typename T>
void operator()(T& t) const
{
typedef typename boost::mpl::at<typename ele_v::value_type::value_type::type,boost::mpl::int_<T::value>>::type ptype;
H5_write<ptype,T::value,ele_v>::write(file_id,std::string(ele_v::value_type::attributes::names[T::value]),vv,stop);
}
};
/*! \brief this class is a functor for "for_each" algorithm
*
* This class is a functor for "for_each" algorithm. For each
* element of the boost::vector the operator() is called.
* Is mainly used to produce an output for each property
*
* \tparam ele_v is the vector of properties
* \tparam seq, sequence of property to output
* \tparam has_name define if the structure define names
*
*/
template<typename ele_v>
struct H5_prop_out<ele_v,false>
{
//! HDF5 file
hid_t file_id;
//! vector that we are processing
ele_v & vv;
//! Up to which element to write
size_t stop;
/*! \brief constructor
*
* \param file_id handle of the file
* \param vv element to write
* \param stop up to which element to write
*
*/
H5_prop_out(hid_t file_id, ele_v & vv, size_t stop)
:file_id(file_id),vv(vv),stop(stop)
{};
/*! \brief It produce an output for each property
*
* \param t property id
*
*/
template<typename T>
void operator()(T& t) const
{
typedef typename boost::mpl::at<typename ele_v::value_type::type,boost::mpl::int_<T::value>>::type ptype;
H5_write<ptype,T::value,ele_v>::write(file_id,std::string("attr") + std::to_string(T::value),vv,stop);
}
};
/*! \brief HDF5 writer for a point set
*
*
*/
template <>
class HDF5_XdmfWriter<H5_POINTSET>
{
//! HDF5 file
hid_t file_id;
public:
/*!
*
* H5PartWriter constructor
*
*/
HDF5_XdmfWriter()
{}
/*!
*
* \brief Write a set of particle positions and properties into HDF5
*
* \tparam Pos Vector of positions type
* \taparam Prp Vector of properties type
* \tparam prp list of properties to output
*
* \param file output file
* \param v_pos Vector with the positions
* \param v_prp Vector with the properties
* \param stop size of the vector to output
*
*/
template<typename VPos, typename VPrp, int ... prp >
bool write(const std::string & file,
openfpm::vector<VPos> & v_pos,
openfpm::vector<VPrp> & v_prp,
size_t stop)
{
Vcluster & v_cl = create_vcluster();
// Open and HDF5 file in parallel
hid_t plist_id = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_mpio(plist_id, v_cl.getMPIComm(), MPI_INFO_NULL);
file_id = H5Fcreate(file.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, plist_id);
H5Pclose(plist_id);
// Single coordinate positional vector
openfpm::vector<typename VPos::coord_type> x_n;
x_n.resize(stop);
//for each component, fill x_n
for (size_t i = 0 ; i < VPos::dims ; i++)
{
//
for (size_t j = 0 ; j < stop ; j++)
x_n.get(j) = v_pos.template get<0>(j)[i];
std::stringstream str;
str << "x" << i;
HDF5CreateDataSet<typename VPos::coord_type>(file_id,str.str(),x_n.getPointer(),stop*sizeof(typename VPos::coord_type));
}
// Now we write the properties
typedef typename to_boost_vmpl<prp ... >::type v_prp_seq;
H5_prop_out<openfpm::vector<VPrp>,has_attributes<VPrp>::value> f(file_id,v_prp,stop);
boost::mpl::for_each_ref<v_prp_seq>(f);
H5Fclose(file_id);
return true;
}
};
#endif /* OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_POINT_SET_HPP_ */
/*
* H5PartWriter_unit_tests.hpp
*
* Created on: Feb 22, 2016
* Author: i-bird
*/
#ifndef OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UNIT_TESTS_HPP_
#define OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UNIT_TESTS_HPP_
#include "VCluster.hpp"
#include "util/SimpleRNG.hpp"
#include "HDF5_XdmfWriter.hpp"
BOOST_AUTO_TEST_SUITE( HDF5_writer_test )
BOOST_AUTO_TEST_CASE( HDF5_writer_use)
{
openfpm::vector<Point<3,double>> pv;
openfpm::vector<Point_test<double>> pvp;
SimpleRNG rng;
Vcluster & v_cl = *global_v_cluster;
if (v_cl.getProcessingUnits() != 3)
return;
double z_base = v_cl.getProcessUnitID();
// fill 1000 particles for each processors
for (size_t i = 0 ; i < 1000 ; i++)
{
Point<3,double> p;
p[0] = rng.GetUniform();
p[1] = rng.GetUniform();
p[2] = z_base+rng.GetUniform();
pv.add(p);
p[0] += 2.0;
Point_test<double> pt;
pt.fill();
pvp.add(pt);
}
HDF5_XdmfWriter<H5_POINTSET> h5p;
h5p.template write<Point<3,double>,Point_test<double>,0,1,4,5>("h5part.h5",pv,pvp,1000);
// check that match
bool test = compare("test_h5part.h5part","test_h5part_test.h5part");
BOOST_REQUIRE_EQUAL(true,test);
}
BOOST_AUTO_TEST_SUITE_END()
#endif /* OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UNIT_TESTS_HPP_ */
/*
* H5PartWriteData_meta.hpp
*
* Created on: Feb 22, 2016
* Author: i-bird
*/
#ifndef OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UTIL_HPP_
#define OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UTIL_HPP_
#include "hdf5.h"
#include "Vector/map_vector.hpp"
/*! \brief HDF5 Create the data-set in the file
*
* \tparam type Type to write
*
* \param file_id Id of the file
* \param filespace id where to write
* \param str dataset to write
* \param ptr pointer with the data to write
* \param sz size of the data to write
*
* \return true if the function succeed
*
*/
template<typename type> bool HDF5CreateDataSet(hid_t file_id, const std::string & str ,void * ptr, size_t sz)
{
hid_t plist_id = H5Pcreate(H5P_DATASET_XFER);
if (plist_id < 0)
return false;
/* Create the dataspace for the position dataset. */
hsize_t dimsf[1] = {sz};
hid_t filespace = H5Screate_simple(1, dimsf, NULL);
if (filespace < 0)
return false;
if (std::is_same<type,char>::value == true)
{
hid_t dset_id = H5Dcreate(file_id, str.c_str(), H5T_NATIVE_CHAR, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset_id < 0)
return false;
herr_t status = H5Dwrite(dset_id, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, plist_id, ptr);
if (status < 0)
return false;
H5Dclose(dset_id);
H5Dclose(filespace);
return true;
}
/* else if (std::is_same<type,signed char>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_SCHAR, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dclose(dset_id);
return status;
}
else if (std::is_same<type,unsigned char>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_UCHAR, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,short>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_SHORT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,unsigned short>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_USHORT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,int>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,unsigned int>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_UINT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,long>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_LONG, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,unsigned long>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_ULONG, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,long long>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_LLONG, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,unsigned long long>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_ULLONG, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
else if (std::is_same<type,float>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}*/
else if (std::is_same<type,double>::value == true)
{
hid_t dset_id = H5Dcreate(file_id, str.c_str(), H5T_NATIVE_DOUBLE, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (dset_id < 0)
return false;
herr_t status = H5Dwrite(dset_id, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, plist_id, ptr);
if (status < 0)
return false;
H5Dclose(dset_id);
H5Dclose(filespace);
return true;
}
/*else if (std::is_same<type,long double>::value == true)
{
dset_id = H5Dcreate(file_id, std.c_str(), H5T_NATIVE_LDOUBLE, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}*/
return true;
}
/*! \brief Write an HDF5 dataset in case of scalars and vectors
*
* \tparam T type to write
* \tparam pid Property id
* \tparam V Vector containing the information
*
*/
template<typename T,size_t pid, typename V>
struct H5_write
{
/*! \brief write
*
* \param file_id HDF5 file
* \param str dataset name
* \param v Vector containing the information
* \param stop size to store
*
*/
static inline void write(hid_t file_id, const std::string & str, V & v, size_t stop)
{
// Create the buffer
openfpm::vector<T> buffer;
buffer.resize(stop);
for (size_t j = 0 ; j < stop ; j++)
buffer.get(j) = v.template get<pid>(j);
HDF5CreateDataSet<T>(file_id,str.c_str(),buffer.getPointer(),stop*sizeof(T));
}
};
//! Partial specialization for N=1 1D-Array
template<typename T,size_t pid, typename V,size_t N1>
struct H5_write<T[N1],pid,V>
{
/*! \brief write
*
* \param file_id HDF5 file
* \param str dataset name
* \param v Vector containing the information
* \param stop size to store
*
*/
static inline void write(hid_t file_id, const std::string & str, V & v, size_t stop)
{
for (size_t i1 = 0 ; i1 < N1 ; i1++)
{
// Create the buffer
openfpm::vector<T> buffer;
buffer.resize(stop);
for (size_t j = 0 ; j < stop ; j++)
buffer.get(j) = v.template get<pid>(j)[i1];
std::stringstream sstr;
sstr << "_" << i1;
HDF5CreateDataSet<T>(file_id,std::string(str) + sstr.str(),v.getPointer(),stop*sizeof(T));
}
}
};
//! Partial specialization for N=2 2D-Array
template<typename T, size_t pid, typename V,size_t N1,size_t N2>
struct H5_write<T[N1][N2],pid,V>
{
/*! \brief write
*
* \param file_id HDF5 file
* \param str dataset name
* \param v Vector containing the information
* \param stop size to store
*
*/
static inline void write(hid_t file_id, const std::string & str, V & v, size_t stop)
{
for (size_t i1 = 0 ; i1 < N1 ; i1++)
{
for (size_t i2 = 0 ; i2 < N2 ; i2++)
{
// Create the buffer
openfpm::vector<T> buffer;
buffer.resize(stop);
for (size_t j = 0 ; j < stop ; j++)
buffer.get(j) = v.template get<pid>(j)[i1][i2];
std::stringstream sstr;
sstr << "_" << i1 << "_" << i2;
HDF5CreateDataSet<T>(file_id,std::string(str) + sstr.str(),v.getPointer(),stop*sizeof(T));
}
}
}
};
//! Partial specialization for N=3
template<typename T, size_t pid, typename V,size_t N1,size_t N2,size_t N3>
struct H5_write<T[N1][N2][N3],pid,V>
{
/*! \brief write
*
* \param file_id HDF5 file
* \param str dataset name
* \param v Vector containing the information
* \param stop size to store
*
*/
static inline void write(hid_t file_id, const std::string & str, V & v, size_t stop)
{
for (size_t i1 = 0 ; i1 < N1 ; i1++)
{
for (size_t i2 = 0 ; i2 < N2 ; i2++)
{
for (size_t i3 = 0 ; i3 < N3 ; i3++)
{
// Create the buffer
openfpm::vector<T> buffer;
buffer.resize(stop);
for (size_t j = 0 ; j < stop ; j++)
buffer.get(j) = v.template get<pid>(j)[i1][i2][i3];
std::stringstream sstr;
sstr << "_" << i1 << "_" << i2 << "_" << i3;
HDF5CreateDataSet<T>(file_id,std::string(str) + sstr.str(),v.getPointer(),stop*sizeof(T));
}
}
}
}
};
//! Partial specialization for N=4
template<typename T, size_t pid, typename V ,size_t N1,size_t N2,size_t N3,size_t N4>
struct H5_write<T[N1][N2][N3][N4],pid,V>
{
/*! \brief write
*
* \param file_id HDF5 file
* \param str dataset name
* \param v Vector containing the information
* \param stop size to store
*
*/
static inline void write(hid_t file_id, const std::string & str, V & v, size_t stop)
{
for (size_t i1 = 0 ; i1 < N1 ; i1++)
{
for (size_t i2 = 0 ; i2 < N2 ; i2++)
{
for (size_t i3 = 0 ; i3 < N3 ; i3++)
{
for (size_t i4 = 0 ; i4 < N4 ; i4++)
{
// Create the buffer
openfpm::vector<T> buffer;
buffer.resize(stop);
for (size_t j = 0 ; j < stop ; j++)
buffer.get(j) = v.template get<pid>(j)[i1][i2][i3][i4];
std::stringstream sstr;
sstr << "_" << i1 << "_" << i2 << "_" << i3 << "_" << i4;
HDF5CreateDataSet<T>(file_id,std::string(str) + sstr.str(),v.getPointer(),stop*sizeof(T));
}
}
}
}
}
};
#endif /* OPENFPM_IO_SRC_HDF5_XDMFWRITER_HDF5_XDMFWRITER_UTIL_HPP_ */
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
#include <iostream> #include <iostream>
#ifdef OPENFPM_PDATA
#include "VCluster/VCluster.hpp"
#endif
#define BOOST_DISABLE_ASSERTS #define BOOST_DISABLE_ASSERTS
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_DYN_LINK
...@@ -32,11 +28,9 @@ int main(int argc, char* argv[]) ...@@ -32,11 +28,9 @@ int main(int argc, char* argv[])
#endif #endif
#include "VCluster/VCluster.hpp"
#include "CSVWriter/CSVWriter_unit_tests.hpp" #include "CSVWriter/CSVWriter_unit_tests.hpp"
#include "GraphMLWriter/GraphMLWriter_unit_tests.hpp" #include "GraphMLWriter/GraphMLWriter_unit_tests.hpp"
#include "VTKWriter/VTKWriter_unit_tests.hpp" #include "VTKWriter/VTKWriter_unit_tests.hpp"
//#include "HDF5_XdmfWriter/HDF5_XdmfWriter_unit_tests.hpp"
#include "Plot/Plot_unit_tests.hpp" #include "Plot/Plot_unit_tests.hpp"
#include "RawReader/RawReader_unit_tests.hpp" #include "RawReader/RawReader_unit_tests.hpp"
#include "HDF5_wr/HDF5_writer_unit_tests.hpp" #include "HDF5_wr/HDF5_writer_unit_tests.hpp"
#! /bin/bash
if [ $1 -eq 1 ]; then
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the $3 tests with $4\" }] }" https://hooks.slack.com/services/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
else
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the $3 tests \" }] }" https://hooks.slack.com/services/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
fi