# First time you run a VASP job?¶

This page contains info aimed at first time users of VASP 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).

## VASP input example¶

Download the tarred job CeO2job-files.

move this file to your test job folder on Stallo and type

tar -zxf CeO2.tar.gz


#!/bin/bash -l

################### VASP Job Batch Script Example ###################
# Section for defining queue-system variables:
#-------------------------------------
# This script asks for a given set of nodes and cores. cores. Stallo has got
# 16 or 20 cores/node, so you need to know what you want.
# Runtime for this job is 59 minutes; syntax is hh:mm:ss.
# Memory si set to the maximum amound adviced when asking for a full node, it
# adds up to 30 000MB, leaving a small part for the system to use. Memory
# can be specified pr core, virtual or total pr job (be carefull).
#-------------------------------------
# SLURM-section
#SBATCH --job-name=vasp_runex
#SBATCH --nodes=2
#SBATCH --time=02:00:00
##SBATCH --mem-per-cpu=1500MB
#SBATCH --output=vasp_runex.log
#SBATCH --mail-type=ALL
#SBATCH --exclusive
#SBATCH --partition=multinode

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

# When you use this test script, make sure, your folder structure is as follows:
# ./job_vasp.sh
# ./CeO2job/INCAR
# ./CeO2job/KPOINTS
# ./CeO2job/POTCAR
# ./CeO2job/POSCAR

proj=CeO2job # Name of job folder
input=$(ls${proj}/{INCAR,KPOINTS,POTCAR,POSCAR}) # Input files from job folder

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

module --quiet purge
# You may check other available versions with "module avail VASP"

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

export VASP_WORKDIR=/global/work/$USER/$SLURM_JOB_ID

mkdir -p $VASP_WORKDIR # Preparing and moving inputfiles to tmp: submitdir=$SLURM_SUBMIT_DIR

cp $input$VASP_WORKDIR
cd $VASP_WORKDIR ###################################### # Section for running the program and cleaning up: # Running the program: time mpirun vasp_std # Cleaning up and moving files back to home/submitdir: # Make sure to move all essential files specific for the given job/software. cp OUTCAR$submitdir/${proj}.OUTCAR # To zip some of the output might be a good idea! #gzip results.gz OUTCAR #mv$results.gz $submitdir/ # Investigate potentially other files to keep: echo$(pwd)
echo $(ls -ltr) # ALWAYS clean up after yourself. Please do uncomment the following line # If we have to, we get really grumpy! #cd$submitdir
#rm -r \$VASP_WORKDIR/*

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


Download it here job_vasp.sh.

## These files are also available on Stallo¶

module load VASP/5.4.1.plain-intel-2016a
cd <to whatever you call your test folder> # for instance testvasp
cp -R /global/hds/software/notur/apprunex/VASP/* .
sbatch job_vasp.sh


and you are up running. Happy hunting.