source: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_ADASTRA-gnu.bash @ 3026

Last change on this file since 3026 was 2978, checked in by emillour, 19 months ago

All PCMs:
Add some arch files for ADASTRA (using the GNU compiler suite)
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 ADASTRA with gnu compilers
3#
4
5#0. Preliminary stuff
6
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
24
25# cleanup possible previous attempt:
26\rm -rf ../../IOIPSL modipsl
27
28# 1. Get IOIPSL
29# move up at same level as LMDZ.COMMON , etc.
30cd ../..
31svn co --username icmc_users --password icmc2022 --non-interactive --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL
32
33# 2. Set correct settings: copy over arch.* files
34cd IOIPSL
35cp -f ../LMDZ.COMMON/arch/arch-ADASTRA-gnu.env arch
36cp -f ../LMDZ.COMMON/arch/arch-ADASTRA-gnu.path arch
37cp -f ../LMDZ.COMMON/arch/arch-ADASTRA-gnu.fcm arch
38
39## 3. build ioipsl:
40./makeioipsl_fcm -arch ADASTRA-gnu -job 8 > makeioipsl.out 2>&1
41
42## 4. Check if the library was indeed built:
43whereami=`pwd -P`
44if [[ -f lib/libioipsl.a ]] 
45  then
46  echo "OK: ioipsl library is in ${whereami}/lib"
47else
48  echo "Something went wrong... check messages in ${whereami}/makeioipsl.out"
49  exit
50fi
51
52## 5. Comply with old setup and make appropriate links
53#cd ../LMDZ.COMMON/ioipsl
54#mkdir modipsl
55#cd modipsl
56## lib + module files
57#mkdir lib
58#cd lib
59#ln -s ../../../../IOIPSL/lib/libioipsl.a .
60#ln -s ../../../../IOIPSL/inc/* .
61#cd ..
62## rebuild utility
63#mkdir bin
64#cd bin
65#ln -s ../../../../IOIPSL/bin/* .
66
Note: See TracBrowser for help on using the repository browser.