Changeset 1301 for trunk/NVTK/Makefile
- Timestamp:
- 2009-02-09T18:15:38+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NVTK/Makefile
r1155 r1301 1 1 # $Id$ 2 2 ##################################################################### 3 # Author : Claude Talandier for ESOPA4 # Contact : opatlod@locean-ipsl.upmc.fr3 # Author : Claude Talandier for NEMO team 4 # Contact : nemo_st@locean-ipsl.upmc.fr 5 5 # 6 # INPUT ARGS: 6 + 1 (optional)6 # VARS TO SET: 6 + 1 (optional) 7 7 # - NAM_V : name of the current test 8 8 # - LISTE_CONF : configurations name (ORCA2_LIM, GYRE ...) … … 18 18 # 19 19 # WORK: Allows to launch all the validation process, i.e. 20 # I. compilations 21 # II. simulations 20 # 0. build dependencies using: 'gmake -s dep' 21 # I. launch compilation 22 # II. launch simulation 22 23 # III. final report 23 24 # … … 29 30 #- 30 31 #- Name of the test 31 NAM_V = nemo_v332 NAM_V = MY_EXP1 32 33 #- 33 34 #- Configurations list which must be tested … … 60 61 61 62 #- Make good links & launch the compilation process 62 $(LISTE_CONF): 63 $(LISTE_CONF): 63 64 @echo 64 65 @echo "CONFIGURATION :" $@ 65 ( MYREP_LIST=`(cd 2TEST ; ls *.[Ffh]90 *.[Ffh])` ; \66 @( MYREP_LIST=`(cd 2TEST ; ls *.[Ffh]90 )` ; \ 66 67 cd ../$@/MY_SRC ; rm -rf *.[Ffh]90 ; if [ -n "$$MYREP_LIST" ] ; \ 67 68 then ln -sf ../../NVTK/2TEST/*.[Ffh]90 . ; fi ; ) … … 71 72 @echo "memo=" $(MAK_MEMO) >> ../$@/specifs.txt 72 73 @echo "tagname=" $(REF_TAGV) >> ../$@/specifs.txt 74 @echo `svn info ../../modeles/NEMO | grep URL` >> ../$@/specifs.txt 75 @echo `svn info ../../modeles/NEMO | grep Revision ` >> ../$@/specifs.txt 76 @( `(cd 2TEST ; ls *.[Ffh]90 > ../../$@/f2test.txt )` ) 73 77 @echo 74 @echo ' ----->>>>>>>>> Links from ' $@/MY_SRC ' to NVTK/2TESTdone'78 @echo ' ----->>>>>>>>> Links from NVTK/2TEST to '$@/MY_SRC 'done' 75 79 @echo 76 80 @echo ' Build the Makefile for' $@ 'configuration' 77 ../../util/ins_make -w $@81 @../../util/ins_make -w $@ 78 82 @echo 79 83 @echo 80 gmake -C ../$@ RUN='$(BUILD_MAKE)' JOB=$(JOBS_2LAUN) RTG=$(REF_TAGV) MKTE=$(MAK_TIME) MKMO=$(MAK_MEMO) -j 2 > $@_step.txt 84 @gmake -C ../$@ RUN='$(BUILD_MAKE)' JOB=$(JOBS_2LAUN) RTG=$(REF_TAGV) MKTE=$(MAK_TIME) MKMO=$(MAK_MEMO) REXP=$(NAM_V) -j 2 > $@_step.txt 85 86 #- Rebuild dependencies when new cpp key and/or new module used 87 dep: clear 88 for conf in ${LISTE_CONF}; do \ 89 echo ; \ 90 echo ; \ 91 echo ; \ 92 echo ' ----->>>>>>>>> Rebuild dependencies for the' $$conf 'configuration' ; \ 93 echo ; \ 94 echo ' > Build links from 2TEST to '$$conf'/MY_SRC directory :' ; \ 95 echo ; \ 96 MYREP_LIST=`(cd 2TEST ; ls *.[Ffh]90 )` ; \ 97 cd ../$$conf/MY_SRC ; rm -rf *.[Ffh]90 ; \ 98 if [ -n "$$MYREP_LIST" ] ; \ 99 then for F in $$MYREP_LIST; do \ 100 echo " # link from 2TEST to "$$conf"/MY_SRC/$$F" ; \ 101 ln -sf ../../NVTK/2TEST/$$F . ; \ 102 done ; fi ; \ 103 echo ; \ 104 echo ; \ 105 echo ' > Rebuild links in the '$$conf'/WORK directory:' ; \ 106 echo ; \ 107 cd ../WORK ; \ 108 rm -rf `ls | fgrep -v -f .patron` ; \ 109 check=`grep OPA_SRC .config` ; \ 110 if [ -n "$$check" ] ; then \ 111 echo " # use OPA_SRC component files" ; \ 112 ln -sf ../../../modeles/NEMO/OPA_SRC/*.[Ffh]90 . ; \ 113 ln -sf ../../../modeles/NEMO/OPA_SRC/*/*.[Ffh]90 . ; \ 114 fi ; \ 115 check=`grep LIM_SRC_2 .config` ; \ 116 if [ -n "$$check" ] ; then \ 117 echo " # use LIM_SRC_2 component files" ; \ 118 ln -sf ../../../modeles/NEMO/LIM_SRC_2/*.[Ffh]90 . ; \ 119 fi ; \ 120 check=`grep LIM_SRC_3 .config` ; \ 121 if [ -n "$$check" ] ; then \ 122 echo " # use LIM_SRC_3 component files" ; \ 123 ln -sf ../../../modeles/NEMO/LIM_SRC_3/*.[Ffh]90 . ; \ 124 fi ; \ 125 check=`grep NST_SRC .config` ; \ 126 if [ -n "$$check" ] ; then \ 127 echo " # use NST_SRC component files" ; \ 128 \rm -rf agrif_opa_interp.F90 ; \ 129 \rm -rf agrif_opa_sponge.F90 ; \ 130 \rm -rf agrif_opa_update.F90 ; \ 131 \rm -rf agrif_top_interp.F90 ; \ 132 \rm -rf agrif_top_sponge.F90 ; \ 133 \rm -rf agrif_top_update.F90 ; \ 134 ln -sf ../../../modeles/NEMO/NST_SRC/*.[Ffh]90 . ; \ 135 fi ; \ 136 check=`grep C1D_SRC .config` ; \ 137 if [ -n "$$check" ] ; then \ 138 echo " # use C1D_SRC component files" ; \ 139 ln -sf ../../../modeles/NEMO/C1D_SRC/*.[Ffh]90 . ; \ 140 fi ; \ 141 check=`grep TOP_SRC .config` ; \ 142 if [ -n "$$check" ] ; then \ 143 echo " # use TOP_SRC component files" ; \ 144 \rm -rf trcstp.F90 ; \ 145 \rm -rf sms.F90 ; \ 146 \rm -rf trcini.F90 ; \ 147 ln -sf ../../../modeles/NEMO/TOP_SRC/*.[Ffh]90 . ; \ 148 ln -sf ../../../modeles/NEMO/TOP_SRC/*/*.[Ffh]90 . ; \ 149 fi ; \ 150 check=`grep OFF_SRC .config` ; \ 151 if [ -n "$$check" ] ; then \ 152 echo " # use OFF_SRC component files" ; \ 153 ln -sf ../../../modeles/NEMO/OFF_SRC/*.[Ffh]90 . ; \ 154 ln -sf ../../../modeles/NEMO/OFF_SRC/*/*.[Ffh]90 . ; \ 155 fi ; \ 156 mn=`awk '{ print $$1 }' .config ` ; \ 157 myrep=../../../config/$$mn/MY_SRC ; \ 158 echo " # use MY_SRC component files" ; \ 159 for i in `ls $$myrep` ; do \ 160 [ -f $$i ] && \rm -rf $$i ;\ 161 done ; \ 162 myrep_list=`(cd $$myrep ; ls *.[Ffh]90 )` ; \ 163 if [ -n "$$myrep_list" ] ; then \ 164 for F in $$myrep_list; do \ 165 ln -sf $$myrep/$$F . ; \ 166 done ; \ 167 fi ; \ 168 cd .. ; ../NVTK/fait_AA_make ; \ 169 echo ; \ 170 echo " #################################" ;\ 171 echo " Dependencies for" $$conf "ready" ;\ 172 echo " #################################" ;\ 173 echo ;\ 174 cd ../NVTK ; \ 175 done 176 @echo 177 @echo " ##################################################" 178 @echo " Launch the compilation and job process using gmake" 179 @echo " ##################################################" 180 @echo 181 182 clear : 183 @echo 184 @echo 185 @clear
Note: See TracChangeset
for help on using the changeset viewer.