Skip to content
Snippets Groups Projects
Commit 24eba207 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

define NDEBUG in field_descriptor.cpp

parent f6340e31
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* *
************************************************************************/ ************************************************************************/
#define NDEBUG
#include <stdlib.h> #include <stdlib.h>
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
... ...
......
...@@ -170,18 +170,15 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst ...@@ -170,18 +170,15 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst
std::copy(src, std::copy(src,
src + this->fs->rd->local_size, src + this->fs->rd->local_size,
dst + bsize); dst + bsize);
//DEBUG_MSG("send tag is %d\n", MOD(this->fs->rd->starts[0]-1, this->fs->rd->sizes[0]));
//DEBUG_MSG("recv tag is %d\n", MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0]-1, this->fs->rd->sizes[0]));
//DEBUG_MSG("destination cpu is %d\n",
// this->fs->rd->rank[MOD(this->fs->rd->starts[0]-1, this->fs->rd->sizes[0])]);
//DEBUG_MSG("source cpu is %d\n",
// this->fs->rd->rank[MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0], this->fs->rd->sizes[0])]
// );
/* take care of buffer regions. /* take care of buffer regions.
* I could make the code use blocking sends and receives, but it seems cleaner this way. * I could make the code use blocking sends and receives, but it seems cleaner this way.
* (alternative is to have a couple of loops). * (alternative is to have a couple of loops).
* */ * */
// 1. send lower slices // 1. send lower slices
//DEBUG_MSG(
// "destination rank is %d, message is %d\n",
// this->fs->rd->rank[MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0], this->fs->rd->sizes[0])],
// MOD(this->fs->rd->starts[0]-1, this->fs->rd->sizes[0]));
MPI_Isend( MPI_Isend(
(void*)(src), (void*)(src),
bsize, bsize,
...@@ -191,6 +188,10 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst ...@@ -191,6 +188,10 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst
this->fs->rd->comm, this->fs->rd->comm,
mpirequest); mpirequest);
// 2. receive higher slices // 2. receive higher slices
//DEBUG_MSG(
// "source rank is %d, message is %d\n",
// this->fs->rd->rank[MOD(this->fs->rd->starts[0]-1, this->fs->rd->sizes[0])],
// MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0]-1, this->fs->rd->sizes[0]));
MPI_Irecv( MPI_Irecv(
(void*)(dst + bsize + this->fs->rd->local_size), (void*)(dst + bsize + this->fs->rd->local_size),
bsize, bsize,
...@@ -204,7 +205,7 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst ...@@ -204,7 +205,7 @@ void slab_field_particles<rnumber>::rFFTW_to_buffered(rnumber *src, rnumber *dst
//DEBUG_MSG( //DEBUG_MSG(
// "destination rank is %d, message is %d\n", // "destination rank is %d, message is %d\n",
// this->fs->rd->rank[MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0], this->fs->rd->sizes[0])], // this->fs->rd->rank[MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0], this->fs->rd->sizes[0])],
// this->fs->rd->starts[0]+this->fs->rd->subsizes[0]); // MOD(this->fs->rd->starts[0]+this->fs->rd->subsizes[0], this->fs->rd->sizes[0]));
MPI_Isend( MPI_Isend(
(void*)(src + this->fs->rd->local_size - bsize), (void*)(src + this->fs->rd->local_size - bsize),
bsize, bsize,
... ...
......
...@@ -40,7 +40,8 @@ def main(opt): ...@@ -40,7 +40,8 @@ def main(opt):
c.parameters['niter_todo'] = opt.nsteps c.parameters['niter_todo'] = opt.nsteps
c.parameters['famplitude'] = 0.0 c.parameters['famplitude'] = 0.0
if opt.run: if opt.run:
subprocess.call(['rm', 'test1_*', 'test2_*']) subprocess.call(['rm test1_*'], shell = True)
subprocess.call(['rm test2_*'], shell = True)
#subprocess.call(['make', 'clean']) #subprocess.call(['make', 'clean'])
c.execute(ncpu = opt.ncpu) c.execute(ncpu = opt.ncpu)
dtype = pickle.load(open(c.name + '_dtype.pickle')) dtype = pickle.load(open(c.name + '_dtype.pickle'))
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment