Building CCSM2.0 Brian Kauffman CCSM Software Engineering Group

Slides:



Advertisements
Similar presentations
1 SEDIT & S/REXX SEDIT and S/REXX Mainframe-caliber tools for UNIX Offered by Treehouse Software, Inc.
Advertisements

Cluster Computing at IQSS Alex Storer, Research Technology Consultant.
Mainframe-caliber tools for UNIX Treehouse Software, Inc.
Compiling. Your C, C++ or Fortran program won’t work unless you compile it The compiler will build your program as an executable file (typically in the.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Running CCSM Tony Craig CCSM Software Engineering Group
UNIX chapter 04 UNIX Shells Mr. Mohammad Smirat. Introduction The shell is the software that listens to commands typed in at the terminal and translates.
Unix Presentation. What is an Operating System An operating system (OS) is a program that allows you to interact with the computer -- all of the software.
Software Installation The full set of lecture notes of this Geant4 Course is available at
Lecture 8  make. Overview: Development process  Creation of source files (.c,.h,.cpp)  Compilation (e.g. *.c  *.o) and linking  Running and testing.
Using Ant to build J2EE Applications Kumar
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
August 21, 2015 NET+OS 6.0/GNU The GNU Tools. 2 GNU Cross Development Tool Basics The GNU Cross Development Tools are flexible The flexibility extends.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
Configuring ROMS for South of Java Kate Hedstrom, ARSC/UAF October, 2007.
Donald Stark National Center for Atmospheric Research (NCAR) The Developmental Testbed Center (DTC) Wednesday 29 June, 2011 GSI Fundamentals (1): Setup.
Project Source Code Structure and Build Process ● Remember consistency matters as source code structure, build process, and release processes are all intertwined.
Metadata Creation with the Earth System Modeling Framework Ryan O’Kuinghttons – NESII/CIRES/NOAA Kathy Saint – NESII/CSG July 22, 2014.
Introduction to Hall-D Software February 27, 2009 David Lawrence - JLab.
Trilinos 101: Getting Started with Trilinos November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
July 29, 2003Serguei Mokhov, 1 Makefile Brief Reference COMP 229, 346, 444, 5201 Revision 1.2 Date: July 18, 2004.
Week 7 Working with the BASH Shell. Objectives  Redirect the input and output of a command  Identify and manipulate common shell environment variables.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
Computational Design of the CCSM Next Generation Coupler Tom Bettge Tony Craig Brian Kauffman National Center for Atmospheric Research Boulder, Colorado.
Winrunner Usage - Best Practices S.A.Christopher.
The introduction of CMT Version v1r14. General index 1.presentation 2.how to install CMT 3.how to write a requirements file 4.how to use CMT.
ESMF Code Generation Rocky Dunlap Spencer Rugaber Leo Mark Georgia Tech College of Computing.
Cygwin Linux for Windows Desktop Paul Stuyvesant.
Scons Writing Solid Code Overview What is scons? scons Basics Other cools scons stuff Resources.
Exploring an Open Source Automation Framework Implementation.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Linux Operations and Administration
Chapter 2: Linux & POSIX “She sells bash shells by the C shore”
Regional Models in CCSM CCSM/POP/ROMS: Regional Nesting and Coupling Jon Wolfe (CSEG) Mariana Vertenstein (CSEG) Don Stark (ESMF)
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Advanced BioPSE NCRR How to Install and Configure J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J. Davison.
The Make utility. Motivation Small programs all in single cpp file “Not so small” programs : Many lines of code Multiple components More than one programmer.
The CCSM2.0 Quick Start Guide Lawrence Buja CCSM Software Engineering Group June
22-24 Feb 05 Workshop DKRZ / M&D Stephanie Legutke Introduction to the Standard Compile Environment (SCE) of the Integrated Model & Data Infrastructure.
CCSM Tutorial CCSM Software Engineering Group June
EPICS Application Development At The Canadian Light Source Glen Wright.
©Colin Jamison 2004 Shell scripting in Linux Colin Jamison.
CCSM Performance, Successes and Challenges Tony Craig NCAR RIST Meeting March 12-14, 2002 Boulder, Colorado, USA.
Introduction to the Standard Running Environment (SRE) of the Integrating Model & Data Infrastructure Heinrich Widmann, M&D.
Changing the CCSM setup: Active Ocean plus Data Models Nancy Norton
An Overview of ROMS Code Kate Hedstrom, ARSC April 2007.
1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software.
Running CESM An overview
Emacs, Compilation, and Makefile C151 Multi-User Operating Systems.
Multiple File Compilation and linking By Bhumik Sapara.
C code organization CSE 2451 Rong Shi. Topics C code organization Linking Header files Makefiles.
1-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory # Chapter 1 ANSYS Workbench ANSYS Meshing Application.
Using the CCSM GUI Mariana Vertenstein CCSM Software Engineering Group
ENG College of Engineering Engineering Education Innovation Center 1 Functions 1 in MATLAB Topics Covered: 1.Uses of Functions Organizational Tool.
CCSM Software Engineering Update Tony Craig CCSM SEWG Meeting Feb 4, 2003.
How to configure, build and install Trilinos November 2, :30-9:30 a.m. Jim Willenbring.
State of ESMF: The NUOPC Layer Gerhard Theurich NRL/SAIC ESMF Executive Board / Interagency Working Group Meeting June 12, 2014.
UNIX Development: g++ and make CS 2204 Class meeting 8 Created by Doug Bowman, 2001 Modified by Mir Farooq Ali, 2002.
Solvency II Tripartite template V2 and V3 Presentation of the conversion tools proposed by FundsXML France.
Introduction to computing
Makefiles and the make utility
Compilers, Make and SubVersion
Software Installation
Good Testing Practices
Makefiles and the make utility
SPL – PS1 Introduction to C++.
CMPSC 60: Week 5 Discussion
Presentation transcript:

Building CCSM2.0 Brian Kauffman CCSM Software Engineering Group

Building the CCSM - overview The CCSM directory structure The build environment The execution directory Input data positioning Building executables interactively These slides follow the “Building the CCSM” section of the “CCSM2.0 User’s Guide”

The CCSM Directory Structure scripts/ contains one or more sets of run scripts for various simulations models/ contains the CCSM2.0 src code used in the various simulations

…/ccsm2.0/scripts/ In the scripts/ directory we find… test.a1/- example run scripts provided tools/- utils used by run scripts gui_run/- script that runs the gui case.X1/- additional, user-created case.Y2/ run scripts

…/ccsm2.0/scripts/test.a1/ In the test.a1/ directory we find… test.a1…master run script atm.setup.csh…setup scripts for cpl.setup.csh component models *.setup.csh RESUBMIT…used for auto-resubmit ccsm_archive…output file archiver test.a1.har…output file harvester

$SCRIPTS The run script sets an env variable that specifies where the run and setup scripts are located. Eg. in test.a1.run we have… $SCRIPTS = /usr/jdoe/ccsm2.0/scripts/test.a1 Or, more accurately… $CSMROOT = /usr/jdoe/ccsm2.0 $CASE = test.a1 $SCRIPTS = $CSMROOT/scripts/$CASE

run script, env vars, setup scripts A user executes a master run script (eg. test.a1.run) which in turn calls several component model “setup scripts,” one for each component model The run script sets certain env variables that are sent to the setup scripts, much like input arguments in a subroutine call. These env variables are used to coordinate and control the behavior of the setup scripts. For example, $CSMBLD specifies a makefile location, thus allowing all component model setup scripts to use the same makefile!

…/ccsm2.0/models/ In the models/ directory we find… atm/- code for atmosphere models ice/, lnd/, ocn/- code for other models cpl/- code for the coupler bld/- makefile & related csm_share/- code shared by components camclm_share/- code shared by cam & clm utils/- code for utils, eg. esmf

…/ccsm2.0/models/atm/ In the models/atm/ directory we find the source code for three atmosphere models… cam/- source code for CAM datm5/- source code for datm5 latm5/- source code for latm5 Similarly, there are multiple ice, land, and ocean component models.

…/models/bld/ In the bld/ directory we find… Makefile…generic makefile Macros.AIX…machine specific Macros.IRIX64 macros definitions makdep.c…dependency generator This is the one makefile and dependency generator used to build all CCSM components. $CSMBLD = $CSMROOT/models/bld

…/bld/Makefile The Makefile is a machine-independent template -- machine-specific details are provide by a macro-definitions files. Eg. the Makefile contains generic commands like… $(FC) $(FFLAGS) $(INCDIR) $*.f90

…/bld/Macros.* Macros files specify a set of machine- dependent macros needed by the generic Makefile. Eg. Macros.AIX might define… FC = mpxlf90_r FFLAGS = -03 -qstrict -qtune=auto INCLDIR = -I/usr/lpp/ppe.poe/include …whereas Macros.IRIX64 will define this macros appropriately for an SGI O2K

…/bld/Macros. Macros files specify a set of machine- dependent macros. We provide macros files for several machines, but when it comes to your home-town supercomputer, you’re on your own! Eg. Macros. defines… FC = FFLAGS = INCLDIR = etc.

…/bld/makdep.c $CSMBLD also contains a dependency generator, makdep.c, this identifies common dependencies such as F90’s use module & include, and cpp #include This is extremely useful, especially for code development & hacking.

Filepath The Makefile uses a source code search path defined in a file called “Filepath” created by the setup scripts. For example, its contents might be… /usr/jdoe/ccsm2.0/scripts/test.a1/src.cpl /usr/jdoe/ccsm2.0/models/cpl/cpl5 /usr/jdoe/ccsm2.0/models/csm_share

Filepath & $VPATH  The Filepath file is used to define gnu-make’s $VPATH variable  The “current working directory” is always the first path in $VPATH  The makefile makes a list of all *.c, *.F90, and *.F files found in the search path -- all of these files will be compiled.  If more than one file with the same name exist, the first file found with that name will be compiled -- all others will be ignored.  The order of the paths in Filepath is the same order that gmake/$VPATH will use.

gmake So CCSM has a common build env, with a command line that looks like… unix> gmake -j 6 -f $CSMBLD/Makefile \ MACFILE=Macros.AIX \ VPFILE=Filepath \ THREAD = TRUE \ EXEC=$EXEDIR/cpl

$EXEDIR Atmosphere component model is built here… $EXEROOT/atm/obj/*.o $EXEROOT/atm/obj/Filepath …but executable will be located one level up… $EXEROOT/atm/atm Similar for all other component models. Note, for example, $EXEROOT = /scratch/jdoe/test.a1

Input data positioning A component model setup script… Prepositions input data files Creates a namelist input file Builds the executable … all for one specific component. The setup script not only builds an executable, it also pre-positions data into the same directory in which the executable is located.

$CSMROOT/scripts/toos/ccsm_getdata The ccsm_getdata (csh script)

fini