1 | /* |
---|
2 | Upper level check.i file for the Yeti plugin. |
---|
3 | |
---|
4 | Make sure the companion yeti_*_test.i files are in your Yorick path. |
---|
5 | |
---|
6 | run "yorick -i check.i", you should get a self-explanatory output. |
---|
7 | */ |
---|
8 | |
---|
9 | // Set paths to find local yeti version |
---|
10 | if (dir=find_in_path("yeti.i", path="./:yeti/:../yeti/", takefirst=1)) { |
---|
11 | dir=dirname(dir); |
---|
12 | plug_dir,_(dir, plug_dir()); |
---|
13 | set_path,dir+":"+get_path(); |
---|
14 | } |
---|
15 | |
---|
16 | write,"-> Trying to load Yeti plugin..."; |
---|
17 | #include "yeti.i" |
---|
18 | |
---|
19 | write,"-> Checking availability of basic Yeti functions..."; |
---|
20 | #include "yeti_test.i" |
---|
21 | write,"-> Basic Yeti functions present"; |
---|
22 | |
---|
23 | write,"-> Checking Yeti hash tables functions..."; |
---|
24 | #include "yeti_hash_test.i" |
---|
25 | write,"-> Yeti hash tables functions OK"; |
---|
26 | |
---|
27 | write,"-> Checking Yeti hierarchical data format (YHD) functions..."; |
---|
28 | #include "yeti_yhdf.i" |
---|
29 | #include "yeti_yhdf_test.i" |
---|
30 | yhd_test,"yeti_yhdf_test.tmp"; |
---|
31 | write,"-> YHD functions: no error, you may want to check detailed output"; |
---|
32 | |
---|
33 | write,"-> Checking Yeti sparse matrix operation functions..."; |
---|
34 | #include "yeti_sparse_test.i" |
---|
35 | write,"-> Sparse matrix operations: no error, you may want to check detailed output"; |
---|
36 | |
---|
37 | write,"-> Looking for Yeti-FFTW test suite..."; |
---|
38 | if (dir=find_in_path("yeti_fftw_test.i", path="./:yeti_fftw/:../yeti_fftw/:"+get_path(), takefirst=1)) { |
---|
39 | dir=dirname(dir); |
---|
40 | plug_dir,_(dir, plug_dir()); |
---|
41 | set_path,dir+":"+get_path(); |
---|
42 | include, "yeti_fftw.i", 1; |
---|
43 | include, "yeti_fftw_test.i", 1; |
---|
44 | write,"-> Yeti-FFTW loaded successfully, running now..."; |
---|
45 | fftw_time,[2,256,256], repeat=10; |
---|
46 | fftw_compare,[2,256,256]; |
---|
47 | write,"-> Yeti-FFTW tests successful."; |
---|
48 | } else write, "-> Yeti-FFTW test suite not found."; |
---|
49 | |
---|
50 | |
---|
51 | write,"____________________________________________________________________________"; |
---|
52 | write,""; |
---|
53 | write,"All tests passed without triggering errors."; |
---|
54 | write,""; |
---|
55 | write,"You may want to check detailed output:"; |
---|
56 | write,"Ouput values in sparse matrix operations should be 0 or very small,"; |
---|
57 | write,"A few \"*** value(s) differ for member ...\" messages are OK when checking"; |
---|
58 | write,"YHD functions with various foreign encodings (they indicate over/underflows"; |
---|
59 | write,"in encodings with types shorter than native)."; |
---|
60 | write,"____________________________________________________________________________"; |
---|
61 | write,""; |
---|
62 | quit; |
---|