File: test

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (51 lines) | stat: -rwxr-xr-x 1,069 bytes parent folder | download | duplicates (6)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
error(){
 echo "$1"
 exit $2
}

cd $(dirname $0) || 
   error "Cannot find myself! Run the script as ./test" 4

LD1=$(cd ../../../bin/; echo `pwd`/ld1.x)
test -x $LD1 ||
   error "Cannot find ld1.x, or not executable." 126
 
#### run oxygen test ####

cd oxygen
mkdir -p tmp
echo "Running oxygen test..."
echo " * generating"
$LD1 < gen.in > gen.out ||
   error "ld1 failed! Aborting" 7
echo " * testing"
$LD1 < test.in > test.out ||
   error "ld1 failed! Aborting" 8
echo " * testing with spin"
$LD1 < spin.in > spin.out ||
   error "ld1 failed! Aborting" 9
echo "done"

cd ..

#### generate pseudopotentials ####
echo 
echo "Generating PAW datasets library"

mkdir -p results || 
   error "Cannot create directory \"results\": check permissions" 126

LIST=$(cd input;ls *.in)

cd results

for input in $LIST; do
  echo -n " * ${input/.in/}: ($(date +%T))..."
  mkdir -p ${input/.in/}
  $LD1 < ../input/$input > ${input/.in/.out} ||
    error "ld1 failed! Aborting..." 3
  echo -n " plotting..."
  ../plot_dlog ${input/.in/} >/dev/null
  echo " done"
done