source: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_occigen.bash @ 2935

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