The instructions below assume you have read access to all the repositories in the bundle.

Updating your git configuration

Before building the code, it is recommended that you create a .gitconfig file in your home directory (inside the container if working from a container) with the following content (or, if you already have a .gitconfig file, modifify it accordingly):

$ cat .gitconfig

[user]

   name = Your Name

   email = yourname@somewhere.something

[credential]

   helper = cache --timeout=3600

Making these changes before you build the code will enable you to avoid entering your github username and password for every git clone command.  Since the bundle accesses many repositories, this can save you time. The last line in the above example ensures that the system will remember your password for a given time (defined in seconds by the timeout parameter).

Using JEDI inside a Singularity container

If you want to run the code inside a container, follow the instructions for setting-up Singularity up to step 3:

Build JEDI environment with Singularity

Once you have your container environment, follow the instructions below: 

  1. Clone the bundle.
  2. Compile and build the code with:
        cd /somewhere/to/build
        ecbuild /somewhere/source/code/jedi-bundle
        make -j4
  3. Test the code with (from the build directory):
        ctest
  4. Read the information about bundles below.

Using JEDI without a container

To work outside a container, you will need Boost, Eigen and cmake installed on your system. On MacOS, we recommend installing those packages from homebrew.

  1. Clone the ecbuild repository.
    Ensure the bin subdirectory inside the ecbuild repository is in your PATH. There is nothing to compile, ecbuild only contains cmake macros.
  2. Clone the bundle.
  3. Uncomment the two lines about eckit and fckit in the file CMakeLists.txt in the bundle directory.
  4. Compile and build the code with:
        cd /somewhere/to/build
        ecbuild /somewhere/source/code/jedi-bundle
        make -j4
  5. Test the code with (from the build directory):
        ctest
  6. Read the information about bundles below.

More information about bundles

You only have to clone the bundle repository. ecbuild will clone all the source code for the projects defined in the CMakeLists.txt in the bundle and the make command will build them all.

To work with a different branch than the default for a given project, the branch must be modified in the CMakeLists.txt for the bundle.

Note: ecbuild accepts all cmake flags, for example, the C++ compiler can be selected with:

    ecbuild -DCMAKE_CXX_COMPILER=/path/to/gcc-7.2/bin/g++ ${SRC}

Working with the code

The CMakeLists.txt file in the bundle contains the list of the repositories included in the bundle and the branch to be used. The branch specified in the CMakeLists.txt is the one that will be compiled. When working with you own branch, the should be changed in the CMakeLists.txt file but it is not necessary to re-run ecbuild, make is enough.

After the first build, changes in the code can be tested by re-running only (from build directory):

    make -j4

    ctest

By default, make will not update your local repository from the remote. To update all repositories in the bundle, run:

    make update

The update will fail for repositories that contain uncommited code. This is a safety mechanism to avoid losing your work.