bash - Compiling a program in a loop with qsub -
i want compile program in bash loop. when run program command line compile when use qsub doesn't compile.
is there missing?
regards,
john
bash file
#!/bin/bash #$ -n runtest #$ -m e #$ -r y cd /afs/crc.nd.edu/user/private/ndpicmcc/safecode thisdir="safecode" t=2000 originalguiline="pres = 7.6e1" oldguiline="$originalguiline" guifile="guivars.f90" (( = -3 ; <= 1 ; i=i+1 )) p="7.6e$i" newguiline="pres = $p" sed -i "s/$oldguiline/$newguiline/g" "$guifile" oldguiline="$newguiline" make clean >& /dev/null make 1d >& /dev/null make 1d ./pressurepic cp "anode_ele_eng.csv" "../results/t_${t}_p_${p}_energies.csv" done sed -i "s/$oldguiline/$originalguiline/g" "$guifile"
makefile
cc=ifort options = -warn noalign -autodouble prng = luxury.f90 main = ndpic1d.v0.f90 guivars.f90 globalvars.f90 statisticaldistribution.f90 emission.f90 todo = particleincell.f90 montecarlocollision.f90 transformations.f90 exe = pressurepic all: @$(cc) $(prng) $(main) $(todo) -o $(exe) $(options) 1d: @$(cc) $(prng) $(main) $(todo) -o $(exe) $(options) 2d: @$(cc) $(prng) $(main) $(todo) -o $(exe) $(options) clean: @rm *.mod $(exe) run: @./$(exe) info: @echo $(exe)
i'm not sure flavour of qsub
using may not ...
try including
#$ -v
at start of script. on systems process qsub
ensures environment variables exported environment environment in script runs. these environments not, generally, same.
Comments
Post a Comment