source: codes/icosagcm/devel/Python/env/ifort_CICLAD.env @ 705

Last change on this file since 705 was 705, checked in by dubos, 6 years ago

devel : fixes build for CICLAD

File size: 2.0 KB
Line 
1# arch.env and arch.path should be sourced before sourcing this script
2module load python/2.7-anaconda
3
4# If not done yet, certain python packages must be installed in a dynamico-only conda environment of yours :
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)
10# for unpack Python/extern/netCDF4-1.2.9.tar.gz then
11#   LDFLAGS='-lirc' python setup.py build
12#   cp -pr build/lib.linux-x86_64-2.7/net* ~/.conda/envs/dynamico/lib/python2.7/site-packages/
13# NOTE : libirc.so is the intel runtime library and is needed at runtime.
14# FIXME : python setup.py install does not seem to install anything, hence 'cp -pr ...'. There must be a better way.
15
16# CICLAD does not have a parmetis module
17# compiling parmetis uses cmake, installed above using pip because the system-wide cmake might not work with the modules
18# for this unpack Python/extern/parmetis-4.0.3.tar.gz then
19#   make config shared=1 prefix=$HOME/.conda/envs/dynamico
20#   make install
21# manually install libmetis.so and metis.h ...
22#   cp $(find . -name 'libmetis.so') $HOME/.conda/envs/dynamico/lib/
23#   cp $(find . -name 'metis.h') $HOME/.conda/envs/dynamico/include/
24# NOTE : the tar.gz is derived from http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
25#        with modifications along the lines of
26#        https://stackoverflow.com/questions/35058709/building-shared-parmetis-4-0-3
27
28source activate dynamico
29PARMETIS_CFLAGS="-I$HOME/.conda/envs/dynamico/include"
30PARMETIS_LDFLAGS="-L$HOME/.conda/envs/dynamico/lib -liomp5"
31
32export NETCDF_LDFLAGS="$(nf-config --flibs) -lhdf5 -lz -ldl -lm"
33
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
40. linux.env
Note: See TracBrowser for help on using the repository browser.