Last change
on this file since 1057 was
960,
checked in by dubos, 5 years ago
|
devel/unstructured : fixed generation of local mesh information + restored background wind in DCMIP31
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | function log() |
---|
4 | { |
---|
5 | echo $* |
---|
6 | $* |
---|
7 | } |
---|
8 | |
---|
9 | #----------- Extract DySL from Fortran, invoked by : './make_DySL extract' ------------ |
---|
10 | |
---|
11 | function cmd_extract() |
---|
12 | { |
---|
13 | XT=$KERNELS/kernels_extracted.jin |
---|
14 | rm -f $XT |
---|
15 | touch $XT |
---|
16 | cd $DYNAMICO_ROOT/src |
---|
17 | for F90 in */*.F90 ; do |
---|
18 | sed -n '/BEGIN_DYSL/,/END_DYSL/{//b;p}' $F90 >> $XT |
---|
19 | done |
---|
20 | cd $DYNAMICO_ROOT |
---|
21 | } |
---|
22 | |
---|
23 | #--------------- Generate kernels, invoked by : './make_DySL' --------------- |
---|
24 | |
---|
25 | function update() |
---|
26 | { |
---|
27 | diff $2 $1 || log cp -pr $1 $2 |
---|
28 | } |
---|
29 | |
---|
30 | function update_kernels() |
---|
31 | { |
---|
32 | cd $KERNELS/$1 |
---|
33 | for x in *.k90 ; do |
---|
34 | update "$x" "$DYNAMICO_ROOT/src/$2/$x" |
---|
35 | done |
---|
36 | } |
---|
37 | |
---|
38 | function cmd_() |
---|
39 | { |
---|
40 | cmd_extract |
---|
41 | cd $KERNELS |
---|
42 | ./codegen hexagonal hex_master unstructured |
---|
43 | update_kernels hexagonal kernels_hex |
---|
44 | update_kernels hex_master kernels_hex_master |
---|
45 | update_kernels unstructured kernels_unst |
---|
46 | # make sure that ./rebuild recompiles dynamics |
---|
47 | cd $DYNAMICO_ROOT |
---|
48 | # touch src/dynamics/*.F90 src/diagnostics/*.F90 src/transport/*.F90 src/unstructured/*.F90 |
---|
49 | } |
---|
50 | |
---|
51 | #------------------------- script starts here ------------------------ |
---|
52 | |
---|
53 | DYNAMICO_ROOT=$PWD |
---|
54 | KERNELS=$DYNAMICO_ROOT/DySL |
---|
55 | |
---|
56 | . arch.env |
---|
57 | . arch.path |
---|
58 | echo "Selected architecture : $CURRENT_ARCH" |
---|
59 | if [[ "$CURRENT_ARCH" == "" ]] ; then echo "Current architecture undefined or unsupported" ; exit ; fi |
---|
60 | |
---|
61 | cd arch |
---|
62 | . "arch-${CURRENT_ARCH}.dev" |
---|
63 | cd .. |
---|
64 | time cmd_$1 |
---|
Note: See
TracBrowser
for help on using the repository browser.