source: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_MESOIPSL-gnu.bash @ 3555

Last change on this file since 3555 was 3551, checked in by afalco, 11 days ago

arch files for MESOIPSL-gnu.
AF

  • 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 Spirit
3#
4
5arch=MESOIPSL-gnu
6
7#0. Preliminary stuff
8
9if (( $# == 0 ))
10then
11  # default behavior: get latest version of IOIPSL
12  rev="HEAD"
13else
14  # but otherwise the first argument of the script can be the version to use
15  if (( $# == 1 ))
16  then
17    rev=$1
18  else
19    echo "Error, invalid script arguments"
20    echo "Usage:"
21    echo "$0 rev"
22    echo " where optional rev is the IOIPSL revision number"
23    exit
24  fi
25fi
26
27# cleanup possible previous attempt:
28\rm -rf ../../IOIPSL modipsl
29
30# 1. Get IOIPSL
31# move up at same level as LMDZ.COMMON , etc.
32cd ../..
33svn co --username icmc_users --password icmc2022 --non-interactive --revision $rev http://forge.ipsl.fr/igcmg/svn/IOIPSL/trunk IOIPSL
34
35# 2. Set correct settings: copy over arch.* files
36cd IOIPSL
37cp -f ../LMDZ.COMMON/arch/arch-${arch}.env arch
38cp -f ../LMDZ.COMMON/arch/arch-${arch}.path arch
39cp -f ../LMDZ.COMMON/arch/arch-${arch}.fcm arch
40
41## 3. build ioipsl:
42./makeioipsl_fcm -arch ${arch} -job 8 > makeioipsl.out 2>&1
43
44## 4. Check if the library was indeed built:
45whereami=`pwd -P`
46if [[ -f lib/libioipsl.a ]]
47  then
48  echo "OK: ioipsl library is in ${whereami}/lib"
49else
50  echo "Something went wrong... check messages in ${whereami}/makeioipsl.out"
51  exit
52fi
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.