|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Tom
Join Date: Apr 2017
Posts: 50
Rep Power: 7 ![]() |
Hi People,
I'm looking for some help with the SLURM system. I am trying to submit CFD optimisation jobs to an HPC rig which used to use SGE but now has switched to SLURM. I've adapted most of my python code for the scheduler file from SGE to SLURM but have encountered difficulties adapting the code which is reading the job queue. I'm posting bellow the SGE version of this code. Your help would be greatly appreciated. #!/usr/bin/python import os import time from xml.dom import minidom import util import sys def read_job_queue(): qstat = os.popen('qstat -xml') xmlstr = qstat.read() jobs = {} xmldoc = minidom.parseString(xmlstr) for j in xmldoc.getElementsByTagName('job_list'): name = j.getElementsByTagName('JB_name')[0].firstChild.data state = j.attributes['state'].value jobs[name] = state return jobs |
|
![]() |
![]() |
![]() |
Tags |
hpc, hpc cluster, python, slurm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
wallHeatFlux utility for an incompressible case | Mr.Jingles | OpenFOAM Post-Processing | 62 | December 22, 2018 11:07 |
Modified pimpleFoam solver to MRFPimpleFoam solver | hiuluom | OpenFOAM Programming & Development | 12 | June 14, 2015 21:22 |
Boundary Conditions | MtnRunBeachBum | OpenFOAM Pre-Processing | 1 | April 30, 2015 16:33 |
LES supersonic free jet | martyn88 | OpenFOAM | 22 | April 17, 2015 06:00 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 18:00 |