Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
24eba207
Commit
24eba207
authored
Jul 9, 2015
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
define NDEBUG in field_descriptor.cpp
parent
f6340e31
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/field_descriptor.cpp
+2
-0
2 additions, 0 deletions
src/field_descriptor.cpp
src/slab_field_particles.cpp
+9
-8
9 additions, 8 deletions
src/slab_field_particles.cpp
test.py
+2
-1
2 additions, 1 deletion
test.py
with
13 additions
and
9 deletions
src/field_descriptor.cpp
+
2
−
0
View file @
24eba207
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
*
*
************************************************************************/
************************************************************************/
#define NDEBUG
#include
<stdlib.h>
#include
<stdlib.h>
#include
<algorithm>
#include
<algorithm>
#include
<iostream>
#include
<iostream>
...
...
...
...
This diff is collapsed.
Click to expand it.
src/slab_field_particles.cpp
+
9
−
8
View file @
24eba207
...
@@ -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
,
...
...
...
...
This diff is collapsed.
Click to expand it.
test.py
+
2
−
1
View file @
24eba207
...
@@ -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
'
))
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment