Skip to content

Building and installing ForestClaw

Donna Calhoun edited this page Aug 4, 2019 · 27 revisions

For the instructions below, we assume that you have an environment variable FCLAW that points to a super-directory containing your ForestClaw source code and build directories.

Example : Create the FCLAW environment variable in bash that points to a super-directory where you will clone the ForestClaw repository

$ cd
$ mkdir fclaw-install
$ cd fclaw-install
$ export FCLAW=$(pwd)

The FCLAW variable is not needed to build or run ForestClaw, but is used here to conveniently describe build instructions.

  1. Clone the ForestClaw source code

    $ cd $FCLAW
    $ git clone [email protected]:ForestClaw/forestclaw.git
    
  2. Clone and initialize p4est and sc submodules

    $ cd forestclaw
    $ git submodule init
    $ git submodule update
    
  3. Run bootstrap to create configuration files

    $ ./bootstrap
    
  4. Create build directory

    $ cd ..    # or cd $FCLAW
    $ mkdir forestclaw-build
    $ cd forestclaw-build
    
  5. Configure the build. For this example, we will configure so that the suite of Clawpack examples is built. To build the GeoClaw example, see GeoClaw examples.

    1. Configure for a serial build (no MPI required)

      $ ../forestclaw/configure --enable-clawpack
      
    2. Configure for a parallel build (requires MPI)

      $ ../forestclaw/configure --enable-mpi ---enable-clawpack
      

      A more complete configuration file is here.

  6. Build ForestClaw

    $ make -j4 V=0    # uses four processors, no verbose output
    
  7. Install ForestClaw

    $ make install
    

    This will install executables in the $FCLAW/forestclaw-build/local/bin directory.