Difference between revisions of "Compiling with CMake"

From Geos-chem
Jump to: navigation, search
(Check if CMake is installed on your system)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
__FORCETOC__
 
__FORCETOC__
 
'''''[[Compiling GEOS-Chem|Previous]] | [[Compiling with GNU Make|Next]] | [[Getting Started with GEOS-Chem]]'''''
 
'''''[[Compiling GEOS-Chem|Previous]] | [[Compiling with GNU Make|Next]] | [[Getting Started with GEOS-Chem]]'''''
#[[Minimum system requirements for GEOS-Chem|Minimum system requirements]]
+
#[[Minimum system requirements for GEOS-Chem|Minimum system requirements (and software installation)]]
#[[Installing required software]]
+
 
#[[Configuring your computational environment]]
 
#[[Configuring your computational environment]]
 
#[[Downloading GEOS-Chem source code|Downloading source code]]
 
#[[Downloading GEOS-Chem source code|Downloading source code]]
Line 18: Line 17:
  
  
== Overview ==
+
This content has been migrated to the [https://geos-chem.readthedocs.io/en/latest/gcclassic-user-guide/compile.html '''Compile the source code''' chapter of <tt>geos-chem.readthedocs.io</tt>].
 
+
[http://cmake.org CMake] is a platform-independent build system.  It creates Makefiles that can be used to compile GEOS-Chem source code into an executable file.
+
 
+
On this page, we will describe the basic steps that you need to compile GEOS-Chem with CMake.  For a deeper dive into CMake, we recommend that you visit the [[CMake  FAQ|CMake Frequently Asked Questions (FAQ) page]] that has been prepared by GCST member Liam Bindle.
+
 
+
[[Compiling_GEOS-Chem#Which_versions_can_use_GNU_Make_and_which_can_use_CMake.3F|As shown in the previous chapter]], GEOS-Chem 12.6.0 and later versions can be compiled with either CMake or GNU Make.  GNU Make will be retired in [[GEOS-Chem 13.0.0]]. Thus, in 13.0.0 and later versions, compiling GEOS-Chem will require CMake.
+
 
+
== Before getting started ==
+
 
+
Before going through these instructions you should do the following:
+
 
+
=== Check if CMake is installed on your system ===
+
 
+
The only new software requirement for building GEOS-Chem with CMake is CMake version 3.13. CMake is popular utility, and it might already be installed on your system. You can check which version of CMake (if any) is installed on your machine by typing:
+
 
+
'''[~]$''' cmake --version
+
cmake version 3.19.0
+
+
CMake suite maintained and supported by Kitware (kitware.com/cmake).
+
'''[~]$'''
+
 
+
If your computer system uses a software module system (such as '''Lmod''' or '''environment-modules'''), you can test if there is a pre-installed CMake module on your system with a command such as
+
 
+
'''[~]$''' module avail cmake
+
 
+
and then once you know the module name, you can load it into your Unix environment with a command such as:
+
 
+
'''[~]$''' module load cmake/3.19
+
 
+
Ask your IT staff what the proper module command syntax is for your system.
+
 
+
Even though GEOS-Chem will work with CMake 3.13 or later, we recommend obtaining a recent CMake version (3.17 or later).  This will ensure that ensure that you will have a CMake version with recent bug fixes and updates applied.
+
 
+
If CMake is not installed on your system (or its version is less than the required) contact your system administator.  The latest CMake code may be obtained  [https://cmake.org/download/ here].  You can also install CMake with the [http://github.com/spack/spack Spack package manager].
+
 
+
=== Set the proper environment variables ===
+
 
+
An objective of the transition to CMake has been simplifying the build environment. The only required environment variables are those that [[Specifying_compilers_for_GEOS-Chem|select your compilers]]. These are <tt>FC</tt>, <tt>CC</tt>, and <tt>CXX</tt> for Fortran, C, and C++ respectively. For GEOS-Chem Classic, only <tt>FC</tt> is required.
+
 
+
Optionally, if the <tt>nc-config</tt> or <tt>nf-config</tt> executables are not available on your machine, you can set <tt>NETCDF_ROOT</tt>, <tt>NETCDF_C_ROOT</tt>, or <tt>NETCDF_Fortran_ROOT</tt> environment variables to the directories where NetCDF's C and Fortran libraries are installed. Note that these variables have higher precidence than the install prefixes returned by <tt>nc-config</tt> and <tt>nf-config</tt>.
+
 
+
Below is an example <tt>~/.bashrc</tt> that sets up an environment for building GEOS-Chem with CMake.
+
<span style="color:Gray"># Picking the compiler I want to use</span>
+
<span style="color:MediumPurple">export</span> FC<span style="color:Crimson">=</span>gfortran
+
+
<span style="color:Gray"># Misc environment variables</span>
+
<span style="color:MediumPurple">export</span> NETCDF_C_ROOT<span style="color:Crimson">=</span>/usr/local/netcdf/4.6.1                    <span style="color:Gray"># only required if nc-config is not available</span>
+
<span style="color:MediumPurple">export</span> NETCDF_Fortran_ROOT<span style="color:Crimson">=</span>/usr/local/netcdf-fortran/4.4.4      <span style="color:Gray"># only required if nf-config is not available</span>
+
 
+
Don't forget to <tt>source ~/.bashrc</tt> after you modify it!
+
 
+
=== Download GEOS-Chem and create a run directory ===
+
 
+
Once you have CMake installed, then follow the instructions from previous chapters in this Guide to [[Downloading_GEOS-Chem_source_code|download the GEOS-Chem source code]] and to [[Creating_GEOS-Chem_run_directories|create a run directory]] for the simulation that you wish to perform.
+
 
+
== Building GEOS-Chem ==
+
 
+
You should think of CMake as an interactive tool for configuring GEOS-Chem's build. For example, compile-time options like disabling multithreading and turning on components (e.g. APM, RRTMG) are all configured with CMake commands. Besides configuring GEOS-Chem's build, CMake also performs checks on your build environment to detect problems that would cause the build to fail. If it identifies a problem, like a missing dependency or mismatched run directory and source code version numbers, CMake will print an error message that describes the problem.
+
 
+
If you are new to CMake and would like a rundown of how to use the <tt>cmake</tt> command, check out [https://github.com/LiamBindle/An-Introduction-to-Using-CMake/wiki my tutorial]. This tutorial is not necessary, but it will make you more familiar with using CMake and help you better understand what is going on.
+
 
+
Below are the steps for building GEOS-Chem with CMake.
+
 
+
=== 1. Navigate to your run directory ===
+
Let's assume our run directory is <tt>~/gc_4x5_fullchem</tt>, so we'll <tt>cd</tt> there and get a directory listing:
+
 
+
'''[~]$''' cd ~/gc_4x5_fullchem
+
'''[gc_4x5_fullchem]$ '''ls
+
archiveRun.sh*                      getRunInfo*      OutputDir/
+
'''build/'''                              HEMCO_Config.rc  README
+
cleanRunDir.sh*                      HEMCO_Diagn.rc  rundir.version
+
CodeDir@                            HISTORY.rc      runScriptSamples/
+
download_data.py*                    input.geos      species_database.yml
+
GEOSChem.Restart.20190701_0000z.nc4  metrics.py*
+
'''[gc_4x5_fullchem]$ '''
+
 
+
Note that each GEOS-Chem run directory that you generate has a folder named <tt>build/</tt>.  This is where we will run CMake.
+
 
+
=== 2. Navigate to the build directory ===
+
 
+
The build directory is where CMake and your compilers are going to put the files they generate.  For this example, we will use the <tt>build/</tt> folder that was automatically generated in the GEOS-Chem Classic run directory. For GCHP you will need to create one.
+
 
+
'''[gc_4x5_fullchem]$''' cd build
+
'''[gc_4x5_fullchem/build]$'''
+
 
+
NOTE: You are free to create a build directory with a different name. Sometimes it is convenient to create multiple build directories for compiling GEOS-Chem with different compilers (e.g. <tt>build_gfortran93</tt>, <tt>build_ifort18</tt>), etc.).
+
 
+
===3. Initialize your build directory===
+
 
+
Next, we need to initialize the build directory.  Type:
+
 
+
'''[gc_fullchem_4x5/build]$''' cmake ../CodeDir
+
 
+
where <tt>../CodeDir</tt> is the symbolic link from our run directory (<tt>gc_fullchem_4x5/</tt>) to the GEOS-Chem source code directory.  CMake will generate output similar to this:
+
 
+
=================================================================
+
GCClassic 13.0.0 (top-level wrapper)
+
Current status: 13.0.0-beta.1-16-ged3eabe.dirty
+
=================================================================
+
-- Useful CMake variables:
+
  + CMAKE_PREFIX_PATH:    /path/to/libraries/...
+
  + CMAKE_BUILD_TYPE:    Release
+
-- Run directory setup:
+
  + RUNDIR:      ..
+
-- Bootstrapping  ..
+
-- Threading:
+
  * OMP:          <span style="color:darkgreen">ON</span>  OFF
+
-- General settings:
+
  * CUSTOMMECH:  ON  <span style="color:darkgreen">OFF</span>
+
  * BPCH_DIAG:    ON  <span style="color:darkgreen">OFF</span>
+
  * USE_REAL8:    <span style="color:darkgreen">ON</span>  OFF
+
-- Components:
+
  * TOMAS:        ON  <span style="color:darkgreen">OFF</span>
+
  * TOMAS_BINS:  <span style="color:darkgreen">NA</span> 15 40
+
  * APM:          ON  <span style="color:darkgreen">OFF</span>
+
  * RRTMG:        ON  <span style="color:darkgreen">OFF</span>
+
  * GTMM:        ON  <span style="color:darkgreen">OFF</span>
+
  * HCOSA:        ON  <span style="color:darkgreen">OFF</span>
+
  * LUO_WETDEP:  ON  <span style="color:darkgreen">OFF</span>
+
=================================================================
+
HEMCO 3.0.0
+
Current status: 3.0.0-beta.0-2-g777c2ae.dirty
+
=================================================================
+
-- Settings:
+
  * OMP:          <span style="color:darkgreen">ON</span>  OFF
+
  * USE_REAL8:    <span style="color:darkgreen">ON</span>  OFF
+
=================================================================
+
GEOS-Chem 13.0.0 (science codebase)
+
Current status: gcc_13.0.0-alpha.13-93-gdc4999053
+
=================================================================
+
Creating /home/gc_4x5_fullchem/CodeDir/src/GEOS-Chem/Interfaces/GCClassic/gc_classic_version.H
+
-- Configuring done
+
-- Generating done
+
-- Build files have been written to: /home/gc_4x5_fullchem/build
+
 
+
Your CMake command's output contains important information about your build's configuration.  We will [[#5. Understanding the output from CMake|explain this output]] below.
+
 
+
=== 4. Configure your build ===
+
 
+
Your build directory is now configured to compile GEOS-Chem using all default options.  If you do not wish to change anything further, [[#5. Understanding the output from CMake|you may skip ahead to the next section]].
+
 
+
However, if you wish to modify your build's configuration, simply invoke CMake once more with optional parameters. Use this format:
+
 
+
'''[gc_fullchem_4x5/build]$''' cmake . -D<name>="<value>" ...
+
 
+
Note that the "<tt>.</tt>" argument is necessary. It tells CMake that your current working directory (i.e. <tt>.</tt>) is your build directory. The output of <tt>cmake</tt> tells you about your build's configuration. Options are prefixed by a "<tt>+</tt>" or "<tt>*</tt>" in the output, and their values are displayed or highlighted. If you are colorblind or if you are using a terminal that does not support colors, refer to the [[CMake FAQ]] for instructions on disabling colorized output.  For a detailed explanation of CMake output, [[#Understanding the output from CMake|see the next section]].
+
 
+
The table below contains the list of GEOS-Chem build options that you can pass to CMake.  GEOS-Chem will be compiled with the default build options, unless you explicitly specify otherwise.
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
 
+
!width="350px"|Item
+
!width="250px"|Default option
+
!width="200px"|To negate, use this option
+
 
+
|-valign="top"
+
|Run directory path
+
|<span style="color:darkgreen"><tt>-DRUNDIR=</tt></span>
+
|<span style="color:red"><tt>-DRUNDIR=..</tt></span>
+
 
+
|-valign="top"
+
|CMAKE_BUILD_TYPE
+
|<span style="color:darkgreen"><tt>-DCMAKE_BUILD_TYPE=Release</tt></span>
+
|<span style="color:red"><tt>-DCMAKE_BUILD_TYPE=Debug</tt></span>
+
 
+
|-valign="top"
+
|Chemistry mechanism
+
|<span style="color:darkgreen"><tt>-DMECH=fullchem</tt></span>
+
|<span style="color:red"><tt>-DMECH=custom</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with OpenMP parallelization
+
|<span style="color:darkgreen"><tt>-DOMP=y</tt></span>
+
|<span style="color:red"><tt>-DOMP=n</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with binary punch (BPCH) diagnostics
+
|<span style="color:darkgreen"><tt>-DBPCH_DIAG=n</tt></span>
+
|<span style="color:red"><tt>-DBPCH_DIAG=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with 64-byte (REAL*8) precision<br>NOTE: Not fully implemented!
+
|<span style="color:darkgreen"><tt>-DUSE_REAL8=y</tt></span>
+
|<span style="color:red"><tt>-DUSE_REAL8=n</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with TOMAS Microphysics
+
|<span style="color:darkgreen"><tt>-DTOMAS=n</tt></span>
+
|<span style="color:red"><tt>-DTOMAS=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with TOMAS Microphysics using 15 or 40 bins
+
|<span style="color:darkgreen"><tt>-DTOMAS_BINS=NA</tt></span>
+
|<span style="color:red"><tt>-DTOMAS_BINS=15</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with APM Microphysics
+
|<span style="color:darkgreen"><tt>-DAPM=n</tt></span>
+
|<span style="color:red"><tt>-DAPM=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with the RRTMG radiative transfer model
+
|<span style="color:darkgreen"><tt>-DRRTMG=n</tt></span>
+
|<span style="color:red"><tt>-DRRTMG=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with the Global Terrestrial Mercury Model<br>NOTE: Currently disabled
+
|<span style="color:darkgreen"><tt>-DHCOSA=n</tt></span>
+
|<span style="color:red"><tt>-DHCOSA=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with the HEMCO standalone
+
|<span style="color:darkgreen"><tt>-DHCOSA=n</tt></span>
+
|<span style="color:red"><tt>-DHCOSA=y</tt></span>
+
 
+
|-valign="top"
+
|Build GEOS-Chem with the Luo et al 2019 wet deposition scheme
+
|<span style="color:darkgreen"><tt>-DLUO_WETDEP=n</tt></span>
+
|<span style="color:red"><tt>-DLUO_WETDEP=y</tt></span>
+
 
+
|}
+
 
+
For example if you wanted to build GEOS-Chem with all debugging flags on, you would type:
+
 
+
'''[gc_fullchem_4x5/build]$''' cmake . -DCMAKE_BUILD_TYPE=Debug
+
 
+
or if you wanted to turn off OpenMP parallelization (so that GEOS-Chem executes only on one computational core), you would type:
+
 
+
'''[gc_fullchem_4x5/build]$''' cmake . -DOMP=n
+
 
+
etc.
+
 
+
If you plan to use the <tt>make install</tt> option (recommended) to copy your executable to your run directory, you must reconfigure CMake with the <tt>-DRUNDIR</tt> option. Multiple run directories can be specified by a semicolon separated list. A warning is issues if one of these directories does not look like a run directory. These paths can be relative paths or absolute paths. Relative paths are interpreted as relative to your build directory. For example:
+
 
+
  '''[gc_fullchem_4x5/build]$''' cmake . -DRUNDIR=/path/to/rundir
+
 
+
=== 5. Understanding the output from CMake ===
+
 
+
As you can see from the [[#3. Initialize your build directory|example CMake output from Section 3]], GEOS-Chem "Classic" 13.0.0 and later versions contain code from 3 independent repositories:
+
 
+
1. GCClassic wrapper (aka "the superproject"), <tt>https://github.com/geoschem/geos-chem-classic.git</tt>
+
 
+
  =================================================================
+
  GCClassic 13.0.0 (top-level wrapper)
+
  Current status: 13.0.0-alpha.8-27-g1158ac1.dirty
+
  =================================================================
+
 
+
2. HEMCO (Harmonized Emissions Component) submodule, <tt>https://github.com/geoschem/hemco.git</tt>:
+
 
+
  =================================================================
+
  HEMCO 3.0.0
+
  Current status: gcc_13.0.0-alpha.4-12-g3b0a804
+
  =================================================================
+
 
+
3. GEOS-Chem submodule, <tt>https://github.com/geos-chem/geos-chem.git</tt>:
+
 
+
  =================================================================
+
  GEOS-Chem 13.0.0 (science codebase)
+
  Current status: gcc_13.0.0-alpha.8-57-gdd726b48
+
  =================================================================
+
 
+
During the build configuration stage, CMake will display the VERSION NUMBER (e.g. <tt>13.0.0</tt>) as well as the CURRENT STATUS OF THE GIT REPOSITORY (e.g. <tt>13.0.0-alpha.8-27-g1158ac1.dirty</tt> for GCClassic, GEOS-Chem, and HEMCO. 
+
 
+
Let's take the Git repository status of GCClassic as our example. The status string uses the same format as the <tt>git describe --tags</tt> command, namely:
+
 
+
  <span style="color:red">13.0.0-alpha.8</span>-<span style="color:blue">27</span>-<span style="color:darkgreen">g</span><span style="color:purple">1158ac1</span>.dirty
+
 
+
where:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="200px"|Item
+
!width="750px"|Description
+
 
+
|-valign="top"
+
|<span style="color:red"><tt>13.0.0-alpha.8</tt></span>
+
|Indicates the most recent tag in the GCClassic repository.
+
 
+
|-valign="top"
+
|<span style="color:blue"><tt>27</tt></span>
+
|Indicates the number of commits that have been made on top of tag <span style="color:red">13.0.0-alpha.8</span>.
+
 
+
|-valign="top"
+
|<span style="color:darkgreen"><tt>g</tt></span>
+
|Indicates that the version control system is Git.
+
 
+
|-valign="top"
+
|<span style="color:purple"><tt>1158ac1</tt></span>
+
|Indicates the Git commit ID (short version) at which the HEAD of the GCClassic repository is located.
+
 
+
|-valign="top"
+
|<tt>.dirty</tt>
+
|Indicates that there are code updates that have not yet been committed to this repository (if present).
+
|}
+
 
+
Under each header are printed the various build options that have been selected, as well as other relevant information:
+
 
+
{| border=1 cellspacing=0 cellpadding=5
+
|-bgcolor="#CCCCCC"
+
!width="200px"|Item
+
!width="750px"|Description
+
 
+
|-valign="top"
+
|<tt>CMAKE_PREFIX_PATH</tt>
+
|Indicates the path to important libraries such as netCDF and netCDF-Fortran.
+
 
+
|-valign="top"
+
|<tt>CMAKE_BUILD_TYPE</tt>
+
|Indicates the type of build that was selected. 
+
#Release: Debugging flags are turned off.
+
#Debug: Debugging flags are turned on (this will slow down the simulation).
+
 
+
|-valign="top"
+
|<tt>* MECH:        <span style="color:darkgreen">fullchem</span>  custom</tt>
+
|Indicates which chemistry mechanism is being used.
+
 
+
|-valign="top"
+
|<tt>* X:          <span style="color:darkgreen">ON</span>  OFF</tt>
+
|Indicates whether option <tt>X</tt> has been turned on or off.
+
 
+
|}
+
 
+
=== 6. Compile GEOS-Chem ===
+
 
+
Now that CMake has written build files to your build directory, you can compile GEOS-Chem with the <tt>make</tt> command:
+
 
+
'''[gc_fullchem_4x5/build]$''' $ make -j
+
 
+
You will see output similar to this:
+
 
+
<span style="color:darkgreen">[  1%] Built target KPPFirstPass_fullchem
+
[  3%] Built target HeadersHco
+
[  4%] Building Fortran object src/GEOS-Chem/ISORROPIA/CMakeFiles/Isorropia.dir/isorropiaII_main_mod.F.o
+
[  6%] Built target JulDayHco
+
[  6%] Building Fortran object src/GEOS-Chem/Headers/CMakeFiles/Headers.dir/state_chm_mod.F90.o
+
[  6%] Building Fortran object src/GEOS-Chem/Headers/CMakeFiles/Headers.dir/state_met_mod.F90.o
+
[  7%] Building Fortran object src/HEMCO/src/Shared/NcdfUtil/CMakeFiles/NcdfUtilHco.dir/hco_ncdf_mod.F90.o
+
[  7%] Linking Fortran static library libNcdfUtilHco.a
+
[ 10%] Built target NcdfUtilHco</span>
+
<span style="color:MediumSlateBlue">Scanning dependencies of target GeosUtilHco</span><span style="color:darkgreen">
+
[ 12%] Building Fortran object src/HEMCO/src/Shared/GeosUtil/CMakeFiles/GeosUtilHco.dir/hco_henry_mod.F90.o
+
[ 12%] Building Fortran object src/HEMCO/src/Shared/GeosUtil/CMakeFiles/GeosUtilHco.dir/hco_regrid_a2a_mod.F90.o
+
[ 13%] Building Fortran object src/GEOS-Chem/Headers/CMakeFiles/Headers.dir/state_diag_mod.F90.o
+
[ 13%] Linking Fortran static library libGeosUtilHco.a
+
[ 13%] Built target GeosUtilHco</span>
+
...
+
<span style="color:darkgreen">[ 98%] Building Fortran object src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/gc_environment_mod.F90.o
+
[ 98%] Building Fortran object src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/chemistry_mod.F90.o
+
[ 98%] Building Fortran object src/GEOS-Chem/GeosCore/CMakeFiles/GeosCore.dir/cleanup.F90.o
+
[ 98%] Linking Fortran static library libGeosCore.a
+
[ 98%] Built target GeosCore</span>
+
<span style="color:MediumSlateBlue">Scanning dependencies of target geos</span><span style="color:darkgreen">
+
[ 98%] Building Fortran object src/CMakeFiles/geos.dir/GEOS-Chem/Interfaces/GCClassic/main.F90.o
+
[100%] Linking Fortran executable ../bin/geos
+
[100%] Built target geos</span>
+
'''[gc_fullchem_4x5/build]$'''
+
 
+
Note that the <tt>-j</tt> argument tells <tt>make</tt> that it can execute as many jobs as it wants simultaneously. If you want to restrict the number of simultaneous jobs (e.g. you are compiling on a machine with limited memory), you can add a number after <tt>-j</tt>. For example, to restrict the number of jobs to 4, you would do <tt>make -j4</tt>. If you don't want <tt>make</tt> to run simultaneous jobs, don't use the <tt>-j</tt> argument.
+
 
+
=== 7. Install the geos executable in your run directory ===
+
 
+
Now that <tt>geos</tt> is built, install it to your run directory with <tt>make install</tt>. For this to work properly, you must tell CMake where to find your run directory by configuring CMake with <tt>-DRUNDIR</tt> as described in [[Compiling_with_CMake#4._Configure_your_build|step 4]]. Type the following:
+
 
+
'''[gc_fullchem_4x5/build]$''' make install
+
 
+
and you will see output similar to this:
+
 
+
[  1%] Built target KPPFirstPass_fullchem
+
[ 10%] Built target Headers
+
[ 10%] Built target JulDay
+
[ 16%] Built target NcdfUtil
+
[ 22%] Built target GeosUtil
+
[ 25%] Built target Transport
+
[ 27%] Built target HeadersHco
+
[ 28%] Built target JulDayHco
+
[ 33%] Built target NcdfUtilHco
+
[ 34%] Built target GeosUtilHco
+
[ 50%] Built target HCO
+
[ 59%] Built target HCOX
+
[ 59%] Built target HCOI_Shared
+
[ 65%] Built target KPP_fullchem
+
[ 68%] Built target History
+
[ 69%] Built target ObsPack
+
[ 71%] Built target Isorropia
+
[ 98%] Built target GeosCore
+
[100%] Built target geos
+
<span style="color:Teal">Install the project...</span>
+
-- Install configuration: "Release"
+
-- Installing: /n/home05/msulprizio/RD/gc_4x5_fullchem/build_info/CMakeCache.txt
+
-- Installing: /n/home05/msulprizio/RD/gc_4x5_fullchem/build_info/summarize_build
+
-- Installing: /n/home05/msulprizio/RD/gc_4x5_fullchem/gcclassic
+
'''[gc_fullchem_4x5/build]$'''
+
 
+
Let's now navigate back to the run directory and get a directory listing:
+
 
+
'''[gc_fullchem_4x5/build]$''' cd ..
+
'''[gc_fullchem_4x5]$''' ls
+
archiveRun.sh*    GEOSChem.Restart.20190701_0000z.nc4  OutputDir/
+
build/            getRunInfo*                          README
+
build_info/        HEMCO_Config.rc                      rundir.version
+
cleanRunDir.sh*    HEMCO_Diagn.rc                      runScriptSamples/
+
CodeDir@          HISTORY.rc                          species_database.yml
+
download_data.py*  input.geos
+
gcclassic*        metrics.py*
+
'''[gc_fullchem_4x5]$'''
+
 
+
You should now see the <tt>gcclassic</tt> executable and a <tt>build_info</tt> directory there. GEOS-Chem has now been configured, compiled, and installed in your run directory.  You are now ready to run a GEOS-Chem simulation!  Please skip ahead to our '''''[[Running GEOS-Chem]]''''' chapter.
+
 
+
== Further reading ==
+
 
+
#''[[CMake FAQ]]'' by Liam Bindle
+
#[https://cmake.org/cmake/help/latest/guide/tutorial/index.html ''CMake tutorial'' (cmake.org)]
+
#[https://learnxinyminutes.com/docs/cmake/ ''Learn X in Y minutes (where X is CMake)'']
+
#[[GEOS-Chem coding and debugging]]
+
#''[[Guide to GEOS-Chem error messages]]''
+
  
  
 
----
 
----
 
'''''[[Compiling GEOS-Chem|Previous]] | [[Compiling with GNU Make|Next]] | [[Getting Started with GEOS-Chem]]'''''
 
'''''[[Compiling GEOS-Chem|Previous]] | [[Compiling with GNU Make|Next]] | [[Getting Started with GEOS-Chem]]'''''

Latest revision as of 20:23, 1 June 2023

Previous | Next | Getting Started with GEOS-Chem

  1. Minimum system requirements (and software installation)
  2. Configuring your computational environment
  3. Downloading source code
  4. Downloading data directories
  5. Creating run directories
  6. Configuring runs
  7. Compiling GEOS-Chem
  8. Running
  9. Output files
  10. Python tools for use with GEOS-Chem
  11. Coding and debugging
  12. Further reading


This content has been migrated to the Compile the source code chapter of geos-chem.readthedocs.io.



Previous | Next | Getting Started with GEOS-Chem