source: configs/testing/bash/build.sh @ 1057

Last change on this file since 1057 was 1044, checked in by dubos, 4 years ago

testing : complete DCMIP41 test case for JEANZAY_PGI_ACC

  • Property svn:executable set to *
File size: 1.6 KB
RevLine 
[501]1#!/bin/bash
2
[1044]3function build_dynamico_()
[501]4{
5    NAME=$1 ; shift
[1044]6    LOGFILE=$1 ; shift
7    echo "# command used to build DYNAMICO ($NAME) :" >> logs/build.sh
8    echo "./make_icosa $*" >> logs/build.sh
9
[547]10    cd $ROOT/build_$NAME
[501]11    echo "In $PWD : building DYNAMICO with options $*"
12    echo "Watch logfile $LOGFILE"
[1044]13
14    ./make_icosa $* > $LOGFILE 2>&1
15}
16 
17function build_dynamico()
18{
19    NAME=$1 ; shift
20    LOGFILE=$ROOT/logs/dynamico_${NAME}.log
21    BUILD=$ROOT/build_$NAME
22    build_dynamico_ $NAME $LOGFILE -arch $arch -job $job $* || ( tail $LOGFILE ; exit 1 )
[501]23    cp -pr $BUILD/bin/icosa_gcm.exe  $ROOT/bin/icosa_$NAME.exe
24}
25
[1044]26function build_xios()
27{
28    LOGFILE=$1 ; shift
29    echo '# command used to build XIOS :' >> logs/build.sh
30    echo "./make_xios $*" >> logs/build.sh
31   
[727]32    cd -P $ROOT/XIOS
[501]33    echo "In $PWD : Building XIOS"
34    echo "Watch logfile $LOGFILE"
[1044]35    echo "./make_xios $*"
36    ./make_xios $* > $LOGFILE 2>&1
37}
38
39function main()
40{
41    rm -f tmp/build.sh
42    LOGFILE=$ROOT/logs/build_xios.log
43    build_xios $LOGFILE --arch $arch_XIOS $other_XIOS --job $job || ( tail $LOGFILE ; exit 1 )
44
[501]45    cd $ROOT
46    # compile all variants in parallel
[547]47#    build_dynamico serial -parallel none $FULL &
48    build_dynamico mpi -parallel mpi -with_xios $other $FULL &
49    build_dynamico mpi_omp -parallel mpi_omp -with_xios $other $FULL &
[501]50    wait
51    # check success
[547]52#    ls bin/icosa_serial.exe || exit 1
[501]53    ls bin/icosa_mpi.exe || exit 1
54    ls bin/icosa_mpi_omp.exe || exit 1
55}
56
[506]57FULL=$1
[501]58source current_args
59rm -rf bin logs
60mkdir bin logs
[506]61( main ) || ( echo ; echo "***************** Build FAILED ******************" )
[501]62
[506]63echo
[501]64echo "You may now run create_runs.sh"
Note: See TracBrowser for help on using the repository browser.