⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 beamplasma.sh

📁 pic 模拟程序!面向对象
💻 SH
字号:
#!/bin/sh# Shell script for submitting beamplasma.inp simulation on Unix/Linux# Invoke this script as follows:# prompt> nohup beamplasma.sh >beamplasma.out 2>beamplasma.err &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 number of steps# NUM_STEP1 gets the beam fully into the simulation region# NUM_STEP2 gets the beam 0.2 m into the plasma (using moving window)# NUM_STEP3 gets the beam an additional 0.2 m into the plasma# note:  NUM_STEP2 = NUM_STEP3 - NUM_STEP1NUM_STEP1=468NUM_STEP2=16876NUM_STEP3=17344# Specify the base name for input/output filesFILE_NAME="beamplasma"# Specify which version of xoopic to execute:OOPIC_DIR="/work/research/bruhwile/projects/oopic/oopic.mpi"INPUT_DIR=$OOPIC_DIR"/inp"STORE_DIR="/work/research/bruhwile/projects/data.oopic/e157"# copy input file and executable to local directory# set echo, turn on accounting, time job, etc.echoecho "Copying over the specified input file and executable..."cd $STORE_DIRcp $OOPIC_DIR/xg/xoopic .cp $INPUT_DIR/$FILE_NAME.inp .#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Run enough to get beam fully inside simulation regiontime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -s $NUM_STEP1 -dp $NUM_STEP1# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n0_"DUMP_FILES="`ls $FILE_NAME.dmp*`"for i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job and run beam from 0.0 m to 0.2 mtime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP2 -dp $NUM_STEP2# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n1_"DUMP_FILES="`ls $FILE_NAME.dmp*`"echo $DUMP_FILESfor i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job and run beam from 0.2 m to 0.4 mtime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n2_"DUMP_FILES="`ls $FILE_NAME.dmp*`"echo $DUMP_FILESfor i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job and run beam from 0.4 m to 0.6 mtime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n3_"DUMP_FILES="`ls $FILE_NAME.dmp*`"echo $DUMP_FILESfor i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job and run beam from 0.6 m to 0.8 mtime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n4_"DUMP_FILES="`ls $FILE_NAME.dmp*`"echo $DUMP_FILESfor i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done#########################echoechoecho "Now running XOOPIC with MPI..."echoecho# Restart job and run beam from 0.8 m to 1.0 mtime mpirun -np $NUM_PROC xoopic -nox -i $FILE_NAME.inp -d $FILE_NAME.dmp -s $NUM_STEP3 -dp $NUM_STEP3# Copy resulting output to unique name in dump directoryechoechoecho "Now copying the *.dmp.* files to the dump directory with new names..."N_DUMPS="n5_"DUMP_FILES="`ls $FILE_NAME.dmp*`"echo $DUMP_FILESfor i in $DUMP_FILES; do  echo "Processing $i";  cp -f $i ${N_DUMPS}$i;done##########################echoechoecho "All done."exit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -