Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
code
pugs
Commits
6b5f1566
Commit
6b5f1566
authored
1 year ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add a command line option to set parallel checker database filename
parent
b36a435a
No related branches found
No related tags found
1 merge request
!176
Add HDF5 support
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/dev_utils/ParallelChecker.hpp
+25
-1
25 additions, 1 deletion
src/dev_utils/ParallelChecker.hpp
src/utils/PugsUtils.cpp
+5
-0
5 additions, 0 deletions
src/utils/PugsUtils.cpp
with
30 additions
and
1 deletion
src/dev_utils/ParallelChecker.hpp
+
25
−
1
View file @
6b5f1566
...
@@ -43,7 +43,7 @@ class ParallelChecker
...
@@ -43,7 +43,7 @@ class ParallelChecker
Mode
m_mode
=
Mode
::
automatic
;
Mode
m_mode
=
Mode
::
automatic
;
size_t
m_tag
=
0
;
size_t
m_tag
=
0
;
std
::
string
m_filename
=
"
testme/
parallel_checker.h5"
;
std
::
string
m_filename
=
"parallel_checker.h5"
;
ParallelChecker
()
=
default
;
ParallelChecker
()
=
default
;
...
@@ -680,12 +680,36 @@ class ParallelChecker
...
@@ -680,12 +680,36 @@ class ParallelChecker
return
*
m_instance
;
return
*
m_instance
;
}
}
Mode
mode
()
const
{
return
m_mode
;
}
void
void
setMode
(
const
Mode
&
mode
)
setMode
(
const
Mode
&
mode
)
{
{
if
(
m_tag
!=
0
)
{
throw
UnexpectedError
(
"Cannot modify parallel checker mode if it was already used"
);
}
m_mode
=
mode
;
m_mode
=
mode
;
}
}
const
std
::
string
&
filename
()
const
{
return
m_filename
;
}
void
setFilename
(
const
std
::
string
&
filename
)
{
if
(
m_tag
!=
0
)
{
throw
UnexpectedError
(
"Cannot modify parallel checker file if it was already used"
);
}
m_filename
=
filename
;
}
bool
bool
isWriting
()
const
isWriting
()
const
{
{
...
...
This diff is collapsed.
Click to expand it.
src/utils/PugsUtils.cpp
+
5
−
0
View file @
6b5f1566
...
@@ -89,6 +89,7 @@ initialize(int& argc, char* argv[])
...
@@ -89,6 +89,7 @@ initialize(int& argc, char* argv[])
int
nb_threads
=
-
1
;
int
nb_threads
=
-
1
;
ParallelChecker
::
Mode
pc_mode
=
ParallelChecker
::
Mode
::
automatic
;
ParallelChecker
::
Mode
pc_mode
=
ParallelChecker
::
Mode
::
automatic
;
std
::
string
pc_filename
=
ParallelChecker
::
instance
().
filename
();
std
::
string
filename
;
std
::
string
filename
;
{
{
...
@@ -134,6 +135,9 @@ initialize(int& argc, char* argv[])
...
@@ -134,6 +135,9 @@ initialize(int& argc, char* argv[])
"Parallel checker mode (auto: sequential write/parallel read) [default: auto]"
)
"Parallel checker mode (auto: sequential write/parallel read) [default: auto]"
)
->
transform
(
CLI
::
CheckedTransformer
(
pc_mode_map
));
->
transform
(
CLI
::
CheckedTransformer
(
pc_mode_map
));
app
.
add_option
(
"--parallel-checker-file"
,
pc_filename
,
"Parallel checker filename [default: "
+
pc_filename
+
"]"
);
int
mpi_split_color
=
-
1
;
int
mpi_split_color
=
-
1
;
app
.
add_option
(
"--mpi-split-color"
,
mpi_split_color
,
"Sets the MPI split color value (for MPMD applications)"
)
app
.
add_option
(
"--mpi-split-color"
,
mpi_split_color
,
"Sets the MPI split color value (for MPMD applications)"
)
->
check
(
CLI
::
Range
(
0
,
std
::
numeric_limits
<
decltype
(
mpi_split_color
)
>::
max
()));
->
check
(
CLI
::
Range
(
0
,
std
::
numeric_limits
<
decltype
(
mpi_split_color
)
>::
max
()));
...
@@ -178,6 +182,7 @@ initialize(int& argc, char* argv[])
...
@@ -178,6 +182,7 @@ initialize(int& argc, char* argv[])
}
}
ParallelChecker
::
instance
().
setMode
(
pc_mode
);
ParallelChecker
::
instance
().
setMode
(
pc_mode
);
ParallelChecker
::
instance
().
setFilename
(
pc_filename
);
if
(
ConsoleManager
::
showPreamble
())
{
if
(
ConsoleManager
::
showPreamble
())
{
std
::
cout
<<
"----------------- "
<<
rang
::
fg
::
green
<<
"pugs exec info"
<<
rang
::
fg
::
reset
std
::
cout
<<
"----------------- "
<<
rang
::
fg
::
green
<<
"pugs exec info"
<<
rang
::
fg
::
reset
...
...
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