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).
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 --libsFor all except netCDF-Fortran, it is easiest if you install the libraries from your Linux distribution's repositories...
nf-config --flibsThen 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 typesBIN
that you want to build and then customize the make-targetsbins, binrelink
, etc. in ioapi/Makefile and m3tools/Makefile to build all of these automatically.
Then download SMOKE from GitHub:git clone https://github.com/CEMPD/SMOKE.git SMOKE_v5.0and cd to the src sub-directory. Edit Makeinclude for your installation:
- Edit make-variable
BASEDIR
to match the directory path for this src sub-directory
- Un-comment the
IFLAGS
andEFLAGS
for your compiler-setThen for each of your choices of
BIN
, setenv BIN <your choice> ; make dir; makeUnfortunately, 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
).
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 -aThen for each
BIN
setenv BIN <your choice> ; make relink.