How to Install Spack on Ubuntu 20.04

Spack is a very flexible package manager for your virtual server. Its advantages are that Spack is not tied to a specific language; you can create a software stack in Python or R, link to libraries written in C, C ++ or Fortran. It supports MAST (Multidisciplinary-design Adaptation and Sensitivity Toolkit) and also PNGwriter. This article will show, using an example of how you can install Spack on a Linux distribution – Ubuntu 20.04.

Install dependencies

First, you need to install the dependencies. A very important one is build-essential. You can install it using the command that is displayed below:

apt install build-essential

Installing Clone Spack

Next, after successfully installing the build-essential dependency, you need to clone the Spack repository to ~ ~/.spack/Spack, any directory of your choice. This can be done as follows:

git clone ~ / .spack / Spack

Add the Shell Support

In order for you to be able to use Spack everywhere, you need to add Spack to your PATH. This can be done using the command described below:

... ~ /.spack /Spack /share/spack/

To enable you to use the spack command every time you log in, add this command to ~ /.bash_profile exactly as shown below:

echo '. ~/.spack/Spack/share/spack/' >> ~/.bash_profile

After that, you can log out of the system so that the changes are saved and take effect. You can check the Spack installation using the command that will be displayed below:

spack -V

Next, you will be able to install a large number of scientific packages. Some of them are MAST and PNGwriter. You can install MAST using the link here. You can install PNGwriter using the command described below:

spack install pngwriter
spack load pngwriter

Was this article helpful?

Related Articles

Leave A Comment?