Commit b9c14fad authored by Pietro Incardona's avatar Pietro Incardona

Adding getMPIComm to vcluster

parents b3cffbf7 b95ab401
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
###### Other
*.vtk
AUTHORS
COPYING
ChangeLog
INSTALL
NEWS
README
Makefile
Makefile.in
config.status
configure
numerics
**/.deps
**/src/config
aclocal.m4
**/autom4te.cache
**/doxygen
vcluster
libvcluster.a
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.6 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<detaileddescription title=""/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>
......@@ -11,11 +11,8 @@ mv /tmp/openfpm_vcluster openfpm_vcluster
mkdir openfpm_vcluster/src/config
git clone ssh://git@ppmcoremirror.dynu.com:2222/incardon/openfpm_devices.git openfpm_devices
git clone ssh://git@ppmcoremirror.dynu.com:2222/incardon/openfpm_data.git openfpm_data
cd openfpm_data
git checkout develop
cd ..
git clone git@ppmcore.mpi-cbg.de:/incardon/openfpm_devices.git openfpm_devices
git clone git@ppmcore.mpi-cbg.de:/incardon/openfpm_data.git openfpm_data
cd "$1/openfpm_vcluster"
......@@ -69,7 +66,7 @@ then
echo "$PATH"
module load gcc/4.8.2
module load boost/1.55.0-gnu4.8
module load openmpi/1.8.7
module load openmpi/1.8.8-gnu
module unload bullxmpi
sh ./autogen.sh
......@@ -77,15 +74,19 @@ then
make
if [ $? -ne 0 ]; then exit 1 ; fi
salloc --nodes=1 --ntasks-per-node=16 --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 16 src/vcluster"
salloc --nodes=1 --ntasks-per-node=24 --exclude=taurusi[6300-6400],taurusi[5400-5500] --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 24 src/vcluster --report_level=no"
if [ $? -ne 0 ]; then exit 1 ; fi
salloc --nodes=2 --ntasks-per-node=16 --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 32 src/vcluster"
sleep 5
salloc --nodes=2 --ntasks-per-node=24 --exclude=taurusi[6300-6400],taurusi[5400-5500] --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 48 src/vcluster --report_level=no"
if [ $? -ne 0 ]; then exit 1 ; fi
salloc --nodes=4 --ntasks-per-node=16 --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 64 src/vcluster"
sleep 5
salloc --nodes=4 --ntasks-per-node=24 --exclude=taurusi[6300-6400],taurusi[5400-5500] --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 96 src/vcluster --report_level=no"
if [ $? -ne 0 ]; then exit 1 ; fi
salloc --nodes=8 --ntasks-per-node=16 --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 128 src/vcluster"
sleep 5
salloc --nodes=8 --ntasks-per-node=24 --exclude=taurusi[6300-6400],taurusi[5400-5500] --time=00:05:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 192 src/vcluster --report_level=no"
if [ $? -ne 0 ]; then exit 1 ; fi
salloc --nodes=16 --ntasks-per-node=16 --time=00:5:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 256 src/vcluster"
sleep 5
salloc --nodes=10 --ntasks-per-node=24 --exclude=taurusi[6300-6400],taurusi[5400-5500] --time=00:5:00 --mem-per-cpu=1900 --partition=haswell bash -c "ulimit -s unlimited && mpirun -np 240 src/vcluster --report_level=no"
if [ $? -ne 0 ]; then exit 1 ; fi
else
......
......@@ -17,7 +17,18 @@ m4_ifdef([AX_BOOST_IOSTREAMS],,[m4_include([m4/ax_boost_iostreams.m4])])
m4_ifdef([AX_BOOST_PROGRAM_OPTIONS],,[m4_include([m4/ax_boost_program_options.m4])])
m4_ifdef([AX_BOOST_UNIT_TEST_FRAMEWORK],,[m4_include([m4/ax_boost_unit_test_framework.m4])])
CXXFLAGS+=" --std=c++11 -march=native -mtune=native -Wno-unused-local-typedefs -Wextra -Wno-unused-parameter "
case $host_os in
*cygwin*)
# Do something specific for cygwin
CXXFLAGS+=" --std=gnu++11 "
;;
*)
#Default Case
CXXFLAGS+=" --std=c++11 "
;;
esac
CXXFLAGS+=" -march=native -mtune=native -Wno-unused-local-typedefs -Wextra -Wno-unused-parameter "
NVCCFLAGS=" "
INCLUDES_PATH=" "
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,7 +16,7 @@
class MPI_IsendWB
{
public:
static inline void send(size_t proc , size_t tag ,void * buf, size_t sz, MPI_Request & req)
static inline void send(size_t proc , size_t tag ,const void * buf, size_t sz, MPI_Request & req)
{
MPI_Isend(buf, sz,MPI_BYTE, proc, tag , MPI_COMM_WORLD,&req);
}
......
......@@ -13,7 +13,7 @@ libvcluster_a_CXXFLAGS = $(INCLUDES_PATH) $(BOOST_CPPFLAGS)
libvcluster_a_CFLAGS =
nobase_include_HEADERS = MPI_wrapper/MPI_IallreduceW.hpp MPI_wrapper/MPI_IrecvW.hpp MPI_wrapper/MPI_IsendW.hpp MPI_wrapper/MPI_util.hpp MPI_wrapper/MPI_IAllGather.hpp \
Pack_selector.hpp Pack_stat.hpp Packer.hpp Unpacker.hpp VCluster.hpp VCluster_object.hpp VCluster_object_array.hpp VObject.hpp \
VCluster_semantic.ipp VCluster.hpp VCluster_object.hpp \
util/Vcluster_log.hpp
.cu.o :
......
/*
* Pack_selector.hpp
*
* Created on: Jul 15, 2015
* Author: Pietro Incardona
*/
#include <type_traits>
//! Primitive packing
#define PACKER_PRIMITIVE 1
//! Encapsulated Object packing
#define PACKER_ENCAP_OBJECTS 3
//! Vector of objects packing
#define PACKER_VECTOR 4
//! Grid packing
#define PACKER_GRID 5
//! Packer cannot check for pointers
#define PACKER_OBJECTS_WITH_WARNING_POINTERS 6
//! Packer error structure has pointers
#define PACKER_OBJECTS_WITH_POINTER_CHECK 7
#ifndef SRC_PACK_SELECTOR_HPP_
#define SRC_PACK_SELECTOR_HPP_
#define IS_ENCAP 4
#define IS_GRID 2
#define IS_VECTOR 1
/*! \brief Pack selector for unknown type
*
*
*/
template <typename T, bool has_noPointers>
struct Pack_selector_unknown_type_impl
{
enum
{
value = PACKER_OBJECTS_WITH_POINTER_CHECK
};
};
template <typename T>
struct Pack_selector_unknown_type_impl<T,false>
{
enum
{
value = PACKER_OBJECTS_WITH_WARNING_POINTERS
};
};
/*! \brief Pack selector for unknown type
*
*
*/
template <typename T, int known_type>
struct Pack_selector_known_type_impl
{
enum
{
value = Pack_selector_unknown_type_impl<T, has_noPointers<T>::value >::value
};
};
template <typename T>
struct Pack_selector_known_type_impl<T,IS_GRID>
{
enum
{
value = PACKER_GRID
};
};
template <typename T>
struct Pack_selector_known_type_impl<T,IS_VECTOR>
{
enum
{
value = PACKER_VECTOR
};
};
template <typename T>
struct Pack_selector_known_type_impl<T,IS_ENCAP>
{
enum
{
value = PACKER_ENCAP_OBJECTS
};
};
/////////////////////// ---------- CHECKING FOR PRIMITIVES --------------
/*! \brief it is not a fundamental type
*
*/
template<typename T, bool is_foundamental>
struct Pack_selector_impl
{
enum
{
value = Pack_selector_known_type_impl< T, 4*is_encap<T>::value + is_grid<T>::value * 2 + is_vector<T>::value >::value
};
};
/*! \brief Select the primitive packing
*
*/
template<typename T>
struct Pack_selector_impl<T,true>
{
enum
{
value = PACKER_PRIMITIVE
};
};
//////////////////////////////////////////////////////////////////////////
/*! \brief Pack selector
*
*
*/
template <typename T>
struct Pack_selector
{
enum
{
value = Pack_selector_impl< T,std::is_fundamental<T>::value >::value
};
};
#endif /* SRC_PACK_SELECTOR_HPP_ */
/*
* Pack_stat.hpp
*
* Created on: Jul 17, 2015
* Author: i-bird
*/
#ifndef SRC_PACK_STAT_HPP_
#define SRC_PACK_STAT_HPP_
/*! \brief Unpacking status object
*
*
*/
class Unpack_stat
{
size_t cnt;
public:
inline Unpack_stat()
:cnt(0)
{}
/*! \brief Increment the request pointer
*
* \param cnt counter
*
*/
inline void addOffset(size_t off)
{
cnt += off;
}
/*! \brief Return the actual counter
*
*
*/
inline size_t getOffset()
{
return cnt;
}
};
/*! \brief Packing status object
*
*
*/
class Pack_stat
{
size_t p_mark;
size_t un_ele;
public:
inline Pack_stat()
:p_mark(0),un_ele(0)
{}
/*! \brief Increment the request pointer
*
*
*/
inline void incReq()
{
un_ele++;
}
/*! \brief return the actual request for packing
*
* \return the actual request for packing
*
*/
inline size_t reqPack()
{
return un_ele;
}
/*! \brief Mark
*
*
*
*/
inline void mark()
{
p_mark = un_ele;
}
/*! \brief Return the mark
*
* \return the mark
*
*/
inline size_t getMark()
{
return p_mark;
}
/*! \brief Return the memory pointer at the mark place
*
* \tparam T memory object
*
* \return memory pointer at mark place
*
*/
template<typename T> inline void * getMarkPointer(T & mem)
{
return mem.getPointer(p_mark);
}
/*! \brief Get the memory size from the mark point
*
* \tparam T memory object
*
*/
template<typename T> size_t getMarkSize(T & mem)
{
return (char *)mem.getPointer(un_ele) - (char *)mem.getPointer(p_mark);
}
};
#endif /* SRC_PACK_STAT_HPP_ */
/*
* Packer_cls.hpp
*
* Created on: Jul 15, 2015
* Author: i-bird
*/
#ifndef SRC_PACKER_HPP_
#define SRC_PACKER_HPP_
#include "util/object_util.hpp"
#include "Grid/util.hpp"
#include "Vector/util.hpp"
#include "memory/ExtPreAlloc.hpp"
#include "util/util_debug.hpp"
#include "Pack_stat.hpp"
#include "Pack_selector.hpp"
/*! \brief Packing class
*
* This class pack objects primitives vectors and grids, the general usage is to create a vector of
* packing request (std::vector<size_t>) that contain the size of the required space needed to pack
* the information. Calculate the total size, allocating it on HeapMemory (for example), Create an
* ExtPreAlloc memory object giving the preallocated memory to it and finally Pack all the objects
* subsequently
*
* In order to unpack the information the Unpacker class can be used
*
* \see Unpacker
*
* \snippet Packer_unit_tests.hpp Pack into a message primitives objects vectors and grids
*
* \tparam T object type to pack
* \tparam Mem Memory origin HeapMemory CudaMemory ...
* \tparam Implementation of the packer (the Pack_selector choose the correct one)
*
*/
template<typename T, typename Mem, int pack_type=Pack_selector<T>::value >
class Packer
{
public:
/*! \brief Error, no implementation
*
*/
static void pack(ExtPreAlloc<Mem> , const T & obj)
{
std::cerr << "Error: " << __FILE__ << ":" << __LINE__ << " packing for the type " << demangle(typeid(T).name()) << " is not implemented\n";
}
/*! \brief Error, no implementation
*