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
d25f89c3
Commit
d25f89c3
authored
1 year ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
tweaks documentation/version information
parent
9a32878d
No related branches found
No related tags found
1 merge request
!70
Feature/update branching rules
Pipeline
#185022
canceled
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpp/full_code/main_code.hpp
+26
-24
26 additions, 24 deletions
cpp/full_code/main_code.hpp
cpp/turtle_config.hpp.in
+1
-0
1 addition, 0 deletions
cpp/turtle_config.hpp.in
with
27 additions
and
24 deletions
cpp/full_code/main_code.hpp
+
26
−
24
View file @
d25f89c3
...
...
@@ -51,9 +51,6 @@ void print_pinning_info(void)
std
::
cerr
<<
"### pinning info begin"
<<
std
::
endl
;
std
::
cerr
<<
pinning_info
;
std
::
cerr
<<
"### pinning info end"
<<
std
::
endl
;
std
::
cout
<<
"### pinning info begin"
<<
std
::
endl
;
std
::
cout
<<
pinning_info
;
std
::
cout
<<
"### pinning info end"
<<
std
::
endl
;
}
}
...
...
@@ -69,6 +66,11 @@ int main_code(
char
*
argv
[],
const
bool
floating_point_exceptions
)
{
/**********************/
/* basic code info */
std
::
cerr
<<
"TurTLE version "
+
std
::
string
(
TURTLE_VERSION
)
<<
std
::
endl
;
/* floating point exception switch */
if
(
floating_point_exceptions
)
feenableexcept
(
FE_INVALID
|
FE_OVERFLOW
);
...
...
@@ -86,34 +88,31 @@ int main_code(
return
EXIT_SUCCESS
;
}
std
::
string
simname
=
std
::
string
(
argv
[
1
]);
/**********************/
/**********************/
/* initialize MPI environment */
#ifndef USE_FFTW_OMP
MPI_Init
(
&
argc
,
&
argv
);
// turn off MPI profiling for initialization
#else
int
mpiprovided
;
MPI_Init_thread
(
&
argc
,
&
argv
,
MPI_THREAD_FUNNELED
,
&
mpiprovided
);
#endif
/* turn off MPI profiling for initialization */
MPI_Pcontrol
(
0
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
nprocs
);
print_pinning_info
();
#ifndef USE_FFTW_OMP
fftw_mpi_init
();
fftwf_mpi_init
();
DEBUG_MSG
(
"There are %d processes
\n
"
,
nprocs
);
#else
int
mpiprovided
;
MPI_Init_thread
(
&
argc
,
&
argv
,
MPI_THREAD_FUNNELED
,
&
mpiprovided
);
MPI_Pcontrol
(
0
);
assert
(
mpiprovided
>=
MPI_THREAD_FUNNELED
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
nprocs
);
print_pinning_info
();
const
int
nThreads
=
omp_get_max_threads
();
DEBUG_MSG
(
"Number of threads for the FFTW = %d
\n
"
,
nThreads
);
if
(
nThreads
>
1
){
fftw_init_threads
();
fftwf_init_threads
();
...
...
@@ -129,10 +128,14 @@ int main_code(
}
#endif
print_pinning_info
();
/* read maximum MPI tag value */
read_maximum_MPI_tag_value
();
/**********************/
/**********************/
/* import fftw wisdom */
if
(
myrank
==
0
)
{
...
...
@@ -146,18 +149,13 @@ int main_code(
fftwf_set_timelimit
(
300
);
fftw_set_timelimit
(
300
);
/**********************/
/**********************/
/* actually run DNS */
/*
* MPI environment:
* I could in principle pass myrank and nprocs instead of the global
* communicator, but it is possible that we'd like to do something more
* complex in the future (since I've done it in the past), and it's not
* expensive to keep several copies of myrank and nprocs.
*
* usage of assert:
/* usage of assert:
* we could use assert here, but I assume that any problems we can still
* recover from should not be important enough to not clean up fftw and MPI
* things.
...
...
@@ -198,9 +196,10 @@ int main_code(
}
delete
dns
;
/**********************/
/**********************/
/* export fftw wisdom */
fftwf_mpi_gather_wisdom
(
MPI_COMM_WORLD
);
fftw_mpi_gather_wisdom
(
MPI_COMM_WORLD
);
...
...
@@ -212,9 +211,11 @@ int main_code(
fftw_export_wisdom_to_filename
(
(
simname
+
std
::
string
(
"_fftw_wisdom.txt"
)).
c_str
());
}
/**********************/
/**********************/
/* clean up */
fftwf_mpi_cleanup
();
fftw_mpi_cleanup
();
...
...
@@ -231,6 +232,7 @@ int main_code(
#endif
MPI_Finalize
();
/**********************/
return
global_return_value
;
}
...
...
This diff is collapsed.
Click to expand it.
cpp/turtle_config.hpp.in
+
1
−
0
View file @
d25f89c3
...
...
@@ -27,6 +27,7 @@
#define TURTLE_CONFIG_HPP
#define TURTLE_VERSION "@TURTLE_VERSION@"
#define TURTLE_VERSION_LONG "@TURTLE_VERSION_LONG@"
#cmakedefine USE_FFTW_OMP
#cmakedefine USE_TIMING_OUTPUT
...
...
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