1 | #!/bin/bash |
---|
2 | # script to download and install the latest version of IOIPSL on Gnome |
---|
3 | # |
---|
4 | |
---|
5 | #0. Preliminary stuff |
---|
6 | source ../arch.env |
---|
7 | |
---|
8 | #### |
---|
9 | #source ../arch.path |
---|
10 | #marche pas car -I deja inclus |
---|
11 | #donc mettre en dur: |
---|
12 | #### |
---|
13 | NETCDF="/opt/netcdf45/ifort15" |
---|
14 | netcdf_include="$NETCDF/include" |
---|
15 | netcdf_lib="$NETCDF/lib" |
---|
16 | echo $netcdf_include |
---|
17 | echo $netcdf_lib |
---|
18 | |
---|
19 | whereami=`pwd -P` |
---|
20 | |
---|
21 | # 1. Get IOIPSL (via modipsl) |
---|
22 | svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl |
---|
23 | cd modipsl/util |
---|
24 | |
---|
25 | ./model IOIPSL_PLUS |
---|
26 | |
---|
27 | # 2. Set correct settings: |
---|
28 | # add a "ciclad" configuration to AA_make.gdef |
---|
29 | echo "#-Q- cicladi #- Global definitions for ciclad at UPMC, ifort" >> AA_make.gdef |
---|
30 | echo "#-Q- cicladi M_K = make" >> AA_make.gdef |
---|
31 | echo "#-Q- cicladi P_C = cpp" >> AA_make.gdef |
---|
32 | echo '#-Q- cicladi P_O = -P -C $(P_P)' >> AA_make.gdef |
---|
33 | echo "#-Q- cicladi F_C = ifort -mcmodel=large -shared-intel -c" >> AA_make.gdef |
---|
34 | echo "#-Q- cicladi #-D- MD F_D = -g" >> AA_make.gdef |
---|
35 | echo "#-Q- cicladi #-D- MN F_D =" >> AA_make.gdef |
---|
36 | echo "#-Q- cicladi #-P- I4R4 F_P = -integer-size 32" >> AA_make.gdef |
---|
37 | echo "#-Q- cicladi #-P- I4R8 F_P = -integer-size 32 -real-size 64" >> AA_make.gdef |
---|
38 | echo "#-Q- cicladi #-P- I8R8 F_P = -integer-size 64 -real-size 64" >> AA_make.gdef |
---|
39 | echo '#-Q- cicladi F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef |
---|
40 | echo "#-Q- cicladi F_L = ifort" >> AA_make.gdef |
---|
41 | echo "#-Q- cicladi M_M = 0" >> AA_make.gdef |
---|
42 | echo "#-Q- cicladi L_X = 0" >> AA_make.gdef |
---|
43 | echo "#-Q- cicladi L_O =" >> AA_make.gdef |
---|
44 | echo "#-Q- cicladi A_C = ar -r" >> AA_make.gdef |
---|
45 | echo "#-Q- cicladi A_G = ar -x" >> AA_make.gdef |
---|
46 | echo "#-Q- cicladi C_C = icc -c" >> AA_make.gdef |
---|
47 | echo "#-Q- cicladi C_O =" >> AA_make.gdef |
---|
48 | echo "#-Q- cicladi C_L = icc" >> AA_make.gdef |
---|
49 | echo "#-Q- cicladi #-" >> AA_make.gdef |
---|
50 | echo "#-Q- cicladi NCDF_INC = ${netcdf_include}" >> AA_make.gdef |
---|
51 | echo "#-Q- cicladi NCDF_LIB = -L${netcdf_lib} -lnetcdff" >> AA_make.gdef |
---|
52 | #echo "#-Q- cicladi NCDF_INC = ${NETCDF_INCDIR}" >> AA_make.gdef |
---|
53 | #echo "#-Q- cicladi NCDF_LIB = -L${NETCDF_LIBDIR} -lnetcdff" >> AA_make.gdef |
---|
54 | echo "#-Q- cicladi #-" >> AA_make.gdef |
---|
55 | |
---|
56 | # set default working precision for IOIPSL: |
---|
57 | ./ins_make -t cicladi -p I4R8 |
---|
58 | |
---|
59 | ## 3. build ioipsl: |
---|
60 | cd ../modeles/IOIPSL/src |
---|
61 | make |
---|
62 | ## Compile the rebuild tool: |
---|
63 | cd ../tools |
---|
64 | make |
---|
65 | |
---|
66 | if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] |
---|
67 | then |
---|
68 | echo "OK: ioipsl library is in ${whereami}/modipsl/lib" |
---|
69 | else |
---|
70 | echo "Something went wrong..." |
---|
71 | fi |
---|