Home » Building, Installing, and Running OPAL on Linux (Ubuntu 22.04)

Building, Installing, and Running OPAL on Linux (Ubuntu 22.04)

Note: this page supersedes the page on Fedora.

This is being installed on an Ubuntu 22.04 OS running on a Parallels virtual machine on an M1 MacBook Pro.  That fact will make some things slightly different than other instances of Ubuntu.

Background

The OPAL project homepage, including the link to subscribe to the forum mailing list is found here.

Prerequisites

I kind of lost track of everything I had to install.  At the very least, you need:

  • cmake
  • autotools-dev
  • openmpi-dev
  • libhdf5-dev
  • libboost-all-dev
  • ippl (this one will NOT show up as missing with cmake, but it will cause problems)

The other missing stuff will come up when you do the cmake step.

Building and installing software

You’ll need to download, build and install the the H5Hut and OPAL code.  I’ll assume everything is under the directory SRC_DIR

H5Hut

Download the code as follows:

cd ${SRC_DIR}
mkdir H5hut
cd H5hut
git clone https://gitlab.psi.ch/OPAL/src.git
cd src
./autogen.sh

If autogen finds and missing software, install the missing packages until it succeeds, then do

./configure –with-hdf5=/usr/lib/aarch64-linux-gnu/hdf5/serial -enable-fortran -prefix=/usr/local

where “aarch650-linux-gnu” is the correct architecture for your computer.  Then do

make
make install

OPAL

Do the following:

cd ${SRC_DIR}
mkdir OPAL
cd OPAL
git clone https://gitlab.psi.ch/OPAL/src.git
mkdir build
cd build
export CC=mpicc
export CXX=mpicxx
cmake ../src

Install any necessary packages that weren’t found and try cmake again.  Once it succeeds, type

make

In my case, it failed to find “mpi.h”, so I re-ran cmake with

cmake -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=/usr/lib/aarch64-linux-gnu/openmpi/include

where again “aarch64-linux-guy” should be replaced with the correct achitecture for your machine.  After which I did

make
make install

The make command took a while and generated a few errors, but it compiled

Running Examples

Before running the examples, I had to install gnuplot with

sudo apt-get install gnuplot-x11

Cyclotron Examples

I tried all the cyclotron examples found here:

The all produced the exact same output as on the page.

(last updated 12-APR-2024 by Eric Prebys)