You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Information on running the Umpire code and where to find examples.
4
+
---
5
+
6
+
# Running Umpire Examples
7
+
8
+
After a build completes, the executable files will be placed in the `bin` folder within the `build` directory. You can run Umpire exectuables from the `build` directory and any corresponding output and/or output files will be placed in the `build` directory.
9
+
10
+
## Examples
11
+
12
+
Examples can be found in `Umpire/examples`. You will see that a `tutorial` and `cookbook` subdirectory exist within the `examples` directory. The `cookbook` subdirectory contains a lot of valuable how-to examples. It is called a `cookbook` because the examples within provide a "recipe" for how to do something. For example, the "recipe_no_introspection" example shows how to turn off introspection when creating a QuickPool allocator.
13
+
14
+
## Sample Run Commands For Examples
15
+
16
+
In this example, we are running the allocator.cxx example to see which allocator we "got" after running `rm.getAllocator` and to view all available allocators by name:
17
+
`./bin/allocator`
18
+
19
+
This will generate output. If there is output generated from any Umpire example or test, make sure the user can see that.
20
+
21
+
## Tests
22
+
23
+
Tests can be found in `Umpire/tests`. From the `tests` directory, you can see that we have several different kinds of tests including `unit` and `integration` (and others). We try to keep the kinds of tests consistent with the folder they are created under.
24
+
25
+
## Sample Run Commands for Tests
26
+
27
+
In this example, we are running the `strategy_tests` test:
28
+
`ctest -T test -R strategy_tests --output-on-failure`
29
+
30
+
Be sure to show the user any output, regardless of whether it is due to failure or success.
description: Workflow guidance for working with Umpire's Fortran interface with shroud, including safe editing steps and common shroud pitfalls.
4
+
---
5
+
6
+
# Shroud Workflow
7
+
8
+
Use this skill when you need to edit the Fortran interface in Umpire. Keep the generated sources consistent. Umpire uses Shroud to generate the Fortran interface. You can learn more about Shroud at `https://shroud.readthedocs.io/en/latest/`.
9
+
10
+
## Mental Model (important)
11
+
12
+
-`src/umpire/interface` is the location of Umpire's Fortran code.
13
+
-`src/umpire/interface/umpire_shroud.yaml` is the main file that describes how Umpire uses Shroud.
14
+
- The generated Fortran from `umpire_shroud` will overwrite any `src/umpire/interface/**.f` or `src/umpire/interface/**.cpp` files.
15
+
16
+
After the `umpire_shroud.yaml` file is processed, the resulting .f and .cpp files are the ones that get compiled.
17
+
18
+
## Safe Edit Procedure
19
+
20
+
1. Make necessary edits to `src/umpire/interface/umpire_shroud.yaml`
21
+
2. Rebuild the code making sure to enable Fortran in the cmake configuration with `ENABLE_FORTRAN=On`
22
+
3. Verify the results by building the code and running `make test`
23
+
24
+
## Common pitfalls
25
+
26
+
-**Editing the wrong file**: if you edit `*.f` or `*.cpp` under `src/umpire/interface/`, you're editing the transformed source; changes will be overwritten by a github action which runs any time the umpire_shroud.yaml is edited to regenerate the fortran code.
0 commit comments