Commit 0039a8c1 authored by Pietro Incardona's avatar Pietro Incardona

Fixing Semantic test

parent a874640c
......@@ -21,6 +21,7 @@ if [ "$2" == "gin" ]; then
echo "Compiling on gin\n"
module load gcc/4.9.2
module load openmpi/1.8.1
elif [ "$2" == "wetcluster" ]; then
echo "Compiling on wetcluster"
......
......@@ -8,7 +8,7 @@
#ifndef OPENFPM_VCLUSTER_SRC_VCLUSTER_SEMANTIC_UNIT_TESTS_HPP_
#define OPENFPM_VCLUSTER_SRC_VCLUSTER_SEMANTIC_UNIT_TESTS_HPP_
struct A
struct Aexample
{
size_t a;
float b;
......@@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_struct_gather)
if (vcl.getProcessingUnits() >= 32)
return;
openfpm::vector<A> v1;
openfpm::vector<Aexample> v1;
v1.resize(vcl.getProcessUnitID());
for(size_t i = 0 ; i < vcl.getProcessUnitID() ; i++)
......@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_struct_gather)
v1.get(i).c = 11.0;
}
openfpm::vector<A> v2;
openfpm::vector<Aexample> v2;
vcl.SGather(v1,v2,(i%vcl.getProcessingUnits()));
......@@ -229,7 +229,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_sendrecv)
vcl.SSendRecv(v1,v3,prc_send,prc_recv3,sz_recv3);
BOOST_REQUIRE_EQUAL(v2.size(),n_ele);
BOOST_REQUIRE_EQUAL(v3.size(),vcl.getProcessingUnits()-1-nc);
size_t nc_check = (vcl.getProcessingUnits() - 1) / SSCATTER_MAX;
BOOST_REQUIRE_EQUAL(v3.size(),vcl.getProcessingUnits()-1-nc_check);
bool match = true;
size_t s = 0;
......@@ -299,7 +300,8 @@ BOOST_AUTO_TEST_CASE (Vcluster_semantic_struct_sendrecv)
vcl.SSendRecv(v1,v3,prc_send,prc_recv3,sz_recv3);
BOOST_REQUIRE_EQUAL(v2.size(),n_ele);
BOOST_REQUIRE_EQUAL(v3.size(),vcl.getProcessingUnits()-1-nc);
size_t nc_check = (vcl.getProcessingUnits() - 1) / SSCATTER_MAX;
BOOST_REQUIRE_EQUAL(v3.size(),vcl.getProcessingUnits()-1-nc_check);
bool match = true;
size_t s = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment