source: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_centos-ifort.bash @ 2757

Last change on this file since 2757 was 2657, checked in by emillour, 3 years ago

Update IOIPSL install scripts : add user/passwd to the subversion checkout.
EM

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2# script to download and install the latest version of IOIPSL on LMD CentOS machines
3#
4
5#0. Preliminary stuff
6if (( $# == 0 ))
7then
8  # default behavior: get latest version of IOIPSL
9  rev="HEAD"
10else
11  # but otherwise the first argument of the script can be the version to use
12  if (( $# == 1 ))
13  then
14    rev=$1
15  else
16    echo "Error, invalid script arguments"
17    echo "Usage:"
18    echo "$0 rev"
19    echo " where optional rev is the IOIPSL revision number"
20    exit
21  fi
22fi
23
24# cleanup possible previous attempt:
25\rm -rf ../../IOIPSL modipsl
26
27# 1. Get IOIPSL
28# move up at same level as LMDZ.COMMON , etc.
29cd ../..
30svn co --username icmc_users --password icmc2022 --non-interactive --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL
31
32# 2. Set correct settings: copy over arch.* files
33cd IOIPSL
34cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.env arch
35cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.path arch
36cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.fcm arch
37
38## 3. build ioipsl:
39./makeioipsl_fcm -arch centos-ifort-para -job 8 > makeioipsl.out 2>&1
40
41## 4. Check if the library was indeed built:
42whereami=`pwd -P`
43if [[ -f lib/libioipsl.a ]] 
44  then
45  echo "OK: ioipsl library is in ${whereami}/lib"
46else
47  echo "Something went wrong... check messages in ${whereami}/makeioipsl.out"
48  exit
49fi
50
51## 5. Comply with old setup and make appropriate links
52cd ../LMDZ.COMMON/ioipsl
53mkdir modipsl
54cd modipsl
55# lib + module files
56mkdir lib
57cd lib
58ln -s ../../../../IOIPSL/lib/libioipsl.a .
59ln -s ../../../../IOIPSL/inc/* .
60cd ..
61# rebuild utility
62mkdir bin
63cd bin
64ln -s ../../../../IOIPSL/bin/* .
65
Note: See TracBrowser for help on using the repository browser.