Skip to content

Install

Carlos Downie edited this page Mar 19, 2021 · 92 revisions

WikiDocumentationInstall

CDAT is installed via Conda

We offer an installation for conda users under linux-64 or osx-64. Support for Windows is also available via the Windows Subsystem for Linux.

All Platforms System Requirements

  • Anaconda or Miniconda
  • If you didn't let Anaconda or Miniconda prepend the Anaconda<2 or 3> install location to PATH, make sure conda is in your PATH (for more information see the Anaconda Documentation). Assuming Ananconda is installed in ${HOME}/anaconda:
    • export PATH=${HOME}/anaconda/bin:${PATH} # for [bash]
    • setenv PATH ${HOME}/anaconda/bin:${PATH} # for [tcsh]
  • Make sure you have nothing left over from an old CDAT installation in your PATH/PYTHONPATH,LD_LIBRARY_PATH etc...

Windows Specific Requirements

  • Windows is supported via the Windows Subsystem for Linux which comes with Windows 10.
  • You will need to set things up as instructed here and then follow the regular instructions for Linux.

Bypassing firewalls

  • If your institution has tight ssl certificate/security issues try:
    • conda config --set ssl_verify false
    • binstar config --set ssl_verify False

Installing latest CDAT - 8.2.1

The latest CDAT supports both MacOS and Linux, for python 3.6, 3.7 and 3.8. We currently only support running with libnetcdf mpi_openmpi or libnetcdf nompi. If you need to use MPI in the conda environment, you can install CDAT specifying "libnetcdf==mpi_openmpi_". It will install MPI and MPI4py and “libnetcdf with mpi_openmpi”. This enables MPI support in libnetcdf/CDMS2. If you do not need MPI, you can install CDAT specifying "libnetcdf==nompi_".

NOTES:

  • The commands shown below use BASH. Do not use TCSH, as there are issues when using the wildcard characters to specify the libnetcdf version.
  • We run into some issues when we have an environment with libnetcdf mpi_mpich variant, hence we leave it out from CDAT 8.2.1.
  • The commands below are using python 3.7, but python 3.6 or 3.8 can be specified instead. Just replace python=3.7 with python=3.6 or python=3.8.
  • Packages currently included with the CDAT distribution:
    • cdat_info, cdtime, cdms2, genutil, cdutil, dv3d, vcs, wk, vcsaddons
    • Packages above are listed in the Makefile

For MacOS:

# Python 3.7 (can replace with 3.6 or 3.7) with libnetcdf mpi_openmpi
conda create -y -n cdat -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=mpi_openmpi_*" "mesalib=17.3.9" "python=3.7"

Or

# Python 3.7 with libnetcdf nompi
conda create -y -n cdat -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=nompi_*" "mesalib=17.3.9" "python=3.7"

For Linux Python:

# Python 3.7 with libnetcdf mpi_openmpi
conda create -y -n cdat -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=mpi_openmpi_*" "mesalib=18.3.1" "python=3.7"

Or

# Python 3.7 with libnetcdf nompi
conda create -y -n cdat -c conda-forge -c cdat/label/v8.2.1 cdat "libnetcdf=*=nompi_*" "mesalib=18.3.1" "python=3.7"

Saving the environment

After creating the conda environment, you can activate it, and take a snapshot in case you want to replicate the exact environment later on.

conda activate cdat
conda list --explicit > cdat.8.2.1.yaml

To Test Your CDAT Installation

To test that CDAT was installed correctly make sure your environment has been activated:

conda activate [your_env]

Next enter the following line of code:

python -c "import vcs, MV2; x=vcs.init(); x.open(); x.plot(MV2.array([[1,2,3],[4,5,6]])); x.png('mybox.png');"

After the plot is generated and saved, you can view it by opening 'mybox.png'.

If CDAT has not installed correctly, you will get an error. If it has installed correctly you should see the following graph:

CDAT Installed Correctly Graph

For more installation details see:

For installation instructions for older releases see:

Clone this wiki locally