Top Banner
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011 GSI Fundamentals (1): Setup and Compilation 2011 GSI Summer Tutorial, Boulder, CO
26

GSI Fundamentals (1): Setup and Compilation

Feb 23, 2016

Download

Documents

tanek

2011 GSI Summer Tutorial, Boulder, CO. GSI Fundamentals (1): Setup and Compilation. Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011. Outline. GSI fundamentals (1): Setup and Compilation Where to get the codes - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: GSI Fundamentals (1):  Setup and Compilation

Donald StarkNational Center for Atmospheric Research (NCAR)

The Developmental Testbed Center (DTC)Wednesday 29 June, 2011

GSI Fundamentals (1): Setup and Compilation

2011 GSI Summer Tutorial, Boulder, CO

Page 2: GSI Fundamentals (1):  Setup and Compilation

OutlineGSI fundamentals (1): Setup and Compilation

Where to get the codesDirectory structureUnpacking, setup, & buildPorting build to new platforms

GSI fundamentals (2): Run and NamelistGSI fundamentals (3): DiagnosticsGSI fundamentals (4): Applications

This talk is tailored based on Chapter 2 of the GSI User’s Guide for Community Release V3.0

Page 3: GSI Fundamentals (1):  Setup and Compilation

Downloading the Source CodeAll GSI source code can be obtained from the web

site: http://www.dtcenter.org/com-GSI/users/downloads/index.php

Page 4: GSI Fundamentals (1):  Setup and Compilation

Downloading Source code

Page 5: GSI Fundamentals (1):  Setup and Compilation

System RequirementsC compilerPerlnetCDF V3.6+ (Version 3 series only)Linear algebra library (ESSL or LAPACK/BLAS)MPI V1.2+FORTRAN 90/95 compiler

IBM AIXPGI pgf90Intel ifort

Page 6: GSI Fundamentals (1):  Setup and Compilation

Unpack DownloadsTwo tar files

comGSI_v3.tar.gz REL-2.0.2.Coeffs.JCSDA_CRTM_forGSI.tar.gz

Unpack source code & CRTM coefficientsgunzip *.tar.gztar –xvf comGSI_v3.tartar –xvf REL-2.0.2.Coeffs.JCSDA_CRTM_forGSI.tar

Page 7: GSI Fundamentals (1):  Setup and Compilation

Tour of the Directory StructureInside the top level of the comGSI_v3/ directory are four

scripts and five directories. arch/ cleancompileconfigurefix/makefilerun/src/util/

7

Page 8: GSI Fundamentals (1):  Setup and Compilation

Build InfrastructureUses DTC Build system /arch directory contains rules & scripts for build.

/arch/Config.pl perl script for parsing system info & combining together configure.gsi file.

/arch/preamble: uniform requirements for the code, such as word size, etc.

/arch/configure.defaults default platform settings/arch/postamble: standard make rules & dependencies

./clean script to clean the build../configure script to create configuration file configure.gsi; contains

info on compiler, MPI, & paths. ./compile script to compile executable../makefile top level makefile for build.

Page 9: GSI Fundamentals (1):  Setup and Compilation

The restfix/ directory containing fixed parameter files

Background error covariance and observation errorsCRTM coefficients – moved to a separate directory due to sizeObservation data control filesBUFR tables for Prepbufr files

run/run_gsi.ksh sample run scriptgsi.exe executable

src/ source directorylibs/ supplemental library source code main/ main GSI source code

util/ additional community tools

9

Page 10: GSI Fundamentals (1):  Setup and Compilation

Supplemental Libraries (libs/)bacio/ NCEP BACIO librarybufr/ NCEP BUFR librarycrtm_jcsda_2.0/ JCSDA Commuity Radiative Transfer Modelgfsio/ Unformatted Fortran record for GFS I/Ogsdcloud/ GSD Cloud Analysisnemsio/ Support for NEMS I/Osfcio/ NCEP GFS surface file I/O modulesigio/ NCEP GFS atmospheric file I/O modulesp/ NCEP spectral-grid transforms (global application only)w3/ NCEP W3 library (date/time manipulation, GRIB)

10

Page 11: GSI Fundamentals (1):  Setup and Compilation

Building GSI

11

Page 12: GSI Fundamentals (1):  Setup and Compilation

Building GSIBuild sequence

./clean –aSet library paths

setenv WRF_DIR Location_of_WRF_directorysetenv LAPACK (typically only needed for Linux w/Intel).

./configureCustomize file configure.gsi if necessary

./compileSuccessful compilation will produce:

comGSI_v3/run/gsi.exe

Page 13: GSI Fundamentals (1):  Setup and Compilation

Clean CompilationTo remove all object files and executables, type:

cleanTo remove all built files, including the configure

file, type: clean –aA clean all needed if:

Compilation failedWant to change configuration file

Page 14: GSI Fundamentals (1):  Setup and Compilation

Diagnosing Build Issues• How the build system works• What to do when the build fails

14

Page 15: GSI Fundamentals (1):  Setup and Compilation

GSI Build System

./configure

./configure.gsi

Configuration stage Compiling stage

Run ./configure • Generate local compile

options• Saves values in

configure.gsi

Run ./compile • Runs top level ./makefile • Which in turn runs

./src/makefile, • Which runs

./src/main/makefile

Page 16: GSI Fundamentals (1):  Setup and Compilation

How the build worksRunning ./configure creates file

configure.gsi by:Running the Perl script /arch/Config.plScript Config.pl queries the system &

selects the appropriate entry from /arch/configure.defaults

Results are saved to configure.gsi.

16

Page 17: GSI Fundamentals (1):  Setup and Compilation

Fixing Build Issues Most build problems are due to non-standard instillation

of one of the following: compiler, mpi, or support libraries.

Edit paths in the file configure.gsi to correctly reflect your system.

When build succeeds, modify file arch/configure.defaults to include new settings.

Report issues to gsi_help so they can be addressed in next release.

17

Page 18: GSI Fundamentals (1):  Setup and Compilation

Fixing Build Issues (continued) The name or location of your LAPACK library may

differ from what the build assumes. See MYLIBsysYou may also want to use different Fortran compiler

flags: See FFLAGS_*You may also want to use different C compiler flags:

See CFLAGSYou may have a slightly different name for your

compilers: See SFC, SF90, and SCC to specify your Fortran, Fortran90+, and C compilers.

See the User’s Guide for details

18

Page 19: GSI Fundamentals (1):  Setup and Compilation

19

configure.gsi

Page 20: GSI Fundamentals (1):  Setup and Compilation

20

Sample configure file for Linux with PGI compiler.

• COREDIR – path to src directory• SFC, SF90, SCC – compilers• FFLAGS_DEFAULT, FFLAGS – fortran flags for src code

configure.gsi

Page 21: GSI Fundamentals (1):  Setup and Compilation

21

configure.gsi

Page 22: GSI Fundamentals (1):  Setup and Compilation

configure.gsi

22

Base Fortran flags

Page 23: GSI Fundamentals (1):  Setup and Compilation

configure.gsi

23

Separate Fortran and Cflags for supplemental libraries.

Page 24: GSI Fundamentals (1):  Setup and Compilation

24

configure.gsi

Page 25: GSI Fundamentals (1):  Setup and Compilation

configure.gsi

25

Library Paths:

The main library path of interest is the one to the LAPACK and BLAS libraries. Common issues are that • library names are incorrect• library paths are incorrect• or bothCheck that your system has libraries in the specified path and with the specified names.

Page 26: GSI Fundamentals (1):  Setup and Compilation

SupportFor more detailed information on

installation, please see:GSI User’s Guide, chapter 2

www.dtcenter.org/com-GSI/users/docs/index.php

For further assistance contact:[email protected]