Easy Guide® for Building SMOKE

Introduction

Just as the SMOKE modeling programs are clients of the I/O API library, the Makefile system for SMOKE is a client of the Makefile system for the I/O API; the process of building SMOKE is quite similar to the process for building the I/O API.

This document describes how to build SMOKE cleanly and easily (without all the errors and wrong-headedness of a certain Wiki document).

Preparation: netCDF, I/O API, etc.

As suggested in the detailed I/O API build instructions:

First, acquire netCDF and the libraries it requires -- these are configuration dependent and can be found by the netCDF commands

nc-config --libs
nf-config --flibs
For all except netCDF-Fortran, it is easiest if you install the libraries from your Linux distribution's repositories...

Then download and build the I/O API.

It is often very useful to have both the optimized and the debug/traceback/check-everything versions; some large-array problems require the medium Linux2_x86_64 memory model (e.g., BIN=Linux2_x86_64gfort10_medium); note that you can select multiple binary types BIN that you want to build and then customize the make-targets bins, binrelink, etc. in ioapi/Makefile and m3tools/Makefile to build all of these automatically.

Download and Build SMOKE

Then download SMOKE from GitHub:
git clone https://github.com/CEMPD/SMOKE.git SMOKE_v5.0
and cd to the src sub-directory. Edit Makeinclude for your installation:

Then for each of your choices of BIN, setenv BIN <your choice> ; make dir; make

Unfortunately, the current SMOKE scripting-system makes it quite difficult to switch from running the optimized (e.g., Linux2_x86_64gfort10) to debug/check-everything (e.g., Linux2_x86_64gfort10dbg).

To Update SMOKE

Update the I/O API source if desired: git pull -a and then either setenv BIN <your choice> ; make  or  make bins, as appropriate. Update the SMOKE source if desired: git pull -a

Then for each BIN setenv BIN <your choice> ; make relink.