Subversion Repositories lagranto.ecmwf

Rev

Rev 3 | Rev 9 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 5
Line 1... Line 1...
1
# ----- Load modules --------------------------
1
# ----- Load modules --------------------------
2
 
2
 
3
module load pgi/9.0-1
3
module load netcdf/4.2.1-pgf90
4
module load netcdf/4.1.1-pgf90
4
module list 
5
 
5
 
6
set tool = tracal
6
set tool = tracal
7
 
7
 
8
# ----- Set libraries and includes ------------
8
# ----- Set libraries and includes ------------
9
 
9
 
10
set libs   = "${LAGRANTO}/lib/iotra.a"
10
set libs   = "${LAGRANTO}/lib/iotra.a"
11
set libs   = "${libs} -L ${LAGRANTO}/lib"
11
set libs   = "${libs} -L ${LAGRANTO}/lib"
12
set libs   = "${libs} -lcdfio" 
12
set libs   = "${libs} -lcdfio" 
13
set libs   = "${libs} -lcdfplus" 
13
set libs   = "${libs} -lcdfplus" 
14
 
14
 
15
set incs   = "-I ${NETCDF_INC}"
15
set ncdf_incs  = `nc-config --fflags`
16
set libs   = "${libs} -L ${NETCDF_LIB} -lnetcdf"
16
set ncdf_libs  = `nc-config --flibs`
17
 
17
 
18
# ---- Modules ---------------------------------
18
# ---- Modules ---------------------------------
19
 
19
 
20
echo ${FORTRAN} -c evalmod.f90
20
\rm -f precmod.o precision.mod
21
${FORTRAN} -c evalmod.f90
-
 
22
 
-
 
23
echo ${FORTRAN} -c precmod.f90
21
echo ${FORTRAN} -c precmod.f90
24
${FORTRAN} -c precmod.f90
22
${FORTRAN} -c precmod.f90
25
 
23
 
-
 
24
\rm -f stringmod.o strings.mod
26
echo ${FORTRAN} -c stringmod.f90
25
echo ${FORTRAN} -c stringmod.f90
27
${FORTRAN} -c stringmod.f90
26
${FORTRAN} -c stringmod.f90
28
 
27
 
-
 
28
\rm -f evalmod.o evaluate.mod
-
 
29
echo ${FORTRAN} -c evalmod.f90
-
 
30
${FORTRAN} -c evalmod.f90
-
 
31
 
29
set mods = " evalmod.o precmod.o stringmod.o " 
32
set mods = " evalmod.o precmod.o stringmod.o " 
30
 
33
 
31
# ----- Compile --------------------- ----------
34
# ----- Compile --------------------- ----------
32
 
35
 
33
\rm -f ${tool}.o
36
\rm -f ${tool}.o
34
\rm -f ${tool}
37
\rm -f ${tool}
35
 
38
 
-
 
39
echo "pgf90 -c ${tool}.f ${ncdf_incs}"  
-
 
40
      pgf90 -c ${tool}.f ${ncdf_incs}   
36
echo "${FORTRAN} -O -o ${tool} ${tool}.f${mods}  ${incs} ${libs}"  
41
echo "pgf90 -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}"        
37
${FORTRAN} -O -o ${tool} ${tool}.f ${mods} ${incs} ${libs}   
42
      pgf90 -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}
38
 
43
 
39
if ( ! -f ${tool} ) then
44
if ( ! -f ${tool} ) then
40
  echo "ERROR: compilation of <tool> failed... exit"
45
  echo "ERROR: compilation of <tool> failed... exit"
41
  exit 1
46
  exit 1
42
endif
47
endif