source: trunk/anuga_core/compile_all.py @ 8760

Last change on this file since 8760 was 8760, checked in by steve, 12 years ago

Separated compiling and testing of the sequential and parallel code.

File size: 1.8 KB
Line 
1import os
2import time
3import sys
4import subprocess
5
6buildroot = os.getcwd()
7
8os.chdir('source')
9os.chdir('anuga')
10
11
12print 'Changing to', os.getcwd()       
13
14#entries = listdir('.')
15
16t0 = time.time()
17
18# Attempt to compile all ANUGA extensions
19
20os.chdir('utilities')
21subprocess.call([sys.executable, 'compile.py', 'quad_tree.c'])
22subprocess.call([sys.executable, 'compile.py', 'sparse_dok.c'])
23subprocess.call([sys.executable, 'compile.py', 'sparse_csr.c'])
24execfile('compile.py')
25
26os.chdir('..')
27os.chdir('advection')
28execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
29
30os.chdir('..')
31os.chdir('operators')
32execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
33
34os.chdir('..')
35os.chdir('file_conversion')
36execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
37
38os.chdir('..')
39os.chdir('geometry')
40execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
41
42os.chdir('..')
43os.chdir('structures')
44execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
45
46os.chdir('..')
47os.chdir('abstract_2d_finite_volumes')
48execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
49
50os.chdir('..')
51os.chdir('file')
52execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
53
54os.chdir('..')
55os.chdir('shallow_water')
56execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
57
58
59os.chdir('..')
60os.chdir('mesh_engine')
61execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
62
63os.chdir('..')
64os.chdir('fit_interpolate')
65subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'rand48.c'])
66subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'ptinpoly.c'])
67execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
68
69
70os.chdir(buildroot)   
71
72
73
74print       
75print 'That took %.3fs' %(time.time() - t0)
76
77
78
79if sys.platform == 'win32':
80    raw_input('Press the RETURN key')
Note: See TracBrowser for help on using the repository browser.