Accessing T161 datafiles on AWS

Previously the PyFR team ran a huge T161 DNS for which the data is hosted by AWS as part of there opendata project. See here: High-Order Accurate Direct Numerical Simulation of Flow over a MTU-T161 Low Pressure Turbine Blade - Registry of Open Data on AWS

We have had some questions about accessing the data. Previously, the huge average files were split into multiple other files, but some of the pyfrs metadata wasn’t copied, I have now fixed this. However, the data was produced a while ago on an older version of PyFR circa 1.5. We have since added linear element tagging which causes a number of problems when working with older pyfrm and pyfrs files. This is compounded by changes in the h5py package, consequently you have to do quite a few steps in order to get a sufficiently old version of PyFR working.

Here I am going to try and list the steps and configs I used to get things working. The document is mainly aimed at those of us not blessed enough to have sudo. (Sudo + a package manager makes this easy). Below is a list of packages I used, for some you’ll need to find a mirror and download them yourself.

Requirements

  • Openssl v1.0.2u (this version is required due to deprecation)
  • libffi v3.4.1 (I don’t think a particular version is need, so most recent should be fine)
  • Python v3.5 (this is needed for h5py)
  • HDF5 1.10.8 (Some syntax changes with 1.12 so older h5py versions need this)
  • numpy v1.15.4
  • six 1.11.0
  • cython 0.25.2
  • pkgconfig 1.4.0
  • hypy 2.9.0

You will also need to meet the other requirements of pyfr and python such as a C compiler and MPI.
Throughout I have assumed the use of --prefix==$HOME/.local unless otherwise stated.

Installing Python3.5

This can be a pain with older versions of python as we need the ctypes and ssl modules.

  1. Compile libffi (standard configure && make && make install)
  2. Compile openssl (standard configure && make && make install)
  3. Compile python3.5 (this config command worked for me ./configure --prefix=$HOME/.local --with-system-ffi --enable-shared LDFLAGS='-L$HOME/.local/lib64 -L$HOME/.local/lib' CPPFLAGS='-I$HOME/.local/include' PKG_CONFIG_PATH=$HOME/.local/. You may need to add some stuff to your bashrc for libffi and openssl. Then you can run make -j8 && make install -j8). If _ssl and _ctypes did not successfully compile the compilation will state so at the end, you will absolutely need these.

For newer versions of python there is a handy openssl flag in the config which makes this all a lot easier.

Venv

I like to work in virtual environments as I can rm them with impunity when I inevitably break something. So run:
$ python3.5 -m venv pyfr_old_venv && cd pyfr_old_venv
and then activate it with:
$ . ./bin/activate

Then we can install some of the prerequisites for h5py (don’t upgrade pip, as the stuff we are working with won’t like newer versions, so much so that pip won’t be able to downgrade itself)

  • $ pip install pkgconfig==1.4.0
  • $ pip install six==1.11.0
  • $ pip install numpy==1.15.4
  • $ pip install cython==0.25.2
  • $ pip install h5py==2.9.0

If you are lucky that last one will work, if not you will need the next section.

Compiling an old version of hdf5 / h5py

You will need hdf5 v1.10.8 or older. You can try the following:

  1. $ git clone --branch hdf5-1_10_8 git@github.com:HDFGroup/hdf5.git
  2. $ cd hdf5
  3. $ ./configure --prefix=/path/to/pyfr_old_venv/
  4. $ make -j8 && make install -j8 && cd ..
  5. $ export HDF5_DIR=/path/to/pyfr_old_venv/lib
  6. $ export HDF5_VERSION=1.10.8
  7. $ git clone --branch 2.9.x git@github.com:h5py/h5py.git
  8. $ pip install ./h5py

PyFR

You should now be ready for pyfr:
$ pip install pyfr==1.5.0

You may need to use the following before this works:
$ pip install pytools==2017.4

P.s.

This took a little while to sort out and took several iteration to work out the stages to get this all working. One thing I found out along the way that I thought I’d share that wasn’t important for the solution was to do with openssl v3.x. When you run the config often you see an error message Can't locate IPC/Cmd.pm. I’m not familiar with Perl, but this is an error message related to Perl. To sort it out you’ll need to add some IPC modules.

This can be done easily with:

  1. $ cpan (follow the configuration if this is your first time using it)
  2. cpan> install IPC::Run
  3. cpan> install IPC::Cmd
  4. cpan> install IPC::Exe (This is just for good measure)
  5. cpan> exit

You should now be able to run the configure on openssl v3.x. Again, I’m not familiar with perl so this was new to me and I suspect it might be new to some PyFR users so thought I’d share.

1 Like