📄 test.sh
字号:
#!/bin/sh# Shell script for submitting $FILE_NAME.inp simulation.# Invoke this script as follows (or something similar):# prompt> cd /work/research/bruhwile/projects/data.oopic/test# prompt> cp /work/research/bruhwile/projects/oopic/t3batch/test.sh .# prompt> nohup test.sh >test.out 2>test.err </dev/null &echoecho "XOOPIC - MPI shell script is beginning execution --"echo# Specify the number of processors to useNUM_PROC=2echo " Number of MPI processes = " $NUM_PROC# Specify the desired number of time stepsNUM_STEP1=400NUM_STEP2=400echo " NUM_STEP1 = " $NUM_STEP1echo " NUM_STEP2 = " $NUM_STEP2# Specify the base name for input/output filesFILE_NAME="beamplasmatest"# Specify which version of xoopic to execute:OOPIC_DIR="/work/research/bruhwile/projects/oopic"INPUT_DIR=$OOPIC_DIR"/inp"WORK_DIR="/work/research/bruhwile/projects/data.oopic/test"# Make sure shell is running commands in the right placecd $WORK_DIR# Copy over executable and input fileechoecho "Copying over the specified input file..."echo "Input file is: " $INPUT_DIR"/"$FILE_NAMEcp $INPUT_DIR/$FILE_NAME.inp .echoecho "Copying over the specified XOOPIC executable..."echo "Executable is: " $OOPIC_DIR"/xg/xoopic"cp $OOPIC_DIR/xg/xoopic .#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Start jobmpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -s $NUM_STEP1 -dp $NUM_STEP1#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job, with timing turned ontime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP2 -dp $NUM_STEP2# Rename resulting output to unique name in dump directoryechoechoecho "Now renaming the" $FILE_NAME".dmp.* files over to unique names..."N_DUMPS="n0_"DUMP_FILES="`ls $FILE_NAME.dmp*`"for i in $DUMP_FILES; do echo "Processing $i"; mv $i ${N_DUMPS}$i;done# Delete the executable nowrm -f xoopic##########################echoechoecho "All done."exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -