Skip to content

Commit

Permalink
Merge pull request #373 from chrislxj/master
Browse files Browse the repository at this point in the history
Update scripts for Tianhe machine
  • Loading branch information
CoLM-SYSU authored Jan 23, 2025
2 parents 7da0c03 + 850cdd1 commit af7efaf
Show file tree
Hide file tree
Showing 8 changed files with 270 additions and 26 deletions.
2 changes: 2 additions & 0 deletions mkinidata/CoLMINI.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ PROGRAM CoLMINI
CALL getarg (1, nlfile)
CALL read_namelist (nlfile)

DEF_PIO_groupsize = 2

casename = DEF_CASE_NAME
dir_landdata = DEF_dir_landdata
dir_restart = DEF_dir_restart
Expand Down
1 change: 0 additions & 1 deletion run/scripts/batch.slurm-tianhexy.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#------------------------------tianhexy--------------------------------------------
#!/bin/bash

#SBATCH -J <CASENAME>
Expand Down
2 changes: 1 addition & 1 deletion run/scripts/create_scripts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ CreateScripts()
fi
cat>>mksrf.submit<<EOF
cd ${CASEPATH}/${CASENAME}/bld/run/
${EXE} $NP ./mksrfdata.x ../../input_${CASENAME}.nml > ../../logmksrfdata
${EXEC} $NP ./mksrfdata.x ../../input_${CASENAME}.nml > ../../logmksrfdata
EOF

Expand Down
188 changes: 188 additions & 0 deletions run/scripts/diffcasecode.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
ROOT=/share/home/dq010/CoLM202X-pre-release/
if [ $# -eq 2 ];then
if [ "${1:0:1}" == '/' ];then
CASENAME1=`echo "${1##*/}"`
CASEPATH1=`echo "${1%/*}"`
echo $CASEPATH1
echo $CASENAME1
else
CASEPATHNAME1=$PWD/$1
CASENAME1=`echo "${CASEPATHNAME1##*/}"`
CASEPATH1=`echo "${CASEPATHNAME1%/*}"`
echo $CASEPATH1
echo $CASENAME1
fi
if [ "${2:0:1}" == '/' ];then
CASENAME2=`echo "${2##*/}"`
CASEPATH2=`echo "${2%/*}"`
echo $CASEPATH2
echo $CASENAME2
else
CASEPATHNAME2=$PWD/$2
CASENAME2=`echo "${CASEPATHNAME2##*/}"`
CASEPATH2=`echo "${CASEPATHNAME2%/*}"`
echo $CASEPATH2
echo $CASENAME2
fi

echo diff between case $1 and $2
cd $CASEPATH1/$CASENAME1/bld/main/
for files in *F90
do
# echo main/$files
tmp=`diff $files /$CASEPATH2/$CASENAME2/bld/main/`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!!!" main/$files
diff $files $CASEPATH2/$CASENAME2/bld/main/
fi
done

cd BGC
for files in *F90
do
# echo main/BGC/$files
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/main/BGC`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!!!" main/$files
diff $files $CASEPATH2/$CASENAME2/bld/main/BGC
fi
done

cd ../HYDRO
for files in *F90
do
# echo main/HYDRO/$files
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/main/HYDRO`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!!!" main/$files
diff $files $CASEPATH2/$CASENAME2/bld/main/HYDRO
fi
done

cd ../URBAN
for files in *F90
do
# echo main/URBAN/$files
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/main/URBAN`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!!!" main/$files
diff $files $CASEPATH2/$CASENAME2/bld/main/URBAN
fi
done

cd ../../mksrfdata/
for files in *F90
do
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/mksrfdata`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!!" mksrfdata/$files
diff $files $CASEPATH2/$CASENAME2/bld/mksrfdata
fi
done

cd ../mkinidata/
for files in *F90
do
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/mkinidata`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" mkinidata/$files
diff $files $CASEPATH2/$CASENAME2/bld/mkinidata
fi
done

cd ../share/
for files in *F90
do
tmp=`diff $files $CASEPATH2/$CASENAME2/bld/share`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" share/$files
diff $files $CASEPATH2/$CASENAME2/bld/share
fi
done
fi

if [ $# -eq 1 ];then
if [ "${1:0:1}" == '/' ];then
CASENAME1=`echo "${1##*/}"`
CASEPATH1=`echo "${1%/*}"`
echo $CASEPATH1
echo $CASENAME1
else
CASEPATHNAME1=$PWD/$1
CASENAME1=`echo "${CASEPATHNAME1##*/}"`
CASEPATH1=`echo "${CASEPATHNAME1%/*}"`
echo $CASEPATH1
echo $CASENAME1
fi

echo diff between case $1 and root
cd $CASEPATH1/$CASENAME1/bld/main
for files in *F90
do
tmp=`diff $files $ROOT/main/`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" main/$files
diff $files $ROOT/main/
fi
done

cd BGC
for files in *F90
do
tmp=`diff $files $ROOT/main/BGC`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" main/BGC/$files
diff $files $ROOT/main/BGC
fi
done

cd ../HYDRO
for files in *F90
do
tmp=`diff $files $ROOT/main/HYDRO`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" main/HYDRO/$files
diff $files $ROOT/main/HYDRO
fi
done

cd ../URBAN
for files in *F90
do
tmp=`diff $files $ROOT/main/URBAN`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" main/URBAN/$files
diff $files $ROOT/main/URBAN
fi
done

cd ../../mksrfdata/
for files in *F90
do
tmp=`diff $files $ROOT/mksrfdata`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" mksrfdata/$files
diff $files $ROOT/mksrfdata
fi
done

cd ../mkinidata/
for files in *F90
do
tmp=`diff $files $ROOT/mkinidata`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" mkinidata/$files
diff $files $ROOT/mkinidata
fi
done

cd ../share/
for files in *F90
do
tmp=`diff $files $ROOT/share`
if [ ! -z "$tmp" ];then
echo "file differs !!!!!!!!" share/$files
diff $files $ROOT/share
fi
done
fi
26 changes: 26 additions & 0 deletions run/scripts/machine-baiduboat.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 48
Memory_mkini 150G
Walltime_mkini 24:00:00
Queue_mkini normal
NProcesses_case 240
NNodes_case 5
NTasksPerNode_case 48
Memory_case 150G
Walltime_case 24:00:00
Queue_case normal
Exe_command mpirun
Exe_opt -np
ROOT /share/home/dq010//CoLM202X-pre-release/
RAWDATA /share/home/dq010/CoLM/data/rawdata/CROP-NITRIF/CLMrawdata_updating/
RUNTIME /share/home/dq010/CoLM/data/rawdata/CROP-NITRIF/CoLMruntime//
MAKEOPTION Makeoptions.SYSU-BaiduBoat
FORCINGPATH /share/home/dq013/zhwei/colm/data/CoLM_Forcing/crujra_v2.5/

26 changes: 26 additions & 0 deletions run/scripts/machine-github.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 48
Memory_mkini 150G
Walltime_mkini 24:00:00
Queue_mkini normal
NProcesses_case 240
NNodes_case 5
NTasksPerNode_case 48
Memory_case 150G
Walltime_case 24:00:00
Queue_case normal
Exe_command mpirun
Exe_opt -np
ROOT /share/home/dq010//CoLM202X-pre-release/
RAWDATA /share/home/dq010/CoLM/data/rawdata/CROP-NITRIF/CLMrawdata_updating/
RUNTIME /share/home/dq010/CoLM/data/rawdata/CROP-NITRIF/CoLMruntime//
MAKEOPTION Makeoptions.SYSU-BaiduBoat
FORCINGPATH /share/home/dq013/zhwei/colm/data/CoLM_Forcing/crujra_v2.5/

26 changes: 26 additions & 0 deletions run/scripts/machine-tianhexy.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
NProcesses_mksrf 512
NNodes_mksrf 8
NTasksPerNode_mksrf 64
Memory_mksrf 400G
Walltime_mksrf 24:00:00
Queue_mksrf mars
NProcesses_mkini 64
NNodes_mkini 1
NTasksPerNode_mkini 64
Memory_mkini 400G
Walltime_mkini 24:00:00
Queue_mkini mars
NProcesses_case 384
NNodes_case 6
NTasksPerNode_case 64
Memory_case 400G
Walltime_case 24:00:00
Queue_case mars
Exe_command yhrun
Exe_opt -n
ROOT /XYFS01/HDD_POOL/sysu_yjdai2/sysu_yjdai2xy_5/CoLM2024-pre-release/
RAWDATA /XYFS01/HDD_POOL/sysu_yjdai2/SHARE01/CoLMdata/CoLMrawdata/
RUNTIME /XYFS01/HDD_POOL/sysu_yjdai2/SHARE01/CoLMdata/CoLMruntime/
MAKEOPTION Makeoptions.Tianhe-XY
FORCINGPATH /XYFS01/HDD_POOL/sysu_yjdai2/SHARE01/CoLMdata/CoLM_Forcing/crujra_v2.5/

24 changes: 0 additions & 24 deletions run/scripts/machine.config

This file was deleted.

1 change: 1 addition & 0 deletions run/scripts/machine.config

0 comments on commit af7efaf

Please sign in to comment.