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