Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
24b8b517
Commit
24b8b517
authored
4 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Update comments in CLUSTER and return MPI_Init() result as exit code
parent
3cac3298
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cluster/cluster.cpp
+6
-5
6 additions, 5 deletions
src/cluster/cluster.cpp
src/cluster/np_cluster.cpp
+18
-17
18 additions, 17 deletions
src/cluster/np_cluster.cpp
with
24 additions
and
22 deletions
src/cluster/cluster.cpp
+
6
−
5
View file @
24b8b517
...
...
@@ -228,7 +228,6 @@ void cluster(const string& config_file, const string& data_file, const string& o
int
nsph
=
gconf
->
number_of_spheres
;
// Sanity check on number of sphere consistency, should always be verified
if
(
s_nsph
==
nsph
)
{
// Shortcuts to variables stored in configuration objects
ScatteringAngles
*
p_scattering_angles
=
new
ScatteringAngles
(
gconf
);
double
wp
=
sconf
->
wp
;
// ClusterOutputInfo : Thread 0 of MPI process 0 allocates the memory to
...
...
@@ -297,8 +296,8 @@ void cluster(const string& config_file, const string& data_file, const string& o
#pragma omp single
{
jer
=
cluster_jxi488_cycle
(
jxi488
,
sconf
,
gconf
,
p_scattering_angles
,
cid
,
p_output
,
output_path
,
vtppoanp
);
}
}
}
// OMP sinlge
}
// OMP parallel
#ifdef USE_NVTX
nvtxRangePop
();
#endif
...
...
@@ -544,7 +543,7 @@ void cluster(const string& config_file, const string& data_file, const string& o
time_logger
->
log
(
message
);
fclose
(
timing_file
);
delete
time_logger
;
}
// end instruction
s
block
o
f MPI process 0
}
// end
of
instruction block f
or
MPI process 0
//===============================
// instruction block for MPI processes different from 0
...
...
@@ -738,6 +737,8 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
if
(
jer
!=
0
)
{
output
->
vec_ier
[
jindex
-
1
]
=
1
;
output
->
vec_jxi
[
jindex
-
1
]
=
-
jxi488
;
logger
->
log
(
"Error in HJV for scale "
+
to_string
(
jxi488
)
+
"!"
,
LOG_ERRO
);
delete
logger
;
return
jer
;
// break; // rewrite this to go to the end of the function, to free locally allocated variables and return jer
}
...
...
This diff is collapsed.
Click to expand it.
src/cluster/np_cluster.cpp
+
18
−
17
View file @
24b8b517
...
...
@@ -70,8 +70,9 @@ extern void cluster(const string& config_file, const string& data_file, const st
* \return result: `int` An exit code passed to the OS (0 for succesful execution).
*/
int
main
(
int
argc
,
char
**
argv
)
{
int
ierr
=
0
;
#ifdef MPI_VERSION
int
ierr
=
MPI_Init
(
&
argc
,
&
argv
);
ierr
=
MPI_Init
(
&
argc
,
&
argv
);
// create and initialise class with essential MPI data
mixMPI
*
mpidata
=
new
mixMPI
(
MPI_COMM_WORLD
);
#else
...
...
@@ -91,5 +92,5 @@ int main(int argc, char **argv) {
MPI_Finalize
();
#endif
delete
mpidata
;
return
0
;
return
ierr
;
}
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