source: CPL/oasis3/trunk/util/compile/frames/include/Print_par_models.h @ 1677

Last change on this file since 1677 was 1677, checked in by aclsce, 12 years ago

Imported oasis3 (tag ipslcm5a) from cvs server to svn server (igcmg project).

File size: 2.5 KB
Line 
1
2export TARGETMODE=${target_mode}
3
4# echo ' '
5if [ "$MAKETARGET" = all ]; then
6  echo 'The model will be updated.' 
7  echo '         Target mode:      '$TARGETMODE
8  echo '         Message passing : '$CHAN
9elif [ "$MAKETARGET" = lib ]; then
10  echo 'The model library will be created; no executable.' 
11  echo '         Target mode:      '$TARGETMODE
12elif [ "$MAKETARGET" = clean ]; then
13  echo 'The model build directory and model libraries will be cleaned.' 
14elif [ "$MAKETARGET" = tar ]; then
15  echo 'A tar-file of the model including all necessary '
16  echo 'libraries will be created.'
17fi
18echo ' '
19
20if [ $CHAN = NONE ]; then
21  export COUPLER=NONE
22fi
23
24export SUBMOD1=""
25export SUBMOD1LIB=""
26
27#
28# Version acronyms must start with "_"
29#
30
31vers_pref=` echo ${model_version} | cut -c1-1 `
32if [ ! "${vers_pref}" = "_" ] && [ ! "${vers_pref}" = "" ]; then
33    echo ERROR: The compile script does not have a valid model version.
34    echo '      A model version acronym must start with an underscore.'
35    echo '      The compilation is stopped!'
36    exit 1
37fi
38
39export MODVERS=${model_version}
40
41#
42# check against list of possible partner models:
43#
44
45for cpl_mod in ${cpl_to}; do
46  cpl_to_ok=not_ok
47  for poss_cpl_mod in ${poss_cpl_mods}; do
48    if [ ${cpl_mod} = ${poss_cpl_mod} ] || [ ${cpl_mod} = ${MODEL_DIR} ];then
49      cpl_to_ok=ok
50    fi
51  done
52  if [ "${cpl_to_ok}" = "not_ok" ]; then
53     echo ERROR: Model ${cpl_mod} specified in the list of partner models
54     echo '       does not appear in the list of possible partner models.'
55     echo '       Check the lists and try again.'
56     echo 'The compilation is stopped.'
57     exit 1
58  fi
59done
60
61echo '***********************************************************************'
62echo '*'
63if [ "${cpl_to}" = "" ] || [ "${cpl_to}" = " " ] || \
64   [ "${cpl_to}" = ${MODEL_DIR} ]; then
65  echo '* The model is prepared for an uncoupled constellation.'
66else
67  echo '* The model is prepared for a coupled model constellation with :'
68  for cpl_mod in ${cpl_to}; do
69    echo '*    '${cpl_mod}
70  done
71fi
72echo '*'
73echo '***********************************************************************'
74
75if [ ! $CHAN = NONE ] && [ ! $MODEL_DIR = "oasis3" ] && [ "${cpl_to}" = " " ]; then
76  echo '***********************************************************************'
77  echo '*'
78  echo '* Message passing MPI1/2 without partner model is not possible!'
79  echo '* The compilation is stopped!'
80  echo '*'
81  echo '***********************************************************************'
82  exit 1
83fi
Note: See TracBrowser for help on using the repository browser.