| SeqQuest Home |
Input Manual |
|---|
A job script needs to do the following:
quest.job input_filewhere "input_file.in" is an input file to the calculation. The script sets up a remote directory on a scratch disk, coordinates all the files, runs the calculation, puts the output listing file in "input_file.out", returns to the home directory, and cleans up all the scratch files when it is done. This file is meant as an illustration only of a possible job script. Different users (and different OS shells) will need to modify this for their own requirements.
################# Sample csh job script: "quest.job" #######################
# provide location of the executable:
alias xlcao ~/bin/seqquest.x
# provide location of the scratch disk root:
set rdisk = '/scratch/${USER}/'
####
# "jobnm" is name of quest input (and output) file for this calculation
# and it is passed into this script as an argument
set jobnm = ${1}
####
# map names of atoms as stored in home directory (atm#) to names
# of atoms as specified in the the input file (lbl#).
# Here, I have the atom files stored in my home directory as "al_lda.atm"
# while the input file refers to the atoms as "al.atm", etc.
set atm_fcnal = 'lda'
set atm1 = 'al_'${atm_fcnal} ; set lbl1 = 'al'
set atm2 = 'o_'${atm_fcnal} ; set lbl2 = 'o'
set atm3 = 'h_'${atm_fcnal} ; set lbl3 = 'h'
####
# set up a name for (temporary) subdirectory to do calculations in
set tmpnm = 'tmp_'${jobnm}
# assemble total pathname for the remote scratch directory, and create it ...
set rdir = ${rdisk}/${tmpnm}; mkdir -p ${rdir}
# ... and "remember" the local home directory in "ldir"
set ldir = $cwd
####
# Record a time stamp in the log file for the job start ...
date ; echo STARTING JOB
####
set inputnm = ${jobnm} ; set outnm = ${inputnm} ; echo starting ${jobnm}
# clean out remote directory, and go there ...
rm ${rdir}/* ; cd ${rdir}
# copy over the atom files ...
cp ${ldir}/${atm1}.atm ${lbl1}.atm ; cp ${ldir}/${atm2}.atm ${lbl2}.atm
cp ${ldir}/${atm3}.atm ${lbl3}.atm
# copy over the input file into "lcao.in" ...
cp ${ldir}/${inputnm}.in lcao.in
# run the executable, redirecting the output listing to the home directory
xlcao > ${ldir}/${outnm}.out
####
# return to the local directory, and time stamp the log file ...
cd ${ldir} ; echo ${jobnm} done ; date
# ... and clean up remote directory, and remove it
rm ${rdir}/* ; rmdir ${rdir}
###################### end sample job script ####################
Return to Top
or SeqQuest Home