Commit 5ffbd4b5 authored by incardon's avatar incardon

Merging with master

parents 14f1c4aa 7214aa38
......@@ -278,5 +278,5 @@ else
fi
fi
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$MACHINE completed succeffuly the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
curl -X POST --data "payload={\"icon_emoji\": \":jenkins:\", \"username\": \"jenkins\" , \"attachments\":[{ \"title\":\"Info:\", \"color\": \"#00FF00\", \"text\":\"$2 completed succeffuly the openfpm_pdata test \" }] }" https://hooks.slack.com/services/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
......@@ -151,5 +151,5 @@ int main(int argc, char* argv[])
//
// Deinitialize the library
//
delete(global_v_cluster);
delete_global_v_cluster();
}
......@@ -154,5 +154,5 @@ int main(int argc, char* argv[])
//
// Deinitialize the library
//
delete(global_v_cluster);
delete_global_v_cluster();
}
......@@ -118,9 +118,17 @@ int main(int argc, char* argv[])
v_cl.execute();
//
// ### WIKI 14 ###
// ### WIKI 9 ###
//
// Output the particle position for each processor
//
vd.write("output");
//
// ### WIKI 10 ###
//
// Deinitialize the library
//
delete(global_v_cluster);
delete_global_v_cluster();
}
......@@ -161,7 +161,7 @@ else
## if MPI or METIS installation required install it
if [ $conf_err -eq 200 ]; then
echo "MPI not found try to install"
echo "MPI not found try to install, $MPI_installed"
if [ $MPI_installed -eq 1 ]; then
echo "Error the installation of MPI failed"
exit 1
......@@ -169,7 +169,7 @@ else
./script/install_MPI.sh $i_dir $compiler_opt
MPI_installed=1
export PATH="$PATH:$i_dir/MPI/bin"
configure_options="$configure_options CXX=mpic++ "
elif [ $conf_err -eq 201 ]; then
echo "Metis not found try to install"
if [ $METIS_installed -eq 1 ]; then
......@@ -197,8 +197,8 @@ fi
### Create example.mk
install_base=$(cat install_dir)
echo "INCLUDE_PATH=-I. -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" > example.mk
echo "LIBS_PATH=-L$install_base/openfpm_devices/lib -L$install_base/openfpm_vcluster/lib -L$i_dir/METIS/lib " >> example.mk
echo "INCLUDE_PATH=-I. -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/BOOST/include" > example.mk
echo "LIBS_PATH=-L$install_base/openfpm_devices/lib -L$install_base/openfpm_vcluster/lib -L$i_dir/METIS/lib -L$i_dir/BOOST/lib " >> example.mk
echo "LIBS=-lvcluster -lofpmmemory -lmetis -lboost_iostreams" >> example.mk
cp example.mk src/example.mk
cp example.mk example/example.mk
......
#! /bin/bash
function detect_gcc_or_clang()
{
command -v $1 >/dev/null 2>&1
if [ $? -ne 0 ]; then
dgc_ret=0
return
fi
# First we try to understand if g++ command line is linked to clang
$1 --version | grep "Apple LLVM"
if [ $? == 0 ]; then
echo "Apple LLVM based g++"
# we try the detect the version
major=$(g++ --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*(.*/\1/g')
# we check if the detection is garbage
echo "$major" | egrep -q '^[0-9]+$'
if [ $? == 0 ]; then
dgc_major=$($1 --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*(.*/\1/g')
dgc_middle=$($1 --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*(.*/\2/g')
dgc_minor=$($1 --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*(.*/\3/g')
if [ $dgc_major -gt 6 ]; then
echo -e "clang++ $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=1
elif [ $dgc_major -lt 6 ]; then
echo -e "clang++ $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your Apple clang $major.middle;$minor is too old, 6.1.0 or higher is required"
dgc_ret=0
elif [ $dgc_middle -gt 1 ]; then
echo -e "clang++ $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=1
elif [ $dgc_minor -lt 1 ]; then
echo -e "clang++ $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your Apple clang $major.middle;$minor is too old, 6.1.0 or higher is required"
dgc_ret=0
else
echo -e "Apple clang++ version $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=1
fi
return
fi
dgc_ret=2
return
fi
$1 --version | grep $1
if [ $? == 0 -a x"$1" == x"gcc" ]; then
dgc_major=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
if [ $dgc_major -gt 4 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=g++
dgc_ret=1
elif [ $dgc_major -lt 4 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your g++ version is too old, 4.8.2 at least required"
dgc_ret=0
elif [ $dgc_middle -gt 8 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=g++
dgc_ret=1
elif [ $dgc_middle -lt 8 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your g++ version is too old, 4.8.2 at least required"
dgc_ret=0
elif [ $dgc_minor -gt 1 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=g++
dgc_ret=1
else
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m FAILED \033[0m your g++ version is too old, 4.8.2 at least required"
dgc_ret=0
fi
return
fi
$1 --version | grep $1
if [ $? == 0 -a x"$1" == x"clang" ]; then
dgc_major=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dgc_middle=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dgc_minor=$($1 --version | grep $1 | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
if [ $dgc_major -gt 3 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=1
elif [ $dgc_major -lt 3 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your clang version is too old 3.6.0 at least required"
dgc_ret=0
elif [ $dgc_middle -gt 6 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=1
elif [ $dgc_middle -lt 6 ]; then
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[91;5;1m FAILED \033[0m your clang version is too old 3.6.0 at least required"
dgc_ret=0
else
echo -e "$1 $dgc_major.$dgc_middle.$dgc_minor \033[92;1m SUCCESS \033[0m"
dgc_compiler=clang++
dgc_ret=0
fi
return
fi
dgc_ret=0
}
#! /bin/bash
function detect_osx()
{
if [ x"$1" != x"osx" ]; then
return
fi
# Try first pattern
version=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
echo "$version" | egrep -q '^[0-9]+$'
if [ $? == 0 ]; then
dosx_major=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
dosx_middle=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
dosx_minor=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
if [ $dosx_major -gt 10 ]; then
dosx_ret=1
elif [ $dosx_major -lt 10 ]; then
dosx_ret=0
elif [ $dosx_middle -gt 10 ]; then
dosx_ret=1
elif [ $dosx_middle -lt 10 ]; then
dosx_ret=1
else
dosx_ret=0
fi
fi
version=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\).*/\1/g')
echo "$version" | egrep -q '^[0-9]+$'
if [ $? == 0 ]; then
dosx_major=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\).*/\1/g')
dosx_middle=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\).*/\2/g')
if [ $dosx_major -gt 10 ]; then
dosx_ret=1
elif [ $dosx_major -lt 10 ]; then
dosx_ret=0
elif [ $dosx_middle -gt 10 ]; then
dosx_ret=1
elif [ $dosx_middle -lt 10 ]; then
dosx_ret=1
else
dosx_ret=0
fi
fi
}
......@@ -12,6 +12,8 @@ source script/solve_wget
source script/solve_automake
source script/solve_brew
source script/solve_libtool
source script/detect_gcc
source script/detect_osx
discover_os
discover_package_manager $platform
......@@ -139,103 +141,19 @@ fi
#### Detecting g++
if [ x"$platform" == x"osx" ]; then
## we try to detect osx version
major=$(g++ --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)svn.*/\1/g')
middle=$(g++ --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)svn.*/\2/g')
minor=$(g++ --version | grep LLVM | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\)svn.*/\3/g')
echo "$major" | egrep -q '^[0-9]+$'
is_maj_num=$?
echo "$minor" | egrep -q '^[0-9]+$'
is_min_num=$?
echo "$middle" | egrep -q '^[0-9]+$'
is_mid_num=$?
command -v g++-4.9 >/dev/null 2>&1
opt1=$?
# Major middle and minor should contain only numbers, if they dont, and smaller than 2 character otherwise the detection was garbage
if [ $is_maj_num -ne 0 -o $is_min_num -ne 0 -o $is_mid_num -ne 0 ]; then
if [ $opt1 -eq 1 ]; then
## the detection is garbage, gcc49 id not present, now we check the system
major=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
middle=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
minor=$(sw_vers | grep ProductVersion | sed 's/.*\([0-9][0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
if [ $major -gt 10 ]; then
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $major.$middle.$minor seem to be recent enough, so we will continue the installation"
sleep 10
elif [ $major -lt 10 ]; then
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $major.$middle.$minor is older than 10.10.X, so is probably going to fail with the actual compiler"
echo "One possible solution is to try to install gcc 4.9"
solve_gpp $platform
elif [ $middle -gt 10 ]; then
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $major.$middle.$minor seem to be recent enough, so we will continue the installation"
sleep 10
elif [ $middle -lt 10 ]; then
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $major.$middle.$minor is older than 10.10.X, so is probably going to fail with the actual compiler"
echo "One possible solution is to try to install gcc 4.9"
solve_gpp $platform
else
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $major.$middle.$minor seem to be recent enough, so we will continue the installation"
sleep 10
fi
fi
else
## the detection is good check the compiler
if [ $major -gt 3 ]; then
echo -e "clang++ $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $major -lt 3 ]; then
echo -e "clang++ $major.$middle.$minor \033[91;5;1m FAILED \033[0m your clang $major.middle;$minor is too old, 3.6.0 or higher is required"
solve_gpp $platform
elif [ $middle -gt 6 ]; then
echo -e "clang++ $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $middle -lt 6 ]; then
echo -e "clang++\033[91;5;1m FAILED \033[0m your clang is out of date, update to 3.6.0 or higher is required"
solve_gpp $platform
else
echo -e "clang++ version $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
fi
fi
else
command -v g++ >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo >&2
echo -e "Configure\033[91;5;1m FAILED \033[0m"
echo "OpenFPM require g++ but it's not installed, searching a solution..."
detect_gcc_or_clang gcc
if [ $dgc_ret -eq 0 ]; then
solve_gpp $platform
command -v g++ >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "g++\033[91;5;1m FAILED \033[0m"
detect_gcc_or_clang gcc-4.9
if [ $dgc_ret -eq 0 ]; then
exit 1
else
echo -e "g++\033[92;1m SUCCESS \033[0m"
fi
else
major=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1/g')
middle=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2/g')
minor=$(g++ --version | grep g++ | sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3/g')
if [ $major -gt 4 ]; then
echo -e "g++ $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $major -lt 4 ]; then
echo -e "g++ $major.$middle.$minor \033[91;5;1m FAILED \033[0m your g++ version is too old"
elif [ $middle -gt 8 ]; then
echo -e "g++ $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
elif [ $middle -lt 8 ]; then
echo -e "g++ $major.$middle.$minor \033[91;5;1m FAILED \033[0m your g++ version is too old"
elif [ $minor -gt 1 ]; then
echo -e "g++ $major.$middle.$minor \033[92;1m SUCCESS \033[0m"
else
echo -e "g++ $major.$middle.$minor \033[92;1m FAILED \033[0m your g++ version is too old"
fi
elif [ $dgc_ret -eq 2 ]; then
detect_osx $platform
if [ $dosx_ret -eq 1 ]; then
echo -e "\033[30;43;5;1m------------------------------- WARNING --------------------------------\033[0m"
echo "g++ seem to be present, but we failed to detect the version. Your system $dosx_major.$dosx_middle.$dosx_minor seem to be recent enough, so we will continue the installation"
sleep 10
fi
fi
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -334,15 +334,33 @@ private:
// Receive counter
size_t recv_cnt;
// reference counter of the object in case is shared between object
long int ref_cnt;
public:
//! Increment the reference counter
void incRef()
{ref_cnt++;}
//! Decrement the reference counter
void decRef()
{ref_cnt--;}
//! Return the reference counter
long int ref()
{
return ref_cnt;
}
/*! \brief Cartesian decomposition constructor
*
* \param v_cl Virtual cluster, used internally to handle or pipeline communication
*
*/
CartDecomposition(Vcluster & v_cl)
:nn_prcs<dim,T>(v_cl),v_cl(v_cl)
:nn_prcs<dim,T>(v_cl),v_cl(v_cl),ref_cnt(0)
{
// Reset the box to zero
bbox.zero();
......
#ifndef DIST_MODEL_HPP
#define DIST_MODEL_HPP
#include "metis.h"
/*! \brief This class do graph partitioning
*
* This class do graph partitioning, it use METIS internaly
*
*/
template<typename Graph, typename algorithm>
class GraphPartitioning
{
//! Structure that store the graph
Graph & grp;
/*! Constructor
*
* It load the graph to partition
*
* \param g Graph to store
*
*/
GraphPartitioning(Graph & g)
:grp(g)
{}
};
#endif
......@@ -131,7 +131,7 @@ public:
*
* \param id sub-domain id
*
* \return the number of internal ghost box
* \return the number of external ghost box
*
*/
inline size_t getLocalNEGhost(size_t id)
......
......@@ -40,8 +40,13 @@
* \snippet grid_dist_id_unit_test.hpp Create and access a distributed grid complex
* ### Synchronize a distributed grid for complex structures
* \snippet grid_dist_id_unit_test.hpp Synchronized distributed grid complex
<<<<<<< HEAD
* ### Usage of a grid dist iterator sub
* \snippet grid_dist_id_unit_test.hpp Usage of a sub_grid iterator
=======
* ### Construct two grid with the same decomposition
* \snippet grid_dist_id_unit_test.hpp Construct two grid with the same decomposition
>>>>>>> master
*
*/
template<unsigned int dim, typename St, typename T, typename Decomposition,typename Memory=HeapMemory , typename device_grid=grid_cpu<dim,T> >
......@@ -57,7 +62,7 @@ class grid_dist_id
Vcluster_object_array<device_grid> loc_grid;
//! Space Decomposition
Decomposition dec;
Decomposition & dec;
//! Extension of each grid: Domain and ghost + domain
openfpm::vector<GBoxes<device_grid::dims>> gdb_ext;
......@@ -356,6 +361,7 @@ class grid_dist_id
}
}
<<<<<<< HEAD
/*! \brief Create the grids on memory
*
*/
......@@ -363,6 +369,18 @@ class grid_dist_id
{
Box<dim,St> g_rnd_box;
for (size_t i = 0 ; i < dim ; i++) {g_rnd_box.setHigh(i,0.5); g_rnd_box.setLow(i,-0.5);}
=======
public:
//! constructor
grid_dist_id(Decomposition & dec, const size_t (& g_sz)[dim], const Box<dim,St> & domain, const Ghost<dim,St> & ghost)
:domain(domain),ghost(ghost),dec(dec),v_cl(*global_v_cluster)
{
// Increment the reference counter of the decomposition
dec.incRef();
check_size(g_sz);
>>>>>>> master
// Get the number of local grid needed
size_t n_grid = dec.getNLocalHyperCube();
......@@ -370,6 +388,7 @@ class grid_dist_id
// create local grids for each hyper-cube
loc_grid = v_cl.allocate<device_grid>(n_grid);
<<<<<<< HEAD
// Size of the grid on each dimension
size_t l_res[dim];
......@@ -385,10 +404,15 @@ class grid_dist_id
// Convert from SpaceBox<dim,St> to SpaceBox<dim,long int>
SpaceBox<dim,long int> sp_t = cd_sm.convertDomainSpaceIntoGridUnits(sp);
SpaceBox<dim,long int> sp_tg = cd_sm.convertDomainSpaceIntoGridUnits(sp_g);
=======
// fill the global size of the grid
for (size_t i = 0 ; i < dim ; i++) {this->g_sz[i] = g_sz[i];}
>>>>>>> master
//! Save the origin of the sub-domain of the local grid
gdb_ext.last().origin = sp_tg.getP1();
<<<<<<< HEAD
// save information about the local grid: domain box seen inside the domain + ghost box (see GDBoxes for a visual meaning)
// and where the GDBox start, or the origin of the local grid (+ghost) in global coordinate
gdb_ext.last().Dbox = sp_t;
......@@ -403,6 +427,10 @@ class grid_dist_id
// Set the dimensions of the local grid
loc_grid.get(i).resize(l_res);
}
=======
// Calculate ghost boxes
dec.calculateGhostBoxes();
>>>>>>> master
}
/*! \brief Default Copy constructor on this class make no sense and is unsafe, this definition disable it
......@@ -416,8 +444,16 @@ class grid_dist_id
*
*
*/
<<<<<<< HEAD
inline void InitializeCellDecomposer(const size_t (& g_sz)[dim])
=======
grid_dist_id(const size_t (& g_sz)[dim],const Box<dim,St> & domain, const Ghost<dim,St> & g)
:domain(domain),ghost(g),dec(*new Decomposition(*global_v_cluster)),v_cl(*global_v_cluster)
>>>>>>> master
{
// Increment the reference counter of the decomposition
dec.incRef();
// check that the grid has valid size
check_size(g_sz);
......@@ -640,6 +676,11 @@ public:
//! Destructor
~grid_dist_id()
{
dec.decRef();
// if we reach the 0, destroy the object
if (dec.ref() == 0)
delete &dec;
}
/*! \brief Get the Virtual Cluster machine
......
......@@ -872,24 +872,24 @@ void Test3D_complex(const Box<3,float> & domain, long int k)
// In this case the boundary condition are non periodic
if (g_dist.isInside(key_g))
{
match &= (g_dist.template get<p::x>(key),1 + k)?true:false;
match &= (g_dist.template get<p::y>(key),567 + k)?true:false;
match &= (g_dist.template get<p::z>(key), 341 + k)?true:false;
match &= (g_dist.template get<p::s>(key), 5670 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[0], 921 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[1], 5675 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[2], 117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][0], 1921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][1], 25675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][2], 3117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][0], 4921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][1], 55675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][2], 6117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][0], 7921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][1], 85675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][2], 9117 + k)?true:false;
match &= (g_dist.template get<p::x>(key) == 1 + k)?true:false;
match &= (g_dist.template get<p::y>(key) == 567 + k)?true:false;
match &= (g_dist.template get<p::z>(key) == 341 + k)?true:false;
match &= (g_dist.template get<p::s>(key) == 5670 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[0] == 921 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[1] == 5675 + k)?true:false;
match &= (g_dist.template get<p::v>(key)[2] == 117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][0] == 1921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][1] == 25675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[0][2] == 3117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][0] == 4921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][1] == 55675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[1][2] == 6117 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][0] == 7921 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][1] == 85675 + k)?true:false;
match &= (g_dist.template get<p::t>(key)[2][2] == 9117 + k)?true:false;
}
++domg;
......@@ -899,6 +899,106 @@ void Test3D_complex(const Box<3,float> & domain, long int k)
}
}