source: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_jeanzay.bash @ 3451

Last change on this file since 3451 was 3425, checked in by emillour, 3 months ago

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