Commit 857088c9 authored by incardon's avatar incardon

Changhed the script for wetcluster

parent 65086c80
......@@ -15,7 +15,7 @@ cd "$1/OpenFPM_vcluster"
echo "Compiling on $2"
if [$2 eq "gin"]
if [$2 eq "gin" || $2 eq "wetcluster"]
then
echo "Compiling on gin\n"
module load gcc/4.9.2
......@@ -26,5 +26,11 @@ sh ./autogen.sh
sh ./configure CXX=mpic++
make
mpirun -np 2 ./src/vcluster
mpirun -np 4 ./src/vcluster
if [$2 eq "wetcluster"]
then
bsub -K -q gpu mpirun -np 2 ./src/vcluster
bsub -K -q gpu mpirun -np 4 ./src/vcluster
else
mpirun -np 2 ./src/vcluster
mpirun -np 4 ./src/vcluster
fi
......@@ -241,7 +241,7 @@ public:
*
*/
template<typename T> void sendrecvMultipleMessages(openfpm::vector< size_t > & prc, openfpm::vector< T > & data, void * (* msg_alloc)(size_t,size_t,size_t,size_t,void *), void * ptr_arg, long int opt=NONE)
template<typename T> void sendrecvMultipleMessages(openfpm::vector< size_t > & prc, openfpm::vector< T > & data, void * (* msg_alloc)(size_t,size_t,size_t,size_t,size_t,void *), void * ptr_arg, long int opt=NONE)
{
// resize map with the number of processors
map.resize(size);
......@@ -305,7 +305,7 @@ public:
*
*/
void sendrecvMultipleMessages(size_t n_send, size_t * map, size_t sz[], size_t prc[] , void * ptr[], void * (* msg_alloc)(size_t,size_t,size_t,size_t,void *), void * ptr_arg, long int opt)
void sendrecvMultipleMessages(size_t n_send, size_t * map, size_t sz[], size_t prc[] , void * ptr[], void * (* msg_alloc)(size_t,size_t,size_t,size_t,size_t,void *), void * ptr_arg, long int opt)
{
req.clear();
req.add();
......@@ -369,7 +369,7 @@ public:
for (size_t i = 0 ; i < n_proc_com ; i++)
{
void * ptr = msg_alloc(proc_com.get(i),total_msg,n_proc_com,proc_com.get(n_proc_com+i),ptr_arg);
void * ptr = msg_alloc(proc_com.get(i),total_msg,n_proc_com,proc_com.get(n_proc_com+i),i,ptr_arg);
req.add();
MPI_SAFE_CALL(MPI_Irecv(ptr,proc_com.get(i),MPI_BYTE,proc_com.get(i+n_proc_com),MSG_SEND_RECV,MPI_COMM_WORLD,&req.last()));
......
......@@ -26,7 +26,7 @@ size_t global_step = 0;
// Alloc the buffer to receive the messages
void * msg_alloc(size_t msg_i ,size_t total_msg, size_t total_p, size_t i, void * ptr)
void * msg_alloc(size_t msg_i ,size_t total_msg, size_t total_p, size_t i,size_t ri, void * ptr)
{
openfpm::vector<openfpm::vector<unsigned char>> * v = static_cast<openfpm::vector<openfpm::vector<unsigned char>> *>(ptr);
......@@ -44,7 +44,7 @@ void * msg_alloc(size_t msg_i ,size_t total_msg, size_t total_p, size_t i, void
size_t id = 0;
openfpm::vector<size_t> prc_recv;
void * msg_alloc2(size_t msg_i ,size_t total_msg, size_t total_p, size_t i, void * ptr)
void * msg_alloc2(size_t msg_i ,size_t total_msg, size_t total_p, size_t i, size_t ri, void * ptr)
{
openfpm::vector<openfpm::vector<unsigned char>> * v = static_cast<openfpm::vector<openfpm::vector<unsigned char>> *>(ptr);
......
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