source: IOIPSL/trunk/example/AA_make @ 366

Last change on this file since 366 was 107, checked in by bellier, 17 years ago

JB: pwd -> /bin/pwd

  • Property svn:keywords set to Id
File size: 10.4 KB
Line 
1#-
2#- $Id$
3#-
4USER_DIR = $(shell /bin/pwd)
5MAKE_DIR = '??'
6ifneq ($(USER_DIR),$(MAKE_DIR))
7 @$(error You must invoke this Makefile from its directory)
8endif
9#-
10IOIPSL_LIB = -L$(LIBDIR) -lioipsl
11ifeq ($(L_X),1)
12IOIPSL_LIB = -L$(LIBDIR) -lsxioipsl
13endif
14#-
15all: testhist1 testhist2 testrest testopp testcalendar testflio
16        echo don t forget to do : $(M_K) clean !!!
17
18testhist1:
19        $(M_K) libioipsl
20        $(M_K) testhist1.x
21#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testhist1
22#-Q- sx8brodie  echo '\
23#-Q- sx6nec     echo cd $(USER_DIR) > Job_testhist1
24#-Q- sx6nec     echo '\
25#-Q- sx8mercure echo cd $(USER_DIR) > Job_testhist1
26#-Q- sx8mercure echo '\
27        ./testhist1.x \
28#-Q- sx8brodie ' >> Job_testhist1
29#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
30#-Q- sx8brodie   -o $(USER_DIR)/Out_testhist1 Job_testhist1
31#-Q- sx8brodie  echo job Job_testhist1 has been submitted
32#-Q- sx6nec ' >> Job_testhist1
33#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
34#-Q- sx6nec      -o $(USER_DIR)/Out_testhist1 Job_testhist1
35#-Q- sx6nec     echo job Job_testhist1 has been submitted
36#-Q- sx8mercure ' >> Job_testhist1
37#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
38#-Q- sx8mercure  -o $(USER_DIR)/Out_testhist1 Job_testhist1
39#-Q- sx8mercure echo job Job_testhist1 has been submitted
40
41        @echo ' '
42        @echo 'file testhist1.nc should be created'
43        @echo 'to see it, type : ncdump -h testhist1.nc'
44        @echo ' '
45
46testhist1.x: testhist1.o
47        $(F_L) -o testhist1.x testhist1.o \
48               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
49
50testhist2:
51        $(M_K) libioipsl
52        $(M_K) testhist2.x
53#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testhist2
54#-Q- sx8brodie  echo '\
55#-Q- sx6nec     echo cd $(USER_DIR) > Job_testhist2
56#-Q- sx6nec     echo '\
57#-Q- sx8mercure echo cd $(USER_DIR) > Job_testhist2
58#-Q- sx8mercure echo '\
59        ./testhist2.x \
60#-Q- sx8brodie ' >> Job_testhist2
61#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
62#-Q- sx8brodie   -o $(USER_DIR)/Out_testhist2 Job_testhist2
63#-Q- sx8brodie  echo job Job_testhist2 has been submitted
64#-Q- sx6nec ' >> Job_testhist2
65#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
66#-Q- sx6nec      -o $(USER_DIR)/Out_testhist2 Job_testhist2
67#-Q- sx6nec     echo job Job_testhist2 has been submitted
68#-Q- sx8mercure ' >> Job_testhist2
69#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
70#-Q- sx8mercure  -o $(USER_DIR)/Out_testhist2 Job_testhist2
71#-Q- sx8mercure echo job Job_testhist2 has been submitted
72
73        @echo ' '
74        @echo 'file testhist2.nc should be created'
75        @echo 'to see it, type : ncdump -h testhist2.nc'
76        @echo ' '
77        @echo 'file testhist2_bis.nc should be created'
78        @echo 'to see it, type : ncdump -h testhist2_bis.nc'
79        @echo ' '
80
81testhist2.x: testhist2.o
82        $(F_L) -o testhist2.x testhist2.o \
83               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
84
85testrest:
86        $(M_K) libioipsl
87        $(M_K) testrest.x
88        $(RM) restfile.nc restfilebis.nc
89#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testrest
90#-Q- sx8brodie  echo '\
91#-Q- sx6nec     echo cd $(USER_DIR) > Job_testrest
92#-Q- sx6nec     echo '\
93#-Q- sx8mercure echo cd $(USER_DIR) > Job_testrest
94#-Q- sx8mercure echo '\
95        ./testrest.x \
96#-Q- sx8brodie ' >> Job_testrest
97#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
98#-Q- sx8brodie   -o $(USER_DIR)/Out_testrest Job_testrest
99#-Q- sx8brodie  echo job Job_testrest has been submitted
100#-Q- sx6nec ' >> Job_testrest
101#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
102#-Q- sx6nec      -o $(USER_DIR)/Out_testrest Job_testrest
103#-Q- sx6nec     echo job Job_testrest has been submitted
104#-Q- sx8mercure ' >> Job_testrest
105#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
106#-Q- sx8mercure  -o $(USER_DIR)/Out_testrest Job_testrest
107#-Q- sx8mercure echo job Job_testrest has been submitted
108
109        @echo ' '
110        @echo 'file restfile.nc should be created'
111        @echo 'to see it, type : ncdump -h restfile.nc'
112        @echo ' '
113        @echo 'file restfilebis.nc should be created'
114        @echo 'to see it, type : ncdump -h restfilebis.nc'
115        @echo ' '
116
117testrest.x: testrest.o
118        $(F_L) -o testrest.x testrest.o \
119               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
120
121testopp:
122        $(M_K) libioipsl
123        $(M_K) testopp.x
124#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testopp
125#-Q- sx8brodie  echo '\
126#-Q- sx6nec     echo cd $(USER_DIR) > Job_testopp
127#-Q- sx6nec     echo '\
128#-Q- sx8mercure echo cd $(USER_DIR) > Job_testopp
129#-Q- sx8mercure echo '\
130        ./testopp.x \
131#-Q- sx8brodie ' >> Job_testopp
132#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
133#-Q- sx8brodie   -o $(USER_DIR)/Out_testopp Job_testopp
134#-Q- sx8brodie  echo job Job_testopp has been submitted
135#-Q- sx6nec ' >> Job_testopp
136#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
137#-Q- sx6nec      -o $(USER_DIR)/Out_testopp Job_testopp
138#-Q- sx6nec     echo job Job_testopp has been submitted
139#-Q- sx8mercure ' >> Job_testopp
140#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
141#-Q- sx8mercure  -o $(USER_DIR)/Out_testopp Job_testopp
142#-Q- sx8mercure echo job Job_testopp has been submitted
143
144testopp.x: testopp.o
145        $(F_L) -o testopp.x testopp.o \
146               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
147
148testcalendar:
149        $(M_K) libioipsl
150        $(M_K) testcalendar.x
151#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testcalendar
152#-Q- sx8brodie  echo '\
153#-Q- sx6nec     echo cd $(USER_DIR) > Job_testcalendar
154#-Q- sx6nec     echo '\
155#-Q- sx8mercure echo cd $(USER_DIR) > Job_testcalendar
156#-Q- sx8mercure echo '\
157        echo; \
158#-Q- sx8brodie ' >> Job_testcalendar
159#-Q- sx8brodie  echo '\
160#-Q- sx6nec ' >> Job_testcalendar
161#-Q- sx6nec     echo '\
162#-Q- sx8mercure ' >> Job_testcalendar
163#-Q- sx8mercure echo '\
164        ./testcalendar.x; \
165#-Q- sx8brodie ' >> Job_testcalendar
166#-Q- sx8brodie  echo '\
167#-Q- sx6nec ' >> Job_testcalendar
168#-Q- sx6nec     echo '\
169#-Q- sx8mercure ' >> Job_testcalendar
170#-Q- sx8mercure echo '\
171        echo; \
172#-Q- sx8brodie ' >> Job_testcalendar
173#-Q- sx8brodie  echo '\
174#-Q- sx6nec ' >> Job_testcalendar
175#-Q- sx6nec     echo '\
176#-Q- sx8mercure ' >> Job_testcalendar
177#-Q- sx8mercure echo '\
178        ./testcalendar.x noleap; \
179#-Q- sx8brodie ' >> Job_testcalendar
180#-Q- sx8brodie  echo '\
181#-Q- sx6nec ' >> Job_testcalendar
182#-Q- sx6nec     echo '\
183#-Q- sx8mercure ' >> Job_testcalendar
184#-Q- sx8mercure echo '\
185        echo; \
186#-Q- sx8brodie ' >> Job_testcalendar
187#-Q- sx8brodie  echo '\
188#-Q- sx6nec ' >> Job_testcalendar
189#-Q- sx6nec     echo '\
190#-Q- sx8mercure ' >> Job_testcalendar
191#-Q- sx8mercure echo '\
192        ./testcalendar.x 360d; \
193#-Q- sx8brodie ' >> Job_testcalendar
194#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
195#-Q- sx8brodie   -o $(USER_DIR)/Out_testcalendar Job_testcalendar
196#-Q- sx8brodie  echo job Job_testcalendar has been submitted
197#-Q- sx6nec ' >> Job_testcalendar
198#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
199#-Q- sx6nec      -o $(USER_DIR)/Out_testcalendar Job_testcalendar
200#-Q- sx6nec     echo job Job_testcalendar has been submitted
201#-Q- sx8mercure ' >> Job_testcalendar
202#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
203#-Q- sx8mercure  -o $(USER_DIR)/Out_testcalendar Job_testcalendar
204#-Q- sx8mercure echo job Job_testcalendar has been submitted
205
206testcalendar.x: testcalendar.o
207        $(F_L) -o testcalendar.x testcalendar.o \
208               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
209
210testflio:
211        $(M_K) libioipsl
212        $(M_K) testflio.x
213
214#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testflio
215#-Q- sx8brodie  echo '\
216#-Q- sx6nec     echo cd $(USER_DIR) > Job_testflio
217#-Q- sx6nec     echo '\
218#-Q- sx8mercure echo cd $(USER_DIR) > Job_testflio
219#-Q- sx8mercure echo '\
220        ./testflio.x \
221#-Q- sx8brodie ' >> Job_testflio
222#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
223#-Q- sx8brodie   -o $(USER_DIR)/Out_testflio Job_testflio
224#-Q- sx8brodie  echo job Job_testflio has been submitted
225#-Q- sx6nec ' >> Job_testflio
226#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
227#-Q- sx6nec      -o $(USER_DIR)/Out_testflio Job_testflio
228#-Q- sx6nec     echo job Job_testflio has been submitted
229#-Q- sx8mercure ' >> Job_testflio
230#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
231#-Q- sx8mercure  -o $(USER_DIR)/Out_testflio Job_testflio
232#-Q- sx8mercure echo job Job_testflio has been submitted
233
234        @echo ' '
235        @echo 'file testflio_0001.nc should be created'
236        @echo 'to see it, type : ncdump -h testflio_0001.nc'
237        @echo ' '
238
239testflio.x: testflio.o
240        $(F_L) -o testflio.x testflio.o \
241               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
242
243testconfig:
244        $(M_K) libioipsl
245        $(M_K) testconfig.x
246#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testconfig
247#-Q- sx8brodie  echo '\
248#-Q- sx6nec     echo cd $(USER_DIR) > Job_testconfig
249#-Q- sx6nec     echo '\
250#-Q- sx8mercure echo cd $(USER_DIR) > Job_testconfig
251#-Q- sx8mercure echo '\
252        ./testconfig.x \
253#-Q- sx8brodie ' >> Job_testconfig
254#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
255#-Q- sx8brodie   -o $(USER_DIR)/Out_testconfig Job_testconfig
256#-Q- sx8brodie  echo job Job_testconfig has been submitted
257#-Q- sx6nec ' >> Job_testconfig
258#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
259#-Q- sx6nec      -o $(USER_DIR)/Out_testconfig Job_testconfig
260#-Q- sx6nec     echo job Job_testconfig has been submitted
261#-Q- sx8mercure ' >> Job_testconfig
262#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
263#-Q- sx8mercure  -o $(USER_DIR)/Out_testconfig Job_testconfig
264#-Q- sx8mercure echo job Job_testconfig has been submitted
265
266testconfig.x: testconfig.o
267        $(F_L) -o testconfig.x testconfig.o \
268               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
269
270testconfig2:
271        $(M_K) libioipsl
272        $(M_K) testconfig2.x
273#-Q- sx8brodie  echo cd $(USER_DIR) > Job_testconfig2
274#-Q- sx8brodie  echo '\
275#-Q- sx6nec     echo cd $(USER_DIR) > Job_testconfig2
276#-Q- sx6nec     echo '\
277#-Q- sx8mercure echo cd $(USER_DIR) > Job_testconfig2
278#-Q- sx8mercure echo '\
279        ./testconfig2.x \
280#-Q- sx8brodie ' >> Job_testconfig2
281#-Q- sx8brodie  qsub -j o -S /usr/bin/ksh \
282#-Q- sx8brodie   -o $(USER_DIR)/Out_testconfig2 Job_testconfig2
283#-Q- sx8brodie  echo job Job_testconfig2 has been submitted
284#-Q- sx6nec ' >> Job_testconfig2
285#-Q- sx6nec     qsub -j o -S /usr/bin/ksh \
286#-Q- sx6nec      -o $(USER_DIR)/Out_testconfig2 Job_testconfig2
287#-Q- sx6nec     echo job Job_testconfig2 has been submitted
288#-Q- sx8mercure ' >> Job_testconfig2
289#-Q- sx8mercure qsub -j o -S /usr/bin/ksh \
290#-Q- sx8mercure  -o $(USER_DIR)/Out_testconfig2 Job_testconfig2
291#-Q- sx8mercure echo job Job_testconfig2 has been submitted
292
293testconfig2.x: testconfig2.o
294        $(F_L) -o testconfig2.x testconfig2.o \
295               $(L_O) $(IOIPSL_LIB) $(NCDF_LIB)
296
297config: libioipsl
298        (cd ../src; $(M_K) -f Makefile config)
299        $(BINDIR)/Fparser -main -name testconfig testconfig.f90
300        $(SCPDIR)/build_tkmenus
301        ./config.tk
302        $(RM) Config.*
303
304libioipsl:
305        (cd ../src; $(M_K) -f Makefile)
306
307clean:
308        $(RM) *.*~ Makefile~ core *.o *.nc Out_t* Job_t* *.x *_run.def
309
310testhist1.o: testhist1.f90
311        $(F_C) $(F_O) testhist1.f90
312
313testhist2.o: testhist2.f90
314        $(F_C) $(F_O) testhist2.f90
315
316testrest.o: testrest.f90
317        $(F_C) $(F_O) testrest.f90
318
319testopp.o: testopp.f90
320        $(F_C) $(F_O) testopp.f90
321
322testcalendar.o: testcalendar.f90
323        $(F_C) $(F_O) testcalendar.f90
324
325testflio.o: testflio.f90
326        $(F_C) $(F_O) testflio.f90
327
328testconfig.o: testconfig.f90
329        $(F_C) $(F_O) testconfig.f90
330
331testconfig2.o: testconfig2.f90
332        $(F_C) $(F_O) testconfig2.f90
333
Note: See TracBrowser for help on using the repository browser.