|
Last change
on this file since 2629 was
2412,
checked in by emillour, 5 years ago
|
|
All GCMs:
Update scripts to install the IOIPSL. With the latest additions it is no longer necessary to use "modipsl" and a series of "sed" on various scripts. IOIPSL now uses arch.* files and an FCM-based compilation script, like the GCMs.
EM
|
-
Property svn:executable set to
*
|
|
File size:
1.5 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 |
|---|
| 6 | module load subversion |
|---|
| 7 | |
|---|
| 8 | if (( $# == 0 )) |
|---|
| 9 | then |
|---|
| 10 | # default behavior: get latest version of IOIPSL |
|---|
| 11 | rev="HEAD" |
|---|
| 12 | else |
|---|
| 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 |
|---|
| 24 | fi |
|---|
| 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. |
|---|
| 31 | cd ../.. |
|---|
| 32 | svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL |
|---|
| 33 | |
|---|
| 34 | # 2. Set correct settings: copy over arch.* files |
|---|
| 35 | cd IOIPSL |
|---|
| 36 | cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY.env arch |
|---|
| 37 | cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY.path arch |
|---|
| 38 | cp -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: |
|---|
| 44 | whereami=`pwd -P` |
|---|
| 45 | if [[ -f lib/libioipsl.a ]] |
|---|
| 46 | then |
|---|
| 47 | echo "OK: ioipsl library is in ${whereami}/lib" |
|---|
| 48 | else |
|---|
| 49 | echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" |
|---|
| 50 | exit |
|---|
| 51 | fi |
|---|
| 52 | |
|---|
| 53 | ## 5. Comply with old setup and make appropriate links |
|---|
| 54 | cd ../LMDZ.COMMON/ioipsl |
|---|
| 55 | mkdir modipsl |
|---|
| 56 | cd modipsl |
|---|
| 57 | # lib + module files |
|---|
| 58 | mkdir lib |
|---|
| 59 | cd lib |
|---|
| 60 | ln -s ../../../../IOIPSL/lib/libioipsl.a . |
|---|
| 61 | ln -s ../../../../IOIPSL/inc/* . |
|---|
| 62 | cd .. |
|---|
| 63 | # rebuild utility |
|---|
| 64 | mkdir bin |
|---|
| 65 | cd bin |
|---|
| 66 | ln -s ../../../../IOIPSL/bin/* . |
|---|
| 67 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.