source: codes/icosagcm/devel/arch/arch-ifort_CICLAD.dev @ 1027

Last change on this file since 1027 was 941, checked in by dubos, 5 years ago

devel : split DySL from Python

File size: 2.0 KB
RevLine 
[705]1# arch.env and arch.path should be sourced before sourcing this script
[615]2module load python/2.7-anaconda
3
[705]4# If not done yet, certain python packages must be installed in a dynamico-only conda environment of yours :
[615]5#   conda create -n dynamico python
6#   source activate dynamico
7#   pip install scipy mpi4py jinja2 matplotlib cython cmake
8
9# netCDF4 must be installed manually in order to use the netCDF library from the modules (requires Cython, see above)
[705]10# for unpack Python/extern/netCDF4-1.2.9.tar.gz then
[712]11#   LDFLAGS='-lirc' python setup.py install
[705]12# NOTE : libirc.so is the intel runtime library and is needed at runtime.
[712]13# 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.
[615]14
15# CICLAD does not have a parmetis module
16# compiling parmetis uses cmake, installed above using pip because the system-wide cmake might not work with the modules
[705]17# for this unpack Python/extern/parmetis-4.0.3.tar.gz then
[615]18#   make config shared=1 prefix=$HOME/.conda/envs/dynamico
19#   make install
20# manually install libmetis.so and metis.h ...
21#   cp $(find . -name 'libmetis.so') $HOME/.conda/envs/dynamico/lib/
22#   cp $(find . -name 'metis.h') $HOME/.conda/envs/dynamico/include/
[705]23# NOTE : the tar.gz is derived from http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
24#        with modifications along the lines of
25#        https://stackoverflow.com/questions/35058709/building-shared-parmetis-4-0-3
[615]26
27source activate dynamico
28PARMETIS_CFLAGS="-I$HOME/.conda/envs/dynamico/include"
[718]29PARMETIS_LDFLAGS="-L$HOME/.conda/envs/dynamico/lib -lparmetis"
[615]30
[720]31export NETCDF_LDFLAGS="$(nf-config --flibs)"
[615]32
[718]33KERNELS_LDFLAGS="$NETCDF_LIBDIR $NETCDF_LIB -liomp5 $MKL_LIBDIR $MKL_LIB $PARMETIS_LDFLAGS"
[615]34# check that packages work
35for x in netCDF4 mpi4py numpy jinja2 ; do python -c "import $x" ; done
36python -c "import ctypes ; parmetis=ctypes.cdll.LoadLibrary('libparmetis.so')"
37
38export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.conda/envs/dynamico/lib
39
[941]40. linux.dev
Note: See TracBrowser for help on using the repository browser.