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
917ff8f7
Commit
917ff8f7
authored
1 year ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Add a simple userdoc for parallel checker
parent
43795546
No related branches found
No related tags found
1 merge request
!176
Add HDF5 support
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/userdoc.org
+53
-1
53 additions, 1 deletion
doc/userdoc.org
with
53 additions
and
1 deletion
doc/userdoc.org
+
53
−
1
View file @
917ff8f7
...
...
@@ -2667,6 +2667,58 @@ Gets the abstract syntax tree associated to a user function into a
Saves the AST of the script into the file (whose name is given as
argument) using the dot format.
***** Parallel checker utilities
Developing parallel applications, it is generally useful to be able to
check that results are reproducible bit-to-bit, whichever the number
of processes or threads are. Such a mechanism is provided by ~pugs~.
It works as follows. One first runs the code to build a reference (by
now the reference cannot be build using ~MPI~ parallelism), then a
second run will compare the obtained results and reference ones. If
ghost value differs, a warning is printed, stating that the data is
not synchronized (this may not be a mistake) and if non-ghost value
differs the execution stops indicating an error.
Parallel checking points can be placed directly in the source code
(see developer documentation), but for convenience, one can also check
parallelism directly in the scripting language.
The provided functions are
- ~parallel_check: Vh*string -> void~
- ~parallel_check: item_array*string -> void~
- ~parallel_check: item_value*string -> void~
- ~parallel_check: sub_item_array*string -> void~
- ~parallel_check: sub_item_value*string -> void~
They allow to check parallelism for ~Vh~ functions, ~item_value~,
~item_array~, ~sub_item_value~ or ~sub_item_arrays~ variables. These types
are discussed below when describing the ~mesh~ and ~schemes~ module (see
sections [[mesh]] and [[scheme]]). The second argument is just a string that is just
used as a tag to ease the reading of the output.
To create the reference, one launches the code as
#+BEGIN_SRC shell :exports source
./pugs example.pgs --parallel-checker-file="/tmp/my-ref.h5"
#+END_SRC
Observe that the option ~--parallel-checker-file="/tmp/my-ref.h5"~ is
not mandatory. If not specified, the reference is created in the
current directory in the file ~parallel_checker.h5~. Also observe that
this command runs the code in sequential (in the sense that there is
no message passing). In that case parallel checker runs in write mode
automatically. To force the read mode (for comparison), one can use
the ~--parallel-checker-mode=read~ option
#+BEGIN_SRC shell :exports source
./pugs example.pgs \
--parallel-checker-file="/tmp/my-ref.h5" \
--parallel-checker-mode=read
#+END_SRC
Running the code in parallel automatically triggers the
read/comparison mode.
#+BEGIN_SRC shell :exports source
mpirun -n 3 pugs example.pgs --parallel-checker-file="/tmp/my-ref.h5"
#+END_SRC
*** The ~math~ module
The ~math~ module is a small utility module that provides a set of
...
...
@@ -2765,7 +2817,7 @@ mathematically ${x^y}^z = x^{(y^z)}$, many softwares treat it (by mistake)
as ${(x^y)}^z$. Thus, using the ~pow~ function avoids any confusion.
#+END_note
*** The ~mesh~ module
*** The ~mesh~ module
<<mesh>>
This is an important module. It provides mesh utility tools.
#+NAME: get-module-info-mesh
...
...
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