postgkyl install

There are two options for getting Postgkyl. The first option is to get the Conda package and the second is to clone the source code repository. Installing via Conda is preferred for the majority of users as it requires literally a single Conda command. What is more, Conda is already the suggested way of installing all the dependencies. On the other hand, the later option has an advantage of always having the most up-to-date version and is generally required for users that want to contribute to the code.

Installing with Conda (preferred)

Postgkyl can be installed with Conda with literally a single command:

conda install -c gkyl postgkyl

Note that the flag for the Gkeyll channel, -c gkyl, is required even for updating. However, it can be permanently added.

conda config --add channels gkyl
conda install postgkyl

Updates can be downloaded with:

conda update -c gkyl postgkyl

Note that to install a new package, users need the write permission for the Anaconda directory. If this is not the case, one can either create a Conda environment or install Conda into the $HOME directory.

The Gkeyll Conda channel is recommended for installing the dependencies even if Postgkyl source code repository is used (see bellow)

conda install -c gkyl postgkyl --only-deps

Installing from source

Postgkyl source code is hosted in a GitHub repository. To get Postgkyl running, one needs to clone the repository, install dependencies, and modify the PATH and PYTHONPATH environmental variables.

Postgkyl has these dependencies, which are readily available thru Conda:

Additionally, to read the Gkeyll 2 output files, the Python wrapper of Adios is required. It can be either obtained from the Gkeyll Conda channel,

conda install -c gkyl adiospy

or build manually from the source code. The standard location for the wrapper in the Gkeyll installation is gkyl/install-deps/adios-x.x.x/wrappers/numpy/. Then to build and install:

make python
python setup.py install

Finally, the postgkyl repository must be added to the PYTHONPATH and, if one wants to use Postgkyl directly from a terminal, to the PATH.

Switching from Conda version to repository

While the Conda build of Postgkyl is the suggested version for the majority of users, the source code repository is required for any code contributions. We should stress out that when switching between the different version, it is strongly advised to remove the other version. Having both may lead to an unforeseen behavior based on the relative order of components in the PATH and PYTHONPATH.

The Conda version can be uninstalled with:

conda uninstall postgkyl