-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flux-workflow-examples: update content
conduit still does not compile, and a note was added about that. Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
17 changed files
with
392 additions
and
302 deletions.
There are no files selected for viewing
45 changes: 22 additions & 23 deletions
45
2024-RADIUSS-AWS/JupyterNotebook/tutorial/flux-workflow-examples/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,72 @@ | ||
**WARNING** | ||
# Flux Workflow Examples | ||
|
||
This repository has been archived. It is no longer maintained and it is | ||
likely the examples do not work or are no longer good or suggested | ||
examples. | ||
|
||
Please look elswhere for examples. | ||
|
||
**Flux Workflow Examples** | ||
This contents used to be hosted at [flux-framework/flux-workflow-examples](https://github.com/flux-framework/flux-workflow-examples) and has been moved here for annual updates paired with the Flux Tutorials. | ||
|
||
The examples contained here demonstrate and explain some simple use-cases with Flux, | ||
and make use of Flux's command-line interface (CLI), Flux's C library, | ||
and the Python and Lua bindings to the C library. | ||
|
||
**Requirements** | ||
## Requirements | ||
|
||
The examples assume that you have installed: | ||
|
||
1. A recent version of Flux | ||
|
||
2. Python 3.6+ | ||
|
||
3. Lua 5.1+ | ||
|
||
**_1. [CLI: Job Submission](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-submit-cli)_** | ||
You can also use an interactive container locally, binding this directory to the container: | ||
|
||
```bash | ||
docker run -it -v $(pwd):/home/fluxuser/flux-workflow-examples fluxrm/flux-sched:jammy | ||
cd /home/fluxuser/flux-workflow-examples/ | ||
``` | ||
|
||
**_1. [CLI: Job Submission](job-submit-cli)_** | ||
|
||
Launch a flux instance and schedule/launch compute and io-forwarding jobs on | ||
separate nodes using the CLI | ||
|
||
**_2. [Python: Job Submission](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-submit-api)_** | ||
**_2. [Python: Job Submission](job-submit-api)_** | ||
|
||
Schedule/launch compute and io-forwarding jobs on separate nodes using the Python bindings | ||
|
||
**_3. [Python: Job Submit/Wait](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-submit-wait)_** | ||
**_3. [Python: Job Submit/Wait](job-submit-wait)_** | ||
|
||
Submit jobs and wait for them to complete using the Flux Python bindings | ||
|
||
**_4. [Python: Asynchronous Bulk Job Submission](https://github.com/flux-framework/flux-workflow-examples/tree/master/async-bulk-job-submit)_** | ||
**_4. [Python: Asynchronous Bulk Job Submission](async-bulk-job-submit)_** | ||
|
||
Asynchronously submit jobspec files from a directory and wait for them to complete in any order | ||
|
||
**_5. [Python: Tracking Job Status and Events](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-status-control)_** | ||
**_5. [Python: Tracking Job Status and Events](job-status-control)_** | ||
|
||
Submit job bundles, get event updates, and wait until all jobs complete | ||
|
||
**_6. [Python: Job Cancellation](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-cancel)_** | ||
**_6. [Python: Job Cancellation](job-cancel)_** | ||
|
||
Cancel a running job | ||
|
||
**_7. [Lua: Use Events](https://github.com/flux-framework/flux-workflow-examples/tree/master/synchronize-events)_** | ||
**_7. [Lua: Use Events](synchronize-events)_** | ||
|
||
Use events to synchronize compute and io-forwarding jobs running on separate | ||
nodes | ||
|
||
**_8. [Python: Simple KVS Example](https://github.com/flux-framework/flux-workflow-examples/tree/master/kvs-python-bindings)_** | ||
**_8. [Python: Simple KVS Example](kvs-python-bindings)_** | ||
|
||
Use KVS Python interfaces to store user data into KVS | ||
|
||
**_9. [CLI/Lua: Job Ensemble Submitted with a New Flux Instance](https://github.com/flux-framework/flux-workflow-examples/tree/master/job-ensemble)_** | ||
**_9. [CLI/Lua: Job Ensemble Submitted with a New Flux Instance](job-ensemble)_** | ||
|
||
Submit job bundles, print live job events, and exit when all jobs are complete | ||
|
||
**_10. [CLI: Hierarchical Launching](https://github.com/flux-framework/flux-workflow-examples/tree/master/hierarchical-launching)_** | ||
**_10. [CLI: Hierarchical Launching](hierarchical-launching)_** | ||
|
||
Launch a large number of sleep 0 jobs | ||
|
||
**_11. [C/Lua: Use a Flux Comms Module](https://github.com/flux-framework/flux-workflow-examples/tree/master/comms-module)_** | ||
**_11. [C/Lua: Use a Flux Comms Module](comms-module)_** | ||
|
||
Use a Flux Comms Module to communicate with job elements | ||
|
||
**_12. [C/Python: A Data Conduit Strategy](https://github.com/flux-framework/flux-workflow-examples/tree/master/data-conduit)_** | ||
**_12. [C/Python: A Data Conduit Strategy](data-conduit)_** | ||
|
||
Attach to a job that receives OS time data from compute jobs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 71 additions & 14 deletions
85
...IUSS-AWS/JupyterNotebook/tutorial/flux-workflow-examples/comms-module/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,93 @@ | ||
### Using a Flux Comms Module | ||
# Using a Flux Comms Module | ||
|
||
#### Description: Use a Flux comms module to communicate with job elements | ||
## Description: Use a Flux comms module to communicate with job elements | ||
|
||
##### Setup | ||
### Setup | ||
|
||
If you haven't already, download the files and change your working directory: | ||
|
||
``` | ||
$ git clone https://github.com/flux-framework/flux-workflow-examples.git | ||
```bash | ||
$ cd flux-workflow-examples/comms-module | ||
``` | ||
|
||
##### Execution | ||
### Execution | ||
|
||
If you need to get an allocation on Slurm: | ||
|
||
1. `salloc -N3 -ppdebug` | ||
```bash | ||
salloc -N3 -ppdebug | ||
``` | ||
|
||
2. Point to `flux-core`'s `pkgconfig` directory: | ||
Point to `flux-core`'s `pkgconfig` directory: | ||
|
||
| Shell | Command | | ||
| ----- | ---------- | | ||
| tcsh | `setenv PKG_CONFIG_PATH <FLUX_INSTALL_PATH>/lib/pkgconfig` | | ||
| bash/zsh | `export PKG_CONFIG_PATH='<FLUX_INSTALL_PATH>/lib/pkgconfig'` | | ||
|
||
3. `make` | ||
This might look like this in the container: | ||
|
||
```bash | ||
export PKG_CONFIG_PATH=/usr/lib/pkgconfig | ||
``` | ||
|
||
4. Add the directory of the modules to `FLUX_MODULE_PATH`; if the module was | ||
Then build the module (if you don't have permission, copy to /tmp) | ||
|
||
```bash | ||
cp -R ./comms-module /tmp/comms-module | ||
cd /tmp/comms-module | ||
make | ||
``` | ||
|
||
Add the directory of the modules to `FLUX_MODULE_PATH`; if the module was | ||
built in the current dir: | ||
|
||
`export FLUX_MODULE_PATH=${FLUX_MODULE_PATH}:$(pwd)` | ||
```bash | ||
flux module load ioapp.so | ||
flux module load capp.so | ||
export FLUX_MODULE_PATH=${FLUX_MODULE_PATH}:$(pwd) | ||
``` | ||
|
||
5. `srun --pty --mpi=none -N3 flux start -o,-S,log-filename=out` | ||
Now let's try it! If you need to run flux start under Slurm: | ||
|
||
6. `flux submit -N 2 -n 2 ./compute.lua 120` | ||
```bash | ||
srun --pty --mpi=none -N3 flux start -o,-S,log-filename=out | ||
``` | ||
|
||
Try running flux with the module on the path. | ||
|
||
```bash | ||
flux run -N 1 -n 2 ./compute.lua 120 | ||
flux run -N 1 -n 2 ./io-forwarding.lua 120 | ||
``` | ||
Notice that the module is loaded (at the bottom): | ||
|
||
7. `flux submit -N 1 -n 1 ./io-forwarding.lua 120` | ||
```console | ||
Try `flux-module load --help' for more information. | ||
Module Idle S Sendq Recvq Service | ||
heartbeat 1 R 0 0 | ||
resource 0 R 0 0 | ||
job-ingest 0 R 0 0 | ||
kvs-watch 0 R 0 0 | ||
sched-fluxion-resource 0 R 0 0 | ||
cron idle R 0 0 | ||
barrier idle R 0 0 | ||
job-exec 0 R 0 0 | ||
job-list idle R 0 0 | ||
kvs 0 R 0 0 | ||
content-sqlite 0 R 0 0 content-backing | ||
job-info 0 R 0 0 | ||
job-manager 0 R 0 0 | ||
sched-fluxion-qmanager 0 R 0 0 sched | ||
content 0 R 0 0 | ||
connector-local 0 R 0 0 1002-shell-f3Lv2Zd3tj,1002-shell-f3N2WmZB5H | ||
ioapp 83 R 0 0 | ||
Block until we hear go message from the an io forwarder | ||
``` | ||
|
||
If you run them together, they work together: | ||
|
||
```bash | ||
flux submit -N 1 -n 2 ./compute.lua 120 | ||
flux run -N 1 -n 2 ./io-forwarding.lua 120 | ||
``` |
36 changes: 27 additions & 9 deletions
36
...IUSS-AWS/JupyterNotebook/tutorial/flux-workflow-examples/data-conduit/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.