Installing CCSM3

From oldwiki.scinet.utoronto.ca
Revision as of 14:29, 31 January 2011 by Guido (talk | contribs)
Jump to navigation Jump to search

This page is mostly a record of the steps needed to install CCSM3 on the General Purpose Cluster (GPC) (Linux).

The first several lines of the Macros.Linux (configuration) file (Using Intel Fortran Compilers):

#===============================================================================
# CVS $Id: Macros.Linux,v 1.11.2.4 2007/01/17 05:17:49 tcraig Exp $
# CVS $Source: /fs/cgd/csm/models/CVS.REPOS/shared/bld/Macros.Linux,v $
# CVS $Name: ccsm3_0_1_beta24 $
#===============================================================================
### Makefile macros for "Linux", supports portland + gnu 
# Makefile macros for "Linux", supports Intel compilers + gnu 
#===============================================================================  

INCLDIR    := -I. -I$(FPATH) -I$(SCINET_NETCDF_INC) -I$(INCROOT) -I$(INC_MPI) -I$(NETCDF_MOD)

#SLIBS      := -L$(LIB_NETCDF) -lnetcdf  -llapack -lblas
#SLIBS      := -L$(LIBRARY_PATH) -lmkl_lapack -lmkl_em64t -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -L/usr/local/lib -lnetcdf
SLIBS      := -L$(SCINET_NETCDF_LIB) -lnetcdf

CPP        := NONE
CPPFLAGS   :=
CPPDEFS    := -DLINUX -DFORTRANUNDERSCORE -DLINUX  -DNO_SHR_VMATH
CPPFLAGS   := -DLINUX -DNO_SHR_VMATH -DINTEL_COMPILER -Df2cFortran
FC         := mpif90
#FFLAGS     := -c -r8 -i4 -Kieee -Mrecursive -Mdalign -Mextend
#FFLAGS     := -c -real-size 64 -integer-size 32 -align all -fltconsistency -recursive -extend_source 132
## This compiles on intel x86_64
FFLAGS     := -O0 -cpp -c -real-size 64 -integer-size 32 -align all -fltconsistency -save   

#FFLAGS     := -c -r8 -i4 -autodouble -align all -fltconsistency -recursive -fast
#FFLAGS     := -cpp -c -r8 -i4 -132 -autodouble -convert big_endian -fp-model precise -prec-div -prec-sqrt -recursive -align all -fltconsistency 
CC         := mpicc
CFLAGS     := -c -DUSE_GCC

FIXEDFLAGS := 
FREEFLAGS  := -free
MOD_SUFFIX := mod
LD         := $(FC)
AR         := ar
ULIBS      := -L$(LIBROOT) -lesmf -lmct -lmpeu -lmph
FLIBS      := -L/usr/local/lib


In /project/ccsm/ccsm3_current/scripts/ccsm_utils/Machines

Modified these files:

run.linux.gpc

batch.linux.gpc

env.linux.gpc


Modified check_machine to include gpc:

/project/ccsm/ccsm3_current/scripts/ccsm_utils/Tools/check_machine


Changed:

/project/ccsm/ccsm3_current/scripts/ccsm_utils/Components/esmf.buildlib

diff esmf.buildlib esmf.buildlib~

24c24
< if ($OS == 'Linux')        setenv ESMF_ARCH linux_intel
---
> if ($OS == 'Linux')        setenv ESMF_ARCH linux_pgi

Edit /project/ccsm/ccsm3_current/scripts/ccsm_utils/Components/mct.buildlib

MCT configure wants to grab gfortran because of the PATH order

if ( `uname` == "Linux" ) then
    setenv FC mpif90
endif