/[escript]/trunk/doc/SConscript
ViewVC logotype

Annotation of /trunk/doc/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2776 - (hide annotations)
Wed Nov 25 23:41:16 2009 UTC (9 years, 10 months ago) by jfenwick
File size: 5444 byte(s)
Switching tests which read gmsh to not run under MPI

1 ksteube 1811
2     ########################################################
3 cochrane 369 #
4 jfenwick 2548 # Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 elspeth 643 #
8 ksteube 1811 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1705 #
12 ksteube 1811 ########################################################
13 cochrane 369
14 ksteube 1811
15 gross 707 import os
16     Import('*')
17 jfenwick 2648
18 jfenwick 2697 #_deps is for files which end in .py and are required for
19     # testing but should not be invoked directly themselves
20     example_deps = ['cookbook/heatrefraction_mesher001.py',
21 jfenwick 2667 'cookbook/heatrefraction_mesher002.py',
22     'cookbook/heatrefraction001.py',
23 jfenwick 2697 'cookbook/heatrefraction002.py',
24     'cookbook/cblib1.py',
25     'cookbook/cblib2.py'
26 jfenwick 2667 ]
27 jfenwick 2648
28 gross 2502 #
29     # these are the release examples in example sub directory:
30     #
31     example_files_allow_mpi = [
32     'geotutorial/steadystate_variablek.py',
33     'geotutorial/steadystate.py',
34     'geotutorial/forward_euler.py',
35     'geotutorial/myfirstscript.py',
36     'geotutorial/backward_euler.py',
37     'usersguide/lit_driven_cavity.py',
38     'usersguide/mount.py',
39     'usersguide/heatedblock.py',
40     'usersguide/helmholtz.py',
41     'usersguide/fluid.py',
42     'usersguide/poisson.py',
43     'usersguide/diffusion.py',
44 gross 2655 'usersguide/poisson_vtk.py',
45 jfenwick 2677 'usersguide/slip.py',
46 gross 2683 'usersguide/int_save.py',
47 gross 2502 ]
48 cochrane 369
49 gross 2574 example_files_no_mpi = [
50     ]
51 gross 2502
52 jfenwick 2667 haveGMSH=(os.system("gmsh -version")/256==0) #Do we have gmsh installed?
53     haveMPL=False #Do we have matplotlib?
54     haveGD=False #Does the matplotlib have griddata?
55 jfenwick 2674
56     mplmagicversion='0.98.5'
57    
58 jfenwick 2578 try:
59 jfenwick 2667 import matplotlib
60     haveMPL=True
61 jfenwick 2674 mplversion=matplotlib.__version__
62 jfenwick 2648 from matplotlib.mlab import griddata
63 jfenwick 2667 haveGD=True
64 jfenwick 2578 except ImportError:
65 jfenwick 2667 pass
66 jfenwick 2578
67 jfenwick 2667 if not haveMPL:
68     print "matplotlib not found skipping some tests"
69     else:
70 jfenwick 2674 if mplversion<mplmagicversion:
71     print "matplotlib found but version too early. Some tests skipped."
72 jfenwick 2667
73     if not haveGMSH:
74     print "gmsh not found"
75    
76     example_files_no_mpi.append('cookbook/onedheatdiff.py')
77     example_files_no_mpi.append('cookbook/onedheatdiff_var001.py')
78 jfenwick 2697 #example_files_no_mpi.append('cookbook/sandbox.py')
79 jfenwick 2667 example_files_no_mpi.append('cookbook/twodheatdiff.py')
80     example_files_no_mpi.append('cookbook/wavesolver2d001.py')
81     example_files_no_mpi.append('cookbook/wavesolver2d002.py')
82    
83    
84     if haveMPL:
85     example_files_no_mpi.append('cookbook/onedheatdiff001.py')
86     example_files_no_mpi.append('cookbook/onedheatdiff002.py')
87 jfenwick 2674 if mplversion>=mplmagicversion:
88 jfenwick 2667 example_files_no_mpi.append('cookbook/twodheatdiff001.py')
89     example_files_no_mpi.append('usersguide/poisson_matplotlib.py')
90     example_files_allow_mpi.append('usersguide/wave.py')
91     if haveGMSH:
92     example_files_no_mpi.append('cookbook/run_heatrefraction.py')
93 gross 2683 if haveGMSH:
94 jfenwick 2776 example_files_no_mpi.append('usersguide/trapezoid.py')
95     example_files_no_mpi.append('usersguide/quad.py')
96     example_files_no_mpi.append('usersguide/brick.py')
97     example_files_no_mpi.append('usersguide/refine.py')
98 jfenwick 2667
99 gross 2683
100 jfenwick 2667 # we want to make sure these are still added to the examples bundle even if we can't run them
101     if not haveGMSH:
102     example_deps.append('cookbook/run_heatrefraction.py')
103 gross 2683 example_deps.append('usersguide/trapezoid.py')
104     example_deps.append('usersguide/quad.py')
105     example_deps.append('usersguide/brick.py')
106     example_deps.append('usersguide/refine.py')
107 jfenwick 2667 if not haveGD:
108     example_deps.append('cookbook/twodheatdiff001.py')
109     example_deps.append('usersguide/poisson_matplotlib.py')
110     example_deps.append('usersguide/wave.py')
111     if not haveMPL:
112     example_deps.append('cookbook/onedheatdiff001.py')
113     example_deps.append('cookbook/onedheatdiff002.py')
114    
115    
116 jfenwick 2648 example_files= example_files_allow_mpi + example_files_no_mpi + example_deps
117 gross 2502
118 jfenwick 2503
119     ex2=[ os.path.join("examples",str(x)) for x in example_files]
120    
121 gross 2502 #==========================================================================================
122    
123 ksteube 1705 local_env = clone_env(env)
124 jfenwick 2402 src_dir = local_env.Dir('.').srcnode().abspath
125 gross 2502 release_dir=local_env.Dir('#/release/doc/').srcnode().abspath
126 ksteube 1215
127 jfenwick 2402 tmp1 = env.Command("#/release/doc/escript_examples.zip", None,
128 jfenwick 2503 "zip "+os.path.join(release_dir,"escript_examples.zip ") +" ".join(ex2),chdir=src_dir)
129 ksteube 2091 env.Alias('examples_zipfile', tmp1)
130 ksteube 1215
131 ksteube 1705
132 jfenwick 2405 #Need to use explicit tar rather than the tar builder due to problems getting it not to put
133     #unwanted path components in the tar file
134     #--transform on tar is not supported on savanna
135 jfenwick 2503 tmp2 = env.Command("#/release/doc/escript_examples.tar.gz", None, "tar -czf "+os.path.join(release_dir,"escript_examples.tar.gz ")+" ".join(ex2), chdir=src_dir)
136 jfenwick 2405 env.Alias('examples_tarfile',tmp2)
137    
138     #env=Environment(TARFLAGS = "-c -z",chdir=src_dir)
139     #if 'Tar' in dir(env): env.Tar('#/release/doc/escript_examples.tar.gz', example_files,chdir=src_dir)
140     #env.Alias('examples_tarfile', '#release/doc/escript_examples.tar.gz')
141    
142 jfenwick 2667 local_env.SConscript(dirs = ['#/doc/cookbook'], build_dir='#/build/$PLATFORM/doc/cookbook', duplicate=1)
143 gross 707 local_env.SConscript(dirs = ['#/doc/user'], build_dir='#/build/$PLATFORM/doc/user', duplicate=1)
144 elspeth 712 local_env.SConscript(dirs = ['#/doc/epydoc'], build_dir='#/build/$PLATFORM/doc/epydoc', duplicate=1)
145 ksteube 1215 local_env.SConscript(dirs = ['#/doc/doxygen'], build_dir='#/build/$PLATFORM/doc/doxygen', duplicate=1)
146 jfenwick 2287 local_env.SConscript(dirs = ['#/doc/install'], build_dir='#/build/$PLATFORM/doc/install', duplicate=1)
147 jfenwick 2648 local_env.SConscript(dirs = ['#/doc/examples'], build_dir='#/build/$PLATFORM/doc/examples', duplicate=1, exports=[ 'example_files_allow_mpi' , 'example_files_no_mpi', 'example_deps' ])
148 ksteube 1705
149 jfenwick 2402

  ViewVC Help
Powered by ViewVC 1.1.26