-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from chrislxj/CoLM202X-CROP
Fix several bugs in vcmax and run scripts
- Loading branch information
Showing
7 changed files
with
203 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
#!/bin/bash | ||
|
||
Help() | ||
{ | ||
#DISPLAY help | ||
echo "-------------------- Usage ----------------------------------------------------" | ||
echo "Descripion:clone CoLM simulation case from an existing case" | ||
|
||
echo "-------------------------------------------------------------------------------" | ||
echo 'Syntax: ./copy_code -s $SourcePath -d $DestinationPath' | ||
echo !-------------------------------------------------------------------------------- | ||
echo | ||
echo 'eg. ./copy_code -s ~/CoLM/cases/TEST1/bld -d /home/luxj/CoLM202X/cases/TEST2/bld' | ||
echo ' which will copy the code under case ~/CoLM/cases/TEST1 to the code under the case ' | ||
echo "/home/luxj/CoLM202X/cases/TEST2" | ||
echo | ||
echo 'or ./copy_code -s ~/CoLM/ -d /home/luxj/CoLM202X/cases/TEST2/bld' | ||
echo ' which will copy the code under ~/CoLM to the code under the case ' | ||
echo "/home/luxj/CoLM202X/cases/TEST2" | ||
echo | ||
echo options: | ||
echo "-s (optional) "'$SourcePath'" is the path of the source code, which location your" | ||
echo " want to copy from (including case name and 'bld' folder, but without ''/'' at" | ||
echo " end of case path)" | ||
echo " if -s optioin is not present, copy source code from the ROOT" | ||
echo | ||
echo "-d The path of the destimation code, which location you want to copy to " | ||
echo "(including case name and "'bld'" folder but without ''/'' at end of case path)" | ||
echo | ||
echo -h display command information | ||
} | ||
|
||
CopyCode() | ||
{ | ||
|
||
SourcePathName=$1 | ||
DestPathName=$2 | ||
mkdir -p $DestPathName | ||
cd $SourcePathName | ||
|
||
for files1 in * | ||
do | ||
if [ -f $files1 ];then | ||
cp -p $files1 $DestPathName/ | ||
else | ||
if [ -d $files1 ];then | ||
mkdir -p $DestPathName/$files1 | ||
cd $SourcePathName/$files1 | ||
echo copy $files1 | ||
if [ $files1 = CaMa -o $files1 = include -o $files1 = run -o $files1 = preprocess ];then | ||
cp -pr * $DestPathName/$files1/ | ||
else | ||
if [ $files1 = cases ];then | ||
echo ignore cases directory | ||
else | ||
if [ $files1 = postprocess ];then | ||
cp -p *F90 $DestPathName/$files1/ | ||
else | ||
for files2 in * | ||
do | ||
if [ -d $files2 ];then | ||
mkdir -p $DestPathName/$files1/$files2/ | ||
cd $SourcePathName/$files1/$files2 | ||
echo copy $files1/$files2 | ||
for files3 in * | ||
do | ||
if echo $files3 | grep -q -E '.F90$' | ||
then | ||
cp -p $files3 $DestPathName/$files1/$files2/ | ||
fi | ||
done | ||
cd ../ | ||
else | ||
if echo $files2 | grep -q -E '.F90$' | ||
then | ||
cp -p $files2 $DestPathName/$files1/ | ||
fi | ||
fi | ||
done | ||
fi | ||
fi | ||
fi | ||
cd .. | ||
fi | ||
fi | ||
done | ||
} | ||
|
||
|
||
while getopts ":hs:d:" options ; | ||
do | ||
case $options in | ||
s) Source="$OPTARG" ;; | ||
d) Destination="$OPTARG" ;; | ||
h) Help; exit;; | ||
*) echo "invalid option: $@";exit ;; | ||
esac | ||
done | ||
|
||
if [ -z "${Source}" ] || [ -z "${Destination}" ]; then | ||
echo | ||
echo 'Error: either "-s" or "-d" is missing' | ||
echo | ||
Help | ||
exit | ||
else | ||
if [ ! -d "${Source}" ];then | ||
echo Source folder does not exist or is not a folder | ||
fi | ||
echo "copy source code: $Source" | ||
echo "to destimation: $Destination" | ||
CopyCode $Source $Destination | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,54 @@ | ||
#!/bin/bash | ||
|
||
#SBATCH -J <CASENAME> | ||
#SBATCH -p <QUEUE> | ||
#SBATCH -N <NNODES> | ||
#SBATCH -n <NPROCESSES> | ||
#SBATCH --ntasks-per-node=<NTASKSPERNODE> | ||
#SBATCH --mem=<MEMORY> | ||
#SBATCH -o colm.o%j | ||
#SBATCH -e colm.e%j | ||
#SBATCH --exclusive | ||
#SBATCH -t <WALLTIME> | ||
#------------------------------earthlab-------------------------------------------- | ||
##!/bin/bash | ||
# | ||
##SBATCH -J <CASENAME> | ||
##SBATCH -p <QUEUE> | ||
##SBATCH -N <NNODES> | ||
##SBATCH -n <NPROCESSES> | ||
##SBATCH --ntasks-per-node=<NTASKSPERNODE> | ||
##SBATCH --mem=<MEMORY> | ||
##SBATCH -o colm.o%j | ||
##SBATCH -e colm.e%j | ||
##SBATCH --exclusive | ||
##SBATCH -t <WALLTIME> | ||
# | ||
#module purge | ||
#module load compiler/intel/2021.3.1 | ||
#module load mpi/intelmpi/2018.4.274 | ||
#module load mathlib/netcdf/intel/4.4.1 | ||
#module load mathlib/hdf5/intel/1.8.20 | ||
# | ||
#export I_MPI_FABRICS=shm:dapl | ||
#export I_MPI_DAPL_UD=1 | ||
#export I_MPI_DAPL_UD_RDMA_MIXED=1 | ||
#export I_MPI_LARGE_SCALE_THRESHOLD=8192 | ||
#export I_MPI_DAPL_UD_ACK_SEND_POOL_SIZE=8704 | ||
#export I_MPI_DAPL_UD_ACK_RECV_POOL_SIZE=8704 | ||
#export I_MPI_DAPL_UD_RNDV_EP_NUM=2 | ||
# | ||
#export DAPL_UCM_REP_TIME=8000 # REQUEST timer, waiting for REPLY in millisecs | ||
#export DAPL_UCM_RTU_TIME=8000 # REPLY timer, waiting for RTU in millisecs | ||
#export DAPL_UCM_RETRY=10 # REQUEST and REPLY retries | ||
#export DAPL_UCM_CQ_SIZE=2000 | ||
#export DAPL_UCM_QP_SIZE=2000 | ||
# | ||
#export DAPL_UCM_DREQ_RETRY=4 #default == 1 | ||
#export DAPL_UCM_DREP_TIME=200 #default == 200ms | ||
#export DAPL_UCM_WAIT_TIME=10000 #default == 60000ms | ||
# | ||
#ulimit -s unlimited | ||
#scontrol show hostname > nd | ||
#NP=$SLURM_NPROCS | ||
|
||
module purge | ||
module load compiler/intel/2021.3.1 | ||
module load mpi/intelmpi/2018.4.274 | ||
module load mathlib/netcdf/intel/4.4.1 | ||
module load mathlib/hdf5/intel/1.8.20 | ||
|
||
export I_MPI_FABRICS=shm:dapl | ||
export I_MPI_DAPL_UD=1 | ||
export I_MPI_DAPL_UD_RDMA_MIXED=1 | ||
export I_MPI_LARGE_SCALE_THRESHOLD=8192 | ||
export I_MPI_DAPL_UD_ACK_SEND_POOL_SIZE=8704 | ||
export I_MPI_DAPL_UD_ACK_RECV_POOL_SIZE=8704 | ||
export I_MPI_DAPL_UD_RNDV_EP_NUM=2 | ||
|
||
export DAPL_UCM_REP_TIME=8000 # REQUEST timer, waiting for REPLY in millisecs | ||
export DAPL_UCM_RTU_TIME=8000 # REPLY timer, waiting for RTU in millisecs | ||
export DAPL_UCM_RETRY=10 # REQUEST and REPLY retries | ||
export DAPL_UCM_CQ_SIZE=2000 | ||
export DAPL_UCM_QP_SIZE=2000 | ||
#-------------------------------baiduboat------------------------------------------ | ||
#!/bin/bash | ||
|
||
export DAPL_UCM_DREQ_RETRY=4 #default == 1 | ||
export DAPL_UCM_DREP_TIME=200 #default == 200ms | ||
export DAPL_UCM_WAIT_TIME=10000 #default == 60000ms | ||
#BSUB -J <CASENAME> | ||
#BSUB -q <QUEUE> | ||
#BSUB -o colm.o% | ||
#BSUB -e colm.e% | ||
#BSUB -n <NPROCESSES> | ||
#BSUB -R rusage[mem=<MEMORY>] | ||
#BSUB -R span[ptile=<NTASKSPERNODE>] | ||
|
||
ulimit -s unlimited | ||
scontrol show hostname > nd | ||
NP=$SLURM_NPROCS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
NProcesses_mksrf 1000 | ||
NNodes_mksrf 20 | ||
NTasksPerNode_mksrf 50 | ||
Memory_mksrf 512G | ||
Walltime_mksrf 7-24:00 | ||
Queue_mksrf bigmem | ||
NProcesses_mkini 50 | ||
NProcesses_mksrf 672 | ||
NNodes_mksrf 14 | ||
NTasksPerNode_mksrf 48 | ||
Memory_mksrf 150G | ||
Walltime_mksrf 24:00:00 | ||
Queue_mksrf normal | ||
NProcesses_mkini 48 | ||
NNodes_mkini 1 | ||
NTasksPerNode_mkini 50 | ||
Memory_mkini 512G | ||
Walltime_mkini 7-24:00 | ||
NTasksPerNode_mkini 48 | ||
Memory_mkini 150G | ||
Walltime_mkini 24:00:00 | ||
Queue_mkini normal | ||
NProcesses_case 250 | ||
NProcesses_case 240 | ||
NNodes_case 5 | ||
NTasksPerNode_case 50 | ||
Memory_case 512G | ||
Walltime_case 7-24:00 | ||
NTasksPerNode_case 48 | ||
Memory_case 150G | ||
Walltime_case 24:00:00 | ||
Queue_case normal |