Last change
on this file since 1709 was
1709,
checked in by acosce, 12 years ago
|
Add tool pack used for ccrt/tgcc migration
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | |
---|
4 | #### On veut calculer si l'ensemble des fichiers d'une simulation |
---|
5 | #### est bien superieur a 1G |
---|
6 | |
---|
7 | config_card=${1} |
---|
8 | LISTE_DMNFS=${2} |
---|
9 | |
---|
10 | export JOB_DIR=${JOB_DIR:-${PWD}} |
---|
11 | export IGCM_DEM=${IGCM_DEM:-${SCRATCHDIR}/IGCM_DEM} |
---|
12 | export IGCM_TMP=${IGCM_TMP:-${IGCM_DEM}/tmp} |
---|
13 | mkdir -p ${IGCM_DEM} |
---|
14 | mkdir -p ${IGCM_TMP} |
---|
15 | |
---|
16 | eval $(grep JobName ${config_card}) |
---|
17 | eval $(grep PATH_SIMUL_FULL ${config_card}) |
---|
18 | eval $(grep DateBegin ${config_card}) |
---|
19 | eval $(grep DateEnd ${config_card}) |
---|
20 | eval $(grep IGCM_DEM_SIMU ${config_card}) |
---|
21 | |
---|
22 | |
---|
23 | |
---|
24 | ## 1 Go |
---|
25 | limitmin=1000000000 |
---|
26 | |
---|
27 | #cree la liste de l'ensemble des fichiers de la simulation |
---|
28 | grep ${PATH_SIMUL_FULL} ${LISTE_DMNFS} | grep 'R ' > ${IGCM_TMP}/$$.info_tmp.txt |
---|
29 | awk '{print $(NF-2) " " $(NF-1)}' ${IGCM_TMP}/$$.info_tmp.txt > ${IGCM_DEM_SIMU}/All_files_simul.txt |
---|
30 | |
---|
31 | size=`awk 'BEGIN {y = 0} {x = $1 ; y = y + x } END{print y}' ${IGCM_DEM_SIMU}/All_files_simul.txt` |
---|
32 | echo $size |
---|
33 | if [ ${size} -lt ${limitmin} ] |
---|
34 | then |
---|
35 | |
---|
36 | echo "trop petit on archive cette simulation avec tar" |
---|
37 | PATH_SIMUL_SHORT=$(echo ${PATH_SIMUL_FULL} | sed 's%/[^/]*/[^/]*/[^/]*/%%' ) |
---|
38 | echo ${PATH_SIMUL_FULL} > ${IGCM_DEM_SIMU}/tar_full_simul.txt |
---|
39 | |
---|
40 | |
---|
41 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.