FLAME-HPC / xparser

The FLAME 1 xparser
0 stars 6 forks source link

Installing Libmboard and GSL on systems without root access and non-standard install folders #8

Open svdhoog opened 7 years ago

svdhoog commented 7 years ago
  1. Mistake in xparser template file Makefile.templ

In the template file Makefile.templ in the xparser folder the path to the root of the libmboard installation folder is incorrect:

LIBMBOARD_DIR = /usr/local/lib

It should be:

LIBMBOARD_DIR = /usr/local

  1. Installation of Libmboard on systems without root access

On systems without root access libmboard is installed using a local install folder:

# ./configure --prefix=/home/lsc/build/libmboard

For such custom installations, this implies the user should also manually adjust the Makefile.templ file in the xparser folder. For example:

LIBMBOARD_DIR = /home/lsc/build/libmboard

3.Installing GSL in non-standard install folders

On HPC clusters GSL or other software is usually loaded using environment modules, which means that the libraries are not in the usual system folders '/usr/local/include' and '/usr/local/lib'.

To get GSL to work on such systems, it is required to edit the Makefile.templ as shown in the file Makefile.templ.custom (see pull request #5). NOTE: the new section GSL_DIR and the inclusion of <?if gsl_lib?>).

rht commented 5 years ago

Alternatively, there could be an install script (much like how rvm/nvm/yarn/brew is installed) that prepares libmboard and xparser locally. The libmboard is installed first, which path is then propagated to xparser's template.

rht commented 5 years ago

E.g.

prepare_flame() {
  wget https://github.com/FLAME-HPC/libmboard/archive/master.zip
  unzip master.zip
  mkdir libmboard
  cd libmboard-master
  chmod +x autogen.sh  # obsolete since current master
  ./autogen.sh
  ./configure --prefix=$(cd ../libmboard; pwd) --disable-parallel
  make
  make install
  cd ..
  wget https://github.com/FLAME-HPC/xparser/archive/0.17.1.tar.gz
  tar xf 0.17.1.tar.gz
  mv xparser-0.17.1 xparser
  cd xparser
  make
  ./xparser ../$1
  cd ..
  sed -i 's|= /usr/local/lib|= $(PWD)/libmboard|g' Makefile
}
prepare_flame eurace_model.xml
make