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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
f29a4aeb
Commit
f29a4aeb
authored
10 years ago
by
Chichi Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
add debug messages
parent
4aeeb630
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
makefile
+1
-1
1 addition, 1 deletion
makefile
src/Morton_shuffler.cpp
+9
-0
9 additions, 0 deletions
src/Morton_shuffler.cpp
src/RMHD_converter.cpp
+19
-7
19 additions, 7 deletions
src/RMHD_converter.cpp
src/field_descriptor.cpp
+2
-0
2 additions, 0 deletions
src/field_descriptor.cpp
with
31 additions
and
8 deletions
makefile
+
1
−
1
View file @
f29a4aeb
MPICXX
=
mpicxx
LINKER
=
mpicxx
DEFINES
=
DEFINES
=
-DNDEBUG
CFLAGS
=
-Wall
\
-O2
\
#-pg
\
...
...
This diff is collapsed.
Click to expand it.
src/Morton_shuffler.cpp
+
9
−
0
View file @
f29a4aeb
...
...
@@ -15,6 +15,15 @@ Morton_shuffler::Morton_shuffler(
"Aborting.
\n
"
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
if
((
N0
/
8
%
nprocs
!=
0
)
&&
(
N1
/
8
%
nprocs
!=
0
)
&&
(
N2
/
8
%
nprocs
!=
0
))
{
std
::
cerr
<<
"Number of cpus incompatible with z-index representation.
\n
"
"Aborting.
\n
"
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
int
n
[
4
];
// various descriptions for the real data
...
...
This diff is collapsed.
Click to expand it.
src/RMHD_converter.cpp
+
19
−
7
View file @
f29a4aeb
...
...
@@ -9,14 +9,8 @@ RMHD_converter::RMHD_converter(
int
N0
,
int
N1
,
int
N2
,
int
nfiles
)
{
if
(
nprocs
%
nfiles
!=
0
)
{
std
::
cerr
<<
"Number of output files incompatible with number of processes.
\n
"
"Aborting.
\n
"
<<
std
::
endl
;
exit
(
EXIT_FAILURE
);
}
int
n
[
7
];
proc_print_err_message
(
"entering constructor of RMHD_converter"
);
// first 3 arguments are dimensions for input array
// i.e. actual dimensions for the Fourier representation.
...
...
@@ -71,6 +65,7 @@ RMHD_converter::RMHD_converter(
FFTW_ESTIMATE
);
this
->
s
=
new
Morton_shuffler
(
N0
,
N1
,
N2
,
2
,
nfiles
);
proc_print_err_message
(
"exiting constructor of RMHD_converter"
);
}
RMHD_converter
::~
RMHD_converter
()
...
...
@@ -96,9 +91,17 @@ int RMHD_converter::convert(
const
char
*
ofile
)
{
//read first field
proc_print_err_message
(
"RMHD_converter::convert "
"this->f0c->read(ifile0, (void*)this->c0);"
);
this
->
f0c
->
read
(
ifile0
,
(
void
*
)
this
->
c0
);
proc_print_err_message
(
"RMHD_converter::convert "
"this->f0c->transpose(this->c0, this->c12);"
);
this
->
f0c
->
transpose
(
this
->
c0
,
this
->
c12
);
proc_print_err_message
(
"RMHD_converter::convert "
"this->f1c->transpose(this->c12);"
);
this
->
f1c
->
transpose
(
this
->
c12
);
proc_print_err_message
(
"RMHD_converter::convert "
"fftwf_copy_complex_array("
);
fftwf_copy_complex_array
(
this
->
f2c
,
this
->
c12
,
this
->
f3c
,
this
->
c3
);
...
...
@@ -111,12 +114,21 @@ int RMHD_converter::convert(
this
->
f2c
,
this
->
c12
,
this
->
f3c
,
this
->
c3
+
this
->
f3c
->
local_size
);
proc_print_err_message
(
"RMHD_converter::convert "
"this->f3c->interleave(this->c3, 2);"
);
this
->
f3c
->
interleave
(
this
->
c3
,
2
);
proc_print_err_message
(
"RMHD_converter::convert "
"fftwf_execute(this->complex2real);"
);
fftwf_execute
(
this
->
complex2real
);
proc_print_err_message
(
"RMHD_converter::convert "
"fftwf_clip_zero_padding(this->f3r, this->r3, 2);"
);
fftwf_clip_zero_padding
(
this
->
f3r
,
this
->
r3
,
2
);
proc_print_err_message
(
"RMHD_converter::convert "
"this->s->shuffle(this->r3, ofile);"
);
this
->
s
->
shuffle
(
this
->
r3
,
ofile
);
proc_print_err_message
(
"RMHD_converter::convert return"
);
return
EXIT_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
src/field_descriptor.cpp
+
2
−
0
View file @
f29a4aeb
...
...
@@ -302,10 +302,12 @@ field_descriptor* field_descriptor::get_transpose()
void
proc_print_err_message
(
const
char
*
message
)
{
#ifndef NDEBUG
for
(
int
i
=
0
;
i
<
nprocs
;
i
++
)
{
if
(
myrank
==
i
)
std
::
cerr
<<
i
<<
" "
<<
message
<<
std
::
endl
;
MPI_Barrier
(
MPI_COMM_WORLD
);
}
#endif
}
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
register
or
sign in
to comment