Skip to content

Commit ba4b5bb

Browse files
authored
Create batch_queue_flux as experimental module (#3978)
* Create batch_queue_flux stub * Mark batch_queue_flux as experimental * flux_{submit,wait,remove} * clang format * fix macos build errors? * small PR changes * add memset of buffer * add flux to makeflow documentation
1 parent 67db4e7 commit ba4b5bb

File tree

5 files changed

+399
-4
lines changed

5 files changed

+399
-4
lines changed

batch_job/src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ SOURCES = \
2525
batch_queue_work_queue.c \
2626
batch_queue_cluster.c \
2727
batch_queue_k8s.c \
28-
batch_queue_amazon.c
28+
batch_queue_amazon.c \
29+
batch_queue_flux.c
2930

3031
PUBLIC_HEADERS = batch_queue.h batch_job.h batch_job_info.h batch_file.h batch_wrapper.h
3132

batch_job/src/batch_queue.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ See the file COPYING for details.
2121
extern const struct batch_queue_module batch_queue_amazon;
2222
extern const struct batch_queue_module batch_queue_cluster;
2323
extern const struct batch_queue_module batch_queue_condor;
24+
extern const struct batch_queue_module batch_queue_flux;
2425
extern const struct batch_queue_module batch_queue_local;
2526
extern const struct batch_queue_module batch_queue_moab;
2627
extern const struct batch_queue_module batch_queue_uge;
@@ -45,13 +46,14 @@ static struct batch_queue_module batch_queue_unknown = {
4546
NULL,
4647
};
4748

48-
#define BATCH_JOB_SYSTEMS "local, vine, wq, condor, uge (sge), pbs, lsf, torque, moab, slurm, amazon, k8s, dryrun"
49+
#define BATCH_JOB_SYSTEMS "local, vine, wq, condor, uge (sge), pbs, lsf, torque, moab, slurm, amazon, k8s, flux, dryrun"
4950

5051
const struct batch_queue_module *const batch_queue_modules[] = {
5152
&batch_queue_amazon,
5253
&batch_queue_cluster,
5354
&batch_queue_condor,
5455
&batch_queue_dryrun,
56+
&batch_queue_flux,
5557
&batch_queue_local,
5658
&batch_queue_moab,
5759
&batch_queue_uge,

batch_job/src/batch_queue.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Basic use is as follows:
3333
3434
<pre>
3535
// Create a queue for submitting to HTCondor.
36-
struct batch_queue *queue = batch_queue_create(BATCH_QUEUE_TYPE_CONDOR);
36+
struct batch_queue *queue = batch_queue_create(BATCH_QUEUE_TYPE_CONDOR,0,0);
3737
3838
// Define a batch job consiting of a command with input and output files.
3939
struct batch_job *job = batch_job_create(queue);
@@ -43,7 +43,7 @@ batch_job_add_input_file(job,"/usr/share/dict/words","words.txt");
4343
batch_job_add_output_file(job,"output.txt","output.txt");
4444
4545
// Submit the job to the queue, which returns a jobid
46-
batch_job_id_t jobid = batch_queue_submit(queue,job);
46+
batch_queue_id_t jobid = batch_queue_submit(queue,job);
4747
printf("jobid %" PRIbjid" submitted\n",jobid);
4848
4949
// Wait for a job to complete, which returns the jobid and info.
@@ -79,6 +79,7 @@ typedef enum {
7979
BATCH_QUEUE_TYPE_TORQUE, /**< Batch jobs will be send to the Torque scheduler. */
8080
BATCH_QUEUE_TYPE_AMAZON, /**< Batch jobs will be run inside Amazon EC2 Instances */
8181
BATCH_QUEUE_TYPE_K8S, /**< Batch jobs will be run inside Kubernetes pods. */
82+
BATCH_QUEUE_TYPE_FLUX, /**< Batch jobs will be run on Flux. */
8283
BATCH_QUEUE_TYPE_DRYRUN, /**< Batch jobs will not actually run. */
8384
BATCH_QUEUE_TYPE_UNKNOWN = -1 /**< An invalid batch queue type. */
8485
} batch_queue_type_t;

0 commit comments

Comments
 (0)