![]() ![]() Running Your Script on Multiple Nodes/CoresĪfter we allocated multiple nodes resources (Step 1), we can run scripts on multiple nodes. There are many more ways how you can allocate resources in SLURM. You can see the status of your jobs with the following command: $ squeue -u $USER The command will result in the job queuing as it awaits resources to become available (which varies on the number of other jobs being ru n on the cluster). You then submit the job with the following command: $ sbatch hello-python. #SBATCH -cpus-per-task=1 # uses 1 compute core per task #SBATCH -ntasks-per-node=2 # runs 2 tasks on each server #SBATCH -nodes=3 # requests 3 compute servers Below is a simple example of a batch job to run the python script we just created, the file is named "hello-python.sbatch" : The file contains both commands specific for SLURM to interpret as well as programs for it execute. SLURM expects file in the following format in order to execute the job. To run our python script we need to submit a batch job to SLURM to allocate the necessary compute resources. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |