📄 test_serial.sh
字号:
#!/bin/sh# Shell script for submitting $FILE_NAME.inp simulation in serial mode.# Invoke this script as follows (or something similar):# prompt> cd /work/research/bruhwile/projects/data.oopic/test_serial# prompt> cp /work/research/bruhwile/projects/oopic.serial/t3batch/test_serial.sh .# prompt> nohup test_serial.sh >test_serial.out 2>test_serial.err </dev/null &echoecho "XOOPIC - MPI shell script is beginning execution --"echo# 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.serial"INPUT_DIR=$OOPIC_DIR"/inp"WORK_DIR="/work/research/bruhwile/projects/data.oopic/test_serial"# 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 in serial mode..."echoecho# Start jobxoopic -nox -i $FILE_NAME.inp -s $NUM_STEP1 -dp $NUM_STEP1#########################echoechoecho "Now running XOOPIC in serial mode..."echoecho# Restart job, with timing turned ontime 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_"mv $FILE_NAME.dmp ${N_DUMPS}$FILE_NAME.dmp;# Delete the executable nowrm -f xoopic##########################echoechoecho "All done."exit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -