Installing INTERPOS from source -------------------------- If you obtained the source from git repository, i.e. not a prepared and versioned release in a tarball, then you probably need to regenerate the build scripts of Autotools: $ module load Autotools # if needed $ ./bootstrap # generate ./configure and friends. This command runs autoconf, automake and friends in the correct order, after which you are able to run the typical commands to configure the package for your environment, build and install it: $ ./configure $ make $ make install The configure script will test for gfortran, ifort, pgfortran, and g95, and choose whichever works first. To override this you can use the FC variable, it will include some compiler-specific flags automatically: $ ./configure FC=gfortran $ ./configure FC=ifort $ ./configure FC=pgfortran $ ./configure FC=g95 Useful options to the ./configure script are (see ./configure --help) --prefix= install in (e.g. /usr/lib/libinterpos.so) --fortranmoddir= install Fortran .mod files in non-default . --without-lapack disable detection of lapack/blas libs, use internal. --with-lapack force detect common lapack libs, fail if none found. --with-blas= use a certain to provide blas functions. --with-lapack= use a certain to provide lapack functions. --with-matlab detect matlab+mex command, enables build for matlab. --with-matlab= use a matlab installed in . --enable-tests enable compilation of tests, use 'make check' to check. --enable-cwrapper enable compilation of C wrapper (for IDL). TODO: These options have no effect at this time: --enable-examples-f90, --enable-examples-matlab, --enable-examples-python --enable-modulefiles, --with-modulefilesdir= Example WPCD style installation ------------------------------- To install INTERPOS library conform the WPCD layout, using the ifort compiler, as example: Obtain source and setup autotools for a precise tagged version $ git clone ssh://git@git.iter.org/lib/interpos.git $ cd interpos $ git checkout 8.5.3 # tag must exist $ module load Autotools $ ./bootstrap The above is equivalent with untarring INTERPOS-8.5.3.tar.gz Setup environment for intel's ifort and MKL $ module load intel/2018a $ # module load ifort/2018.1.163-GCC-6.4.0-2.28 # redundant, loaded by above $ # module load imkl/2018.1.163-iimpi-2018a # redundant, loaded by above Configure, be sure to modify this paths to some desired ROOT_LIB_PATH: $ ./configure FC=ifort \ --prefix=$PWD/ROOT_LIB_PATH/INTERPOS/8.5.3-intel-2018a \ --with-lapack Compile and install $ make # make -j works too $ make check # run test suite (optional) $ make install Test installation $ find ROOT_LIB_PATH -xtype f # inspect layout $ pkg-config --cflags --libs interpos # inspect existing config compile and link options $ export PKG_CONFIG_PATH=ROOT_LIB_PATH/lib/pkgconfig:$PKG_CONFIG_PATH $(for cshell) setenv PKG_CONFIG_PATH 'ROOT_LIB_PATH/lib/pkgconfig:'$PKG_CONFIG_PATH $ pkg-config --cflags --libs interpos # inspect new compile and link options (new path in front) Create modulefile for this installation... In case bootstrap or configure or make;make instal does not succeed, you can compile manually using: cd src/f90 more ../../attic/interpos_libs/Makefile # to find the target you want, for gfortran as above: interposgfortran make -f ../../attic/interpos_libs/Makefile interposgfortran # creates include files and libraries in sub-folder gfortran_libs # On lac8.epfl.ch since matlab is a script with the license link and mex uses $MATLAB as a folder, need to do (e.g. v2015): # (20190315) bootstrap export MATLAB=/usr/local/bin/matlab850 export MEX=/usr/local/MATLAB/R2015a/bin/mex # (20200930) export MATLAB=/usr/local/bin/matlab960 export MEX=/usr/local/MATLAB/R2019a/bin/mex mkdir /tmp/sauter/interpos_test # passes the version test thanks to $MATLAB ./configure --with-matlab --prefix=/tmp/sauter/interpos_test --without-lapack # to be able to run mex properly within make unset MATLAB make make check # all check passed (does not with lapack) make install # On ITER hpc-login02.iter.org, tested (both with and without lapack, all tests passed): # (20190316) module load MATLAB module load IMAS bootstrap mkdir /tmp/sautero/interpos_test ./configure --with-matlab --prefix=/tmp/sautero/interpos_test [--without-lapack] make make check # all check passed make install # On gateway, test fine but needs to deal with different set-up of $MATLAB and different default mex command # (20190316) bootstrap set MATLAB_env_prev=`echo $MATLAB` # $MATLAB points to folder /gw/swvend/matlab/r2017a but configure assume $MATLAB is executable as well as mex unsetenv MATLAB # default mex is texlive command setenv MEX /gw/swvend/matlab/r2017a/bin/mex # passes version check thanks to unsetenv MATLAB, tested with and without lapack ./configure --with-matlab --prefix=/tmp/g2osaute/interpos_test [--without-lapack] make make check # all check passed make install # set it back to previous value from echo setenv MATLAB $MATLAB_env_prev # On new toki02.bc.rzg.mpg.de and toks02 can use bootstrap etc # (20190605) module load matlab/2017b (or also 2015b, tested and used that mex file since then ok for 2017b) bootstrap mkdir -p /tmp/osauter/interpos_test ./configure --with-matlab --prefix=/tmp/osauter/interpos_test [--without-lapack] make make check # all check (passed without matlab above) make install (could take mex file from .../matlab/bin) # At General Atomics on Iris PATH=/fusion/projects/codes/chease/autotools/bin:$PATH # then as on ITER, IPP ./bootstrap mkdir /tmp/sautero/interpos_test ./configure --with-matlab --prefix=/tmp/sautero/interpos_test # [--without-lapack] make make check # all check passed make install