# arch.env and arch.path should be sourced before sourcing this script module load python/2.7-anaconda # If not done yet, certain python packages must be installed in a dynamico-only conda environment of yours : # conda create -n dynamico python # source activate dynamico # pip install scipy mpi4py jinja2 matplotlib cython cmake # netCDF4 must be installed manually in order to use the netCDF library from the modules (requires Cython, see above) # for unpack Python/extern/netCDF4-1.2.9.tar.gz then # LDFLAGS='-lirc' python setup.py install # NOTE : libirc.so is the intel runtime library and is needed at runtime. # NOTE : setup.py installs a *.egg file which contains the netCDF4 and netcdftime module. Deactivate then activate again your conda environment if you want to test that they are working. # CICLAD does not have a parmetis module # compiling parmetis uses cmake, installed above using pip because the system-wide cmake might not work with the modules # for this unpack Python/extern/parmetis-4.0.3.tar.gz then # make config shared=1 prefix=$HOME/.conda/envs/dynamico # make install # manually install libmetis.so and metis.h ... # cp $(find . -name 'libmetis.so') $HOME/.conda/envs/dynamico/lib/ # cp $(find . -name 'metis.h') $HOME/.conda/envs/dynamico/include/ # NOTE : the tar.gz is derived from http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz # with modifications along the lines of # https://stackoverflow.com/questions/35058709/building-shared-parmetis-4-0-3 source activate dynamico PARMETIS_CFLAGS="-I$HOME/.conda/envs/dynamico/include" PARMETIS_LDFLAGS="-L$HOME/.conda/envs/dynamico/lib -lparmetis" export NETCDF_LDFLAGS="$(nf-config --flibs)" KERNELS_LDFLAGS="$NETCDF_LIBDIR $NETCDF_LIB -liomp5 $MKL_LIBDIR $MKL_LIB $PARMETIS_LDFLAGS" # check that packages work for x in netCDF4 mpi4py numpy jinja2 ; do python -c "import $x" ; done python -c "import ctypes ; parmetis=ctypes.cdll.LoadLibrary('libparmetis.so')" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.conda/envs/dynamico/lib . linux.dev