Simple C, C++, Python program
Start with a C++ program, we can start with a simple C++ program, to print out a text to a file, i.e. example2.cpp
You can choose to compile your program first, or you can compile it on a worker node. You may want to compile on the worker node, in case your program is sensitive to the hardware, e.g. can run with CPU-only, CPU+GPU and/or GPU-only depend on the availability of the worker node.
We now compile the example2
first
Then you prepare the Slurm submission script, e.g.
You should get example2.txt
as an output from your program, and example2_log.txt
as the log from the Slurm.
For C and Python program, user can follow the same way:
Create and test your program
Write the submission script
Submit jobs to Slurm clusters, and get the output back to your working directory
Last updated
Was this helpful?