Last change
on this file since 1041 was
1041,
checked in by dubos, 4 years ago
|
testing : allow different arch for XIOS and DYNAMICO
|
-
Property svn:executable set to
*
|
File size:
1.9 KB
|
Rev | Line | |
---|
[501] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | export ROOT=$PWD |
---|
[503] | 4 | CMD_LINE="$0 $*" |
---|
[501] | 5 | |
---|
| 6 | full_defined="FALSE" |
---|
| 7 | arch_defined="FALSE" |
---|
[740] | 8 | proj_defined="FALSE" |
---|
[501] | 9 | job=1 |
---|
| 10 | |
---|
| 11 | CPP_KEY="CPP_NONE" |
---|
| 12 | ICOSA_LIB="" |
---|
| 13 | |
---|
[547] | 14 | while (($# > 0)) ; do |
---|
[501] | 15 | case $1 in |
---|
| 16 | "-h") cat <<EOF |
---|
| 17 | Usage : |
---|
[547] | 18 | setup [options] |
---|
[501] | 19 | [-h] : help |
---|
| 20 | -arch nom_arch : nom de l\'architecture cible |
---|
[547] | 21 | -job N : parallel compilation |
---|
[740] | 22 | -project X : project name for job submission |
---|
[547] | 23 | -full : full compilation |
---|
| 24 | extra options will be passed to make_icosa |
---|
[501] | 25 | EOF |
---|
| 26 | exit;; |
---|
[1041] | 27 | "--arch") |
---|
| 28 | arch=$2 ; arch_XIOS=$2 ; arch_defined="TRUE"; shift ; shift ;; |
---|
| 29 | "--arch-XIOS") |
---|
| 30 | arch_XIOS=$2 ; shift ; shift ;; |
---|
| 31 | "--job") |
---|
[501] | 32 | job=$2 ; shift ; shift;; |
---|
[1041] | 33 | "--project") |
---|
[740] | 34 | project=$2 ; proj_defined="TRUE"; shift; shift;; |
---|
[1041] | 35 | "--full") |
---|
[501] | 36 | full_defined="TRUE" ; shift ;; |
---|
| 37 | *) |
---|
[547] | 38 | echo "Unknown options < $* > will be passed to make_icosa" |
---|
| 39 | other="$*" |
---|
| 40 | break |
---|
[501] | 41 | esac |
---|
| 42 | done |
---|
| 43 | |
---|
| 44 | if [[ "$arch_defined" == "TRUE" ]] |
---|
| 45 | then |
---|
| 46 | cat <<EOF >current_args |
---|
[503] | 47 | # This file was generated by running : |
---|
| 48 | # $CMD_LINE |
---|
[501] | 49 | ROOT="$ROOT" |
---|
| 50 | arch="$arch" |
---|
[1041] | 51 | arch_XIOS="$arch_XIOS" |
---|
[501] | 52 | job="$job" |
---|
[740] | 53 | project="$project" |
---|
[702] | 54 | other_XIOS="$pther_XIOS" |
---|
[547] | 55 | other="$other" |
---|
[501] | 56 | EOF |
---|
| 57 | |
---|
| 58 | echo "Setup saved in file current_args :" |
---|
| 59 | cat current_args |
---|
| 60 | # create separate build dirs sharing the same src/ and tools/ subdirs to save disk and time |
---|
[547] | 61 | BUILD=$ROOT/build_serial |
---|
[502] | 62 | echo "Creating build directory $BUILD" |
---|
| 63 | rm -rf $BUILD |
---|
| 64 | mkdir -p $BUILD |
---|
| 65 | cd $ROOT/DYNAMICO |
---|
[1036] | 66 | for NAME in arch build compile make_icosa src bld.cfg clean doc tools xml ; do |
---|
[502] | 67 | ln -s $ROOT/DYNAMICO/$NAME $BUILD/ |
---|
| 68 | done |
---|
[501] | 69 | for NAME in mpi mpi_omp ; do |
---|
[556] | 70 | echo "Creating build directory $ROOT/build_$NAME" |
---|
[547] | 71 | rm -rf $ROOT/build_$NAME |
---|
| 72 | cp -pr $BUILD $ROOT/build_$NAME |
---|
[501] | 73 | done |
---|
| 74 | |
---|
[547] | 75 | echo "You may now run bash/build.sh" |
---|
[501] | 76 | else |
---|
[740] | 77 | echo "Please define a target architecture with -arch XXX" |
---|
[501] | 78 | exit 1 |
---|
| 79 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.