| 1 |
cnh |
1.1 |
This directory contains example make file templates for various different |
| 2 |
|
|
compilers. |
| 3 |
|
|
|
| 4 |
|
|
To compile and link using one of these templates copy the template into |
| 5 |
|
|
the source directory and edit the path name variables and compiler |
| 6 |
|
|
options variables to work for your site. The compiler and compiler |
| 7 |
|
|
options need to be consistent with the options that were used to build ESMF. |
| 8 |
|
|
The section "Edting Templates" below describes the variables that |
| 9 |
|
|
will normally need to be edited. |
| 10 |
|
|
|
| 11 |
|
|
The options and compiler used to build ESMF can be found in the directory |
| 12 |
|
|
in which ESMF was built. For summary information on building ESMF see the |
| 13 |
|
|
file "README" in the root directory of the ESMF 2.0 distribution. More |
| 14 |
|
|
extensive information on building ESMF can be found in the ESMF User Guide |
| 15 |
|
|
that is available online from http://www.esmf.ucar.edu in both .html |
| 16 |
|
|
and .pdf form and that is also included in the ESMF 2.0 distribution. |
| 17 |
|
|
|
| 18 |
|
|
|
| 19 |
|
|
Editing Templates |
| 20 |
|
|
================= |
| 21 |
|
|
|
| 22 |
|
|
Each of the Makefile templates has the following structure |
| 23 |
|
|
|
| 24 |
|
|
: |
| 25 |
|
|
Per platform/compiler/site variables |
| 26 |
|
|
: |
| 27 |
|
|
|
| 28 |
|
|
include .obj_list |
| 29 |
|
|
|
| 30 |
|
|
: |
| 31 |
|
|
Compiler commands |
| 32 |
|
|
: |
| 33 |
|
|
|
| 34 |
|
|
|
| 35 |
|
|
To customize the Makefile for a particular site it is normally only |
| 36 |
|
|
necessary to edit the "Per platform/compiler/site variable" sections. |
| 37 |
|
|
This section contains the following varaibles: |
| 38 |
|
|
|
| 39 |
|
|
fbase :: This is the base directory for the Fortran compiler you use. |
| 40 |
|
|
|
| 41 |
|
|
fcomp :: This is the name of the Fortran compilerr you use. |
| 42 |
|
|
|
| 43 |
|
|
fopt :: These are options that the Fortran compiler requires for |
| 44 |
|
|
the compileation stage. |
| 45 |
|
|
|
| 46 |
|
|
lopt :: These are options that the Fortran compiler requires for |
| 47 |
|
|
the link stage. |
| 48 |
|
|
|
| 49 |
|
|
ebase :: This is the base directory where the ESMF build is located. |
| 50 |
|
|
|
| 51 |
|
|
esmfmod :: This is the location under "ebase" where the ESMF module |
| 52 |
|
|
files are located. |
| 53 |
|
|
|
| 54 |
|
|
esmflib :: This is the location under "ebase" where the ESMF library |
| 55 |
|
|
files are located. |
| 56 |
|
|
|
| 57 |
|
|
Typical setting of these variables would look like |
| 58 |
|
|
|
| 59 |
|
|
fbase = /soft/com/packages/intel-8 |
| 60 |
|
|
fcomp = $(fbase)/bin/ifort |
| 61 |
|
|
fopt = |
| 62 |
|
|
lopt = -mp -Wl,-rpath,$(fbase)/lib -L$(fbase)/lib \ |
| 63 |
|
|
-L/soft/apps/packages/netcdf-3.5.1/lib \ |
| 64 |
|
|
-lcprts -lrt -lmpiuni -lnetcdf |
| 65 |
|
|
ebase = /home/hill/src/ESMF_2_0_0rp1_20040708.s01 |
| 66 |
|
|
esmfmod = $(ebase)/mod/modg/Linux.intel.32.default |
| 67 |
|
|
esmflib = $(ebase)/lib/libg/Linux.intel.32.default |
| 68 |
|
|
|
| 69 |
|
|
This example is for the x86 cluster "jazz.lcrc.anl.gov" at Argonne national laboratory. |
| 70 |
|
|
The settings are for using the Intel 8.0 compiler "ifort" that is in the system |
| 71 |
|
|
directory "/soft/com/packages/intel-8" on the jazz system. |
| 72 |
|
|
The "lopt" settings are taken from the settings that were used for the ESMF |
| 73 |
|
|
build. These settings are determined during ESMF installation. The ESMF |
| 74 |
|
|
installation must be carried out before the example codes can be compiled. |
| 75 |
|
|
The root directory for the ESMF installation is "/home/hill/src/ESMF_2_0_0rp1_20040708.s01". |
| 76 |
|
|
Within that directory the files that are used to compile the example codes are |
| 77 |
|
|
the ESMF libraries (these are located under the directory path in "esmflib" ) and |
| 78 |
|
|
module files for the ESMF library (these are located under the diretory path in |
| 79 |
|
|
"esmfmod"). |
| 80 |
|
|
|
| 81 |
|
|
|
| 82 |
|
|
|