flux submit
Basic job submission
flux submit sleep 60
flux submit --watch ./interesting-job.sh
flux submit --nodes=2 --ntasks=4 --cores-per-task=2 ./script.sh
flux submit --queue=jellybelly --name=buttered-popcorn ./script.sh
flux submit --dry-run ./highly-suspicious-job.sh
Advanced job submission
flux submit --cc="1-10" echo "Hello I am job {cc}"
flux submit --cc=1-10 myscript{cc}.sh
flux --cc=1-10 submit --output=job-{{id}}.out ./my_super_cool_job.py
flux submit --flags waitable ./wait-for-me.sh
flux job wait --all
flux run
Basic interactive jobs
flux run hostname
flux run bash -c "echo start; sleep 5; echo done"
flux run -N 1 -n 4 -c 10 -g 1 -o mpi=spectrum -o cpu-affinity=per-task -o gpu-affinity=per-task my_mpi_binary
flux run --env-remove=* --env=PATH ./top-secret.sh
flux jobs
Basic job listing tool
flux jobs -a
flux jobs --no-header -o '{returncode}' ƒj4CgebBV
flux jobs --no-header -o '{status}:{returncode}' ƒj4CgebBV
flux jobs --filter=pending,running,inactive -o "{id}"
flux job
Basic interaction with jobs
flux job last
flux job attach $(flux job last)
flux job kill --signal=SIGUSR1 ƒj4CgebBV
flux start
Basic start of a Flux instance
flux start --test-size=4
flux proxy
Outside a flux instance
flux proxy local:///run/flux/local bash
flux proxy local:///run/flux/local ./script.sh
Inside a flux instance
echo $FLUX_URI
flux resources
Inspect the resources available to you
flux resource list
flux overlay status
flux uptime
flux batch
Run batch scripts
flux batch --job-name=test-name --wrap ./batch.sh
#!/bin/sh
# flux: -N4 -n16
flux run -n16 hostname
#flux: -N4
#flux: --job-name=name
flux run -N4 hostname
flux cancel
Basic job cancelling
flux cancel 123456
flux cancelall -f
flux cancel --user meatball
flux cancel --states=RUN
flux alloc
Create basic allocations
flux alloc -N 2 --queue=foo
flux alloc --bg -N 2 --queue=foo
flux bulksubmit
Format String Examples
seq 1 4 | flux bulksubmit echo {}
flux bulksubmit echo {} ::: 1 2 3 4
flux bulksubmit echo {.%} ::: one.txt two.txt three.txt
flux bulksubmit echo {./} ::: /long/file/path.txt /long/file/filename.txt
flux bulksubmit echo {./%} ::: /long/file/path.txt /long/file/filename.txt
flux bulksubmit echo {.//} ::: /long/file/path.txt /long/file/filename.txt
flux bulksubmit echo {seq} ::: 1 2 3 4
flux bulksubmit echo {seq1} ::: 1 2 3 4
flux bulksubmit --dry-run --define=p2='2**int(x)' -n {.p2} hostname ::: $(seq 0 4)
Simple Examples
find ./mydir | flux bulksubmit --wait xz {}
flux bulksubmit --dry-run /bin/bash -c 'mkdir -p ./mydir/{0}/{1}; echo created mydir/{0}/{1}' ::: a b c d ::: {1..4}
flux bulksubmit --dry-run --cc={1} echo {0} ::: a b c ::: 0-1 0-3 0-7
flux bulksubmit echo 'Hello I am job {}' ::: $(seq 1 10)
flux advanced
Debugging
flux dmesg
flux dmesg --human
Queue and Archive
flux queue stop
flux queue idle
flux dump ./archive.tar.gz
Moving Files
flux filemap map -C /data mpi.sif
# This skips rank 0, since the file is already there
flux exec -x 0 -r all flux filemap get -C /data
flux submit -n 4 --output /tmp/fluxout/job.out --error /tmp/fluxout/job.out --flags waitable singularity exec /data/mpi.sif /opt/mpitest
# This is important to have so we wait for jobs to finish!
flux queue idle
flux filemap unmap