As of 3/22/18, special instructions (as shown on this page) are required to compile mpas-bundle. The idea is to compile MPAS outside of the mpas-bundle repository, create an MPAS library, link to that library from within mpas-bundle and continue within mpas-bundle. There is a csh script (called build_mpas.csh) included in the mpas-bundle repository that can be used to do the run this flow.

The plan is to get all of this integrated into mpas-bundle so that MPAS will be compiled through the usual ecbuild/make process. Byoung-Joo (BJ) Jung (bjung@ucar.edu) is the owner of this process, and BJ is a good contact if you have questions. The merge into mpas-bundle will occur when BJ has some time to help with this task which will hopefully be in the near future.

This flow has been run in the Singularity container with success. Running outside the Singularity container requires the fixing of number of issues and is not recommended.


How to compile mpas-bundle

These instructions will have you do the work in two directories: $HOME/jedi2 and $HOME/jedi3. Auxiliary compiles are done in $HOME/jedi2, and the mpas-bundle compile will be done in $HOME/jedi3. If this directory structure will not work for you, you will need to edit build_mpas.csh and modify the path definitions throughout the script.

  1. Place the two files attached to this page (build_mpass.csh,  MPAS_Release.tgz) into your home directory.

  2. Prepare for the build

    # Create the required directories
    cd                                              # ie, cd to your home directory
    mkdir -p jedi2/code jedi2/libs jedi3/code
    
    
    # Install the MPAS source code
    cd jedi2/code
    tar -xzvf $HOME/MPAS-Release.tgz
    
    
    # Install NCAR's parallel IO library (pio2)
    cd ~/jedi2/libs
    git clone https://github.com/NCAR/ParallelIO.git
    
    
    # Install the mpas-bundle code
    cd ~/jedi3/code
    git clone https://github.com/UCAR/mpas-bundle.git
  3. Do the build

    The build needs to be done in two steps to avoid issues with environment variable settings in the build_mpas.csh script when attempting to do the build in a single pass.

    cd
    
    
    # edit build_mpas.csh
    #
    #   near the top, set comp_pio2=1, comp_mpas=1, libr_mpas=1, oops_mpas=0, test_mpas=0
    #
    ./build_mpas.csh     # this builds pio and mpas libraries
    
    
    # edit build_mpas.csh
    #
    #   set comp_pio2=0, comp_mpas=0, libr_mpas=0, oops_mpas=1, test_mpas=0
    #
    ./build_mpas.csh    # this builds OOPS and associated packages
  4. Test the build

    cd ~/jedi3/build/mpas-bundle
    ctest

    Attachments

    build_mpas.cshMPAS-Release.tgz