# 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 build # cp -pr build/lib.linux-x86_64-2.7/net* ~/.conda/envs/dynamico/lib/python2.7/site-packages/ # NOTE : libirc.so is the intel runtime library and is needed at runtime. # FIXME : python setup.py install does not seem to install anything, hence 'cp -pr ...'. There must be a better way. # 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 -liomp5" export NETCDF_LDFLAGS="$(nf-config --flibs) -lhdf5 -lz -ldl -lm" # 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.env