Resources Request using pyslurm

71 views
Skip to first unread message

fabian andres leon perez

unread,
Feb 28, 2018, 5:50:02 PM2/28/18
to pyslurm
Hi! How are you doing?

Currently, I am working on a project which aim at running pythonnotebooks on a supercomputer. The process is described below,
1. Logging in using an external webpage.
2. If login is successful, a script which allows to execute the pythonnotebook and working on it in some node will be sent. 

The logging process is already working well. Now, I am looking for how can I run a job on the supercomputer using an API. Currently, 
I am testing using Python and I would like to know if I am able to request resources using pyslurm.

The resources that I could request are the following:

#! / bin / bash
#SBATCH --partition = all
#SBATCH --time = 24: 00: 00
#SBATCH --nodes = 1
#SBATCH --job-name = "Jupyterhub_test"
#SBATCH --output = jupyterhub.out
#SBATCH --ntasks-per-node = 1
#SBATCH --gres = gpu: 3
cp /opt/jupyterhub/jupyterhub_config.py.
sudo jupyterhub

I do really appreaciate your help!

Giovanni

unread,
Feb 28, 2018, 9:58:44 PM2/28/18
to pyslurm


Hi,

PySlurm currently doesn't support job submission (in the master branch).

There has been some work done on this in the "dev-*-props", but it's not complete, one version behind the latest version, and doesn't yet parse the #SBATCH directives.  However, I think it would work, but you would have to move the sbatch directives into a dictionary instead.    First off, which version of Slurm are you using?

Giovanni

fabian andres leon perez

unread,
Feb 28, 2018, 10:28:11 PM2/28/18
to pyslurm
Hi! thanks for answering I am using slurm 14.11.8. I am sorry I am not following you, what do you mean with " but you would have to move the sbatch directives into a dictionary instead." I apologize, this is my first project and i don't know much about this.

Further, if you know of an alternative API in any other language, I will really appreciate you give me the information. thanks

Giovanni

unread,
Mar 2, 2018, 6:25:27 AM3/2/18
to pyslurm


On Wednesday, February 28, 2018 at 10:28:11 PM UTC-5, fabian andres leon perez wrote:

Hi,

PySlurm currently doesn't support job submission (in the master branch).

There has been some work done on this in the "dev-*-props", but it's not complete, one version behind the latest version, and doesn't yet parse the #SBATCH directives.  However, I think it would work, but you would have to move the sbatch directives into a dictionary instead.    First off, which version of Slurm are you using?

Giovanni

Hi,

The version of Slurm you are using is a bit older.  The basic form of job submit function works in newer versions of PySlurm.  It still needs some work though.  I'm not aware of other APIs for job submission.

Giovanni
Reply all
Reply to author
Forward
0 new messages