Skip navigation
NASA Logo, National Aeronautics and Space Administration
Currently Being Moderated

Running IDL in Batch Mode on discover

VERSION 2  Click to view document history
Created on: May 7, 2018 11:42 AM by Jules Kouatchou - Last Modified:  May 7, 2018 1:08 PM by Jules Kouatchou

We provide a quick description on how to run IDL in non-interactive batch mode on discover. Consider the following two IDL programs:

 

 

calculatecos.pro

pro calculatecos, x
       y = cos(x)
       print, 'The cosine value is: ', y
end 

 

 

calculatesin.pro

pro calculatesin, x
      z = sin(x)
      print, 'The sine value is: ', z
end 

 

We want to execute the above programs withing a SLURM scripts. We fisrt need to create an idl batch file, named my_idlbatch.pro, that looks like

 

PRINT, 'Job started'

calculatecos, 3.46
calculatesin, -4.178


PRINT, 'Job complete'

 

We are passing values to the calculatecos and calculatesin programs to execute them. The next step is to create a SLURM script, name my_slurmjob.j:

 

#! /bin/csh -f
#SBATCH --time=00:10:00
#SBATCH --job-name=batchidl
#SBATCH --ntasks=28
#SBATCH --constraint=hasw
#SBATCH -A yourSponsorID

source /usr/share/modules/init/csh
module purge
module load tool/idl-8.5

limit vmemoryuse unlimited

idl my_idlbatch


 

You can then submit the SLURM script.

Comments (0)
USAGov logo NASA Logo - nasa.gov