diff --git a/CMakeLists.txt b/CMakeLists.txt index 8332a15c2815ea8b9fd3bc29cf2c12b8daa8418f..43a9c49519a3695da040b61449b716bc711d130c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,6 +275,8 @@ if (CPACK_RUN_INSTALL_DEPENDENCIES) set(CPACK_DEBIAN_PACKAGE_MAINTAINER Pietro Incardona) set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/scripts/postinst) set(CPACK_POSTFLIGHT_OPENFPM_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/src/scripts/postflight) + set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/src/script/postinst") + set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README") install(FILES $ENV{DEP_PACKING}/openfpm_vars DESTINATION source diff --git a/src/Grid/tests/grid_dist_id_unit_test.cpp b/src/Grid/tests/grid_dist_id_unit_test.cpp index fa3d95a37ae07bda09b227370cd65e1dec5a00fe..a6d4061e0c2be72e30cb247cf2c761c23f508915 100644 --- a/src/Grid/tests/grid_dist_id_unit_test.cpp +++ b/src/Grid/tests/grid_dist_id_unit_test.cpp @@ -2409,51 +2409,52 @@ BOOST_AUTO_TEST_CASE( grid_dist_domain_ghost_3D_put_create_check ) TestXD_ghost_put_create(sg_dist3,k); } + BOOST_AUTO_TEST_CASE( grid_dist_ghost_zero_size ) { - // Test grid periodic + // Test grid periodic - Box<3,float> domain({-1.0,-1.0,-1.0},{1.0,1.0,1.0}); + Box<3,double> domain({0,0,0},{365.376,365.376,102}); - Vcluster<> & v_cl = create_vcluster(); + Vcluster<> & v_cl = create_vcluster(); - if ( v_cl.getProcessingUnits() > 32 ) - {return;} + if ( v_cl.getProcessingUnits() > 32 ) + {return;} - BOOST_TEST_CHECKPOINT( "Testing grid zero ghost"); + BOOST_TEST_CHECKPOINT( "Testing grid zero ghost"); - // grid size - size_t sz[3]; - sz[0] = 32; - sz[1] = 32; - sz[2] = 32; + // grid size + size_t sz[3]; + sz[0] = 53; + sz[1] = 53; + sz[2] = 10; - // Ghost - Ghost<3,long int> g(0); + // Ghost + Ghost<3,long int> g(0); - // periodicity - periodicity<3> pr = {{NON_PERIODIC,NON_PERIODIC,NON_PERIODIC}}; + // periodicity + periodicity<3> pr = {{NON_PERIODIC,NON_PERIODIC,NON_PERIODIC}}; - // Distributed grid with id decomposition - grid_dist_id<3, float, aggregate<long int, int>> g_dist(sz,domain,g,pr); + // Distributed grid with id decomposition + grid_dist_id<3, double, aggregate<long int, int>> g_dist(sz,domain,g,pr); - auto it = g_dist.getDomainIterator(); + auto it = g_dist.getDomainIterator(); - size_t count = 0; + size_t count = 0; - while (it.isNext()) - { - auto k = it.get(); + while (it.isNext()) + { + auto k = it.get(); - ++count; + ++count; - ++it; - } + ++it; + } - v_cl.sum(count); - v_cl.execute(); + v_cl.sum(count); + v_cl.execute(); - BOOST_REQUIRE_EQUAL(count,32*32*32); + BOOST_REQUIRE_EQUAL(count,53*53*10); } diff --git a/src/scripts/postinst b/src/scripts/postinst index 4031f0c3a7190bc5f3ac85dfb3058ece130415c6..763d3ed561a4529800f9222de37392223c86c1b1 100644 --- a/src/scripts/postinst +++ b/src/scripts/postinst @@ -1,7 +1,9 @@ #! /bin/bash -sed -i -e 's/home\/vagrant/usr\/local\/openfpm\/dependencies/g' /usr/local/openfpm/source/openfpm_vars -sed -i -e 's/home\/vagrant/usr\/local\/openfpm\/dependencies/g' /usr/local/openfpm/openfpm_pdata/include/example.mk +/projects\/ppm\/rundeck\/openfpm_super_bundles\/$1\/openfpm_dep_$1 + +sed -i -e 's/projects\/ppm\/rundeck\/openfpm_super_bundles\/$1\/openfpm_dep_$1/usr\/local\/openfpm\/dependencies/g' /usr/local/openfpm/source/openfpm_vars +sed -i -e 's/projects\/ppm\/rundeck\/openfpm_super_bundles\/$1\/openfpm_dep_$1/usr\/local\/openfpm\/dependencies/g' /usr/local/openfpm/openfpm_pdata/include/example.mk echo "export OPAL_PREFIX=/usr/local/openfpm/dependencies/MPI" >> /usr/local/openfpm/source/openfpm_vars