# First time you run a Band job?¶

This page contains info aimed at first time users of Band on Stallo, but may also be usefull to more experienced users. Please look carefully through the provided examples. Also note that the job-script example is rather richly commented to provide additional and relevant info.

If you want to run this testjob, download the copies of the scripts and put them into your test job folder (which I assume you have created in advance).

## Band input example¶

TITLE Untitled

NumericalQuality Normal

UNITS
length Angstrom
angle Degree
END

ATOMS
Si -0.67875 -0.67875 -0.67875
Si 0.67875 0.67875 0.67875
END

Lattice
0.0   10.860 10.860
10.860  0.0   10.860
10.860 10.860  0.0
End

DOS
Enabled True
End

BasisDefaults
BasisType DZ
Core Large
End

XC
LDA SCF VWN
END

GeoOpt
End

BZSTRUCT
Enabled True
END

end input


This file can also be downloaded here: Silicone input for Band.

Place this file in a job folder of choice, say BANDFIRSTJOB in your home directory on Stallo.

then, copy the job-script as seen here:

#!/bin/bash -l

################### ADF Job Batch Script Example ###################
# Section for defining queue-system variables:
#-------------------------------------
# This script asks for a given set of cores nodes and cores. Stallo has got 16 or 20 cores/node,
# asking for something that adds up to both is our general recommodation (80, 160 etc), you would
# Runtime for this job is 59 minutes; syntax is hh:mm:ss.
# Memory is set to the maximum advised for a full node,
# of 30000MB/node and leaving some for the system to use. Memory
# can be specified pr core, virtual or total pr job (be carefull).
#-------------------------------------
# SLURM-section
#SBATCH --job-name=band_runex
#SBATCH --nodes=2
#SBATCH --time=00:59:00
#SBATCH --mem-per-cpu=1500MB # Be ware of memory needs!
#SBATCH --output=band_runex.log
#SBATCH --mail-type=ALL
#SBATCH --exclusive
#SBATCH --partition=multinode

######################################
# Section for defining job variables and settings:

input=silicone # Name of input without extention
ext=adf # We use the same naming scheme as the software default, also for extention
cores=40  # Number of cores potentially used by mpi engine in submit procedure

# We load all the default program system settings with module load:

module --quiet purge

# Now we create working directory and temporary scratch for the job(s):
# Necessary variables are defined in the notur and the software modules.

export SCM_TMPDIR=/global/work/$USER/$SLURM_JOBID
mkdir -p $SCM_TMPDIR # Preparing and moving inputfiles to tmp: submitdir=$SLURM_SUBMIT_DIR
tempdir=$SCM_TMPDIR cd$submitdir
cp ${input}.${ext} $tempdir cd$tempdir

# In case necessary, set SCM_IOBUFFERSIZE
#export SCM_IOBUFFERSIZE=1024 # Or higher if necessary.

######################################
# Section for running the program and cleaning up:

# Running the program:

time band  -n $cores <${input}.${ext} > band_$input.out

# Cleaning up and moving files back to home/submitdir:
# Make sure to move all essential files specific for the given job/software.

cp band_$input.out$submitdir/band_$input.out cp TAPE21$submitdir/$input.t21 # To zip some of the output might be a good idea! #gzip$input.t21
#mv $input.t21.gz$submitdir/

# Investigate potentially other files to keep:
echo $(pwd) echo$(ls -ltr)

# ALWAYS clean up after yourself. Please do uncomment the following line
#cd $submitdir #rm$tempdir/*
#rmdir \$tempdir

echo "Job finished at"
date
################### Job Ended ###################
exit 0


(Can also be downloaded from here: job_band.sh)

Place this script in the same folder and type:

sbatch job_band.sh


## These files are also available on Stallo¶

module load ADF/adf2017.108
cd <to whatever you call your test folder> # for instance BANDFIRSTJOB