Last change
on this file since 3026 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.6 KB
|
Rev | Line | |
---|
[2165] | 1 | #!/bin/bash |
---|
[2412] | 2 | # script to download and install the latest version of IOIPSL on Jean Zay |
---|
[2165] | 3 | # |
---|
| 4 | |
---|
| 5 | #0. Preliminary stuff |
---|
| 6 | module load subversion |
---|
| 7 | |
---|
[2412] | 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 |
---|
[2253] | 25 | |
---|
[2412] | 26 | # cleanup possible previous attempt: |
---|
| 27 | \rm -rf ../../IOIPSL modipsl |
---|
[2165] | 28 | |
---|
[2412] | 29 | # 1. Get IOIPSL |
---|
| 30 | # move up at same level as LMDZ.COMMON , etc. |
---|
| 31 | cd ../.. |
---|
[2657] | 32 | svn co --username icmc_users --password icmc2022 --non-interactive --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL |
---|
[2165] | 33 | |
---|
[2412] | 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 |
---|
[2165] | 39 | |
---|
| 40 | ## 3. build ioipsl: |
---|
[2412] | 41 | ./makeioipsl_fcm -arch X64_JEANZAY -job 8 > makeioipsl.out 2>&1 |
---|
[2165] | 42 | |
---|
[2412] | 43 | ## 4. Check if the library was indeed built: |
---|
| 44 | whereami=`pwd -P` |
---|
| 45 | if [[ -f lib/libioipsl.a ]] |
---|
[2165] | 46 | then |
---|
[2412] | 47 | echo "OK: ioipsl library is in ${whereami}/lib" |
---|
[2165] | 48 | else |
---|
[2412] | 49 | echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" |
---|
| 50 | exit |
---|
[2165] | 51 | fi |
---|
[2412] | 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.