File: createdb.sh

package info (click to toggle)
odb-api 0.18.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,452 kB
  • sloc: cpp: 115,083; ansic: 86,859; f90: 30,318; sql: 12,508; sh: 9,939; yacc: 3,680; python: 2,432; lex: 1,593; perl: 1,116; fortran: 341; csh: 214; makefile: 111; lisp: 17
file content (36 lines) | stat: -rwxr-xr-x 819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/ksh

set -e
source use_odb.sh
set -x

# (0) Go to directory where DB.ddl sits
# This will become (by default) your database directory
rm -fr DB
mkdir -p DB
cd DB

# (1) Compile database DB (once in the lifetime):
cp $2 .
newodb DB

# (2) Run setup to get the IOASSIGN right:
./DB.setup > DB.IOASSIGN

# (3) Make sure to get the database directories right:
export ODB_DATAPATH_DB=`pwd`
export ODB_SRCPATH_DB=`pwd`

# (4) Compile and link Fortran90 application: (NOTE: already done by CMake)
odbf90 $1 -lDB -o createdb.x

# (5) Run the application
$MPIEXEC_CMD ./createdb.x DB

# (6) Validate the result
odbsql -q "select count(*) from hdr" > createdb.out
diff $3 createdb.out

# FIXME: Wait for (at least) one second before running a next test to avoid issues with
# DCA files caching in odbsql script.
sleep 1.1