Subversion Repositories lagranto.ecmwf

Rev

Rev 3 | Rev 9 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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