source: configs/testing/build.sh @ 502

Last change on this file since 502 was 502, checked in by dubos, 7 years ago

configs/testing : towards first working version

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
3function build_dynamico()
4{
5    NAME=$1 ; shift
6    BUILD=$ROOT/DYNAMICO_$NAME
7    LOGFILE=$ROOT/logs/dynamico_${NAME}.log
8    cd $ROOT/DYNAMICO_$NAME
9    echo "In $PWD : building DYNAMICO with options $*"
10    echo "Watch logfile $LOGFILE"
11#    ./make_icosa -full -arch $arch -job $job $* > $LOGFILE 2>&1 || ( tail $LOGFILE ; exit 1 )
12    ./make_icosa -arch $arch -job $job $* > $LOGFILE 2>&1 || ( tail $LOGFILE ; exit 1 )
13    cp -pr $BUILD/bin/icosa_gcm.exe  $ROOT/bin/icosa_$NAME.exe
14}
15
16function main()
17{ 
18    LOGFILE=$ROOT/logs/build_xios.log
19    cd $ROOT/XIOS
20    echo "In $PWD : Building XIOS"
21    echo "Watch logfile $LOGFILE"
22    ./make_xios --arch $arch --job $job > $LOGFILE 2>&1 || ( tail $LOGFILE ; exit 1 )   
23    cd $ROOT
24    # compile all variants in parallel
25    build_dynamico serial -parallel none &
26    build_dynamico mpi -parallel mpi -with_xios &
27    build_dynamico mpi_omp -parallel mpi_omp -with_xios &
28    wait
29    # check success
30    ls bin/icosa_serial.exe || exit 1
31    ls bin/icosa_mpi.exe || exit 1
32    ls bin/icosa_mpi_omp.exe || exit 1
33}
34
35source current_args
36rm -rf bin logs
37mkdir bin logs
38( main ) || ( echo ; echo "***************** Build FAILED ******************" ; exit 1)
39
40echo "***************** Build : SUCCESS ******************"
41echo "You may now run create_runs.sh"
Note: See TracBrowser for help on using the repository browser.