Changeset 8697
- Timestamp:
- Feb 14, 2013, 11:33:06 PM (12 years ago)
- Location:
- trunk/anuga_core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/compile_all.py
r8690 r8697 63 63 os.chdir('..') 64 64 os.chdir('fit_interpolate') 65 subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'rand48.c']) 66 subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'ptinpoly.c']) 65 67 execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py') 66 68 -
trunk/anuga_core/source/anuga/caching/caching.py
r8690 r8697 939 939 940 940 # Setup for quad_tree extension 941 from anuga.utilities import compile942 if compile.can_use_C_extension('quad_tree_ext.c'):943 944 else:945 msg = "C implementation of quad tree extension not avaliable"946 raise Exception(msg)941 #from anuga.utilities import compile 942 #if compile.can_use_C_extension('quad_tree_ext.c'): 943 #import quad_tree_ext 944 #else: 945 # msg = "C implementation of quad tree extension not avaliable" 946 # raise Exception(msg) 947 947 948 948 # Setup for sparse_matrix extension 949 from anuga.utilities import compile 950 if compile.can_use_C_extension('sparse_matrix_ext.c'): 951 import sparse_matrix_ext 952 else: 953 msg = "C implementation of sparse_matrix extension not avaliable" 954 raise Exception(msg) 955 949 #from anuga.utilities import compile 950 #if compile.can_use_C_extension('sparse_matrix_ext.c'): 951 952 #else: 953 # msg = "C implementation of sparse_matrix extension not avaliable" 954 # raise Exception(msg) 955 956 import anuga.utilities.sparse_matrix_ext as sparse_matrix_ext 957 import anuga.utilities.quad_tree_ext as quad_tree_ext 956 958 from anuga.geometry.aabb import AABB 957 959 -
trunk/anuga_core/source/anuga/fit_interpolate/fit.py
r8695 r8697 47 47 48 48 # Setup for c fitting routines 49 from anuga.utilities import compile50 if compile.can_use_C_extension('fitsmooth.c'):51 52 else:53 msg = "C implementation of fitting algorithms (fitsmooth.c) not avalaible"54 raise Exception(msg)49 #from anuga.utilities import compile 50 #if compile.can_use_C_extension('fitsmooth.c'): 51 import fitsmooth 52 #else: 53 # msg = "C implementation of fitting algorithms (fitsmooth.c) not avalaible" 54 # raise Exception(msg) 55 55 56 56 # Setup for quad_tree extension 57 from anuga.utilities import compile58 if compile.can_use_C_extension('quad_tree_ext.c'):59 60 else:61 msg = "C implementation of quad tree extension not avaliable"62 raise Exception(msg)57 #from anuga.utilities import compile 58 #if compile.can_use_C_extension('quad_tree_ext.c'): 59 #from anuga.utilities import quad_tree_ext 60 #else: 61 # msg = "C implementation of quad tree extension not avaliable" 62 # raise Exception(msg) 63 63 64 64 # Setup for sparse_matrix extension 65 from anuga.utilities import compile66 if compile.can_use_C_extension('sparse_matrix_ext.c'):67 68 else:69 msg = "C implementation of sparse_matrix extension not avaliable"70 raise Exception(msg)65 #from anuga.utilities import compile 66 #if compile.can_use_C_extension('sparse_matrix_ext.c'): 67 #from anuga.utilities import sparse_matrix_ext 68 #else: 69 # msg = "C implementation of sparse_matrix extension not avaliable" 70 # raise Exception(msg) 71 71 72 72 -
trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py
r8690 r8697 60 60 extents = AABB(*self.mesh.get_extent(absolute=True)) 61 61 extents.grow(1.001) # To avoid round off error 62 extents = [extents.xmin, extents.xmax, extents.ymin, extents.ymax] 63 self.extents = ensure_numeric(extents, num.float) 62 numextents = [extents.xmin, extents.xmax, extents.ymin, extents.ymax] 63 self.extents = num.array(numextents, num.float) 64 #print self.extents 64 65 65 66 def add_quad_tree(self): 66 67 67 68 V = self.mesh.get_vertex_coordinates(absolute=True) 69 70 self.set_extents() 71 #print self.extents 68 72 self.root = fitsmooth.build_quad_tree(self.mesh.triangles, V, self.extents) 69 73 -
trunk/anuga_core/source/anuga/utilities/compile.py
r8694 r8697 302 302 # Make shared library (*.so or *.dll) 303 303 if FN=="fitsmooth.c": 304 if libs is "": 305 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext) 306 else: 307 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs) 304 if sys.platform == 'win32': 305 if libs is "": 306 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm -fopenmp netcdf.dll' %(loader, sharedflag, object_files, root1, libext) 307 else: 308 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm -fopenmp netcdf.dll' %(loader, sharedflag, object_files, root1, libext, libs) 309 else: 310 if libs is "": 311 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext) 312 else: 313 s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs) 308 314 elif FN=="quad_tree_ext.c": 309 315 if libs is "": 310 s = '%s -%s %s quad_tree.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext) 316 s = '%s -%s %s quad_tree.o -o %s.%s -lm -fopenmp' %(loader, sharedflag, object_files, root1, libext) 317 else: 318 s = '%s -%s %s quad_tree.o -o %s.%s "%s" -lm -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs) 311 319 elif FN=="sparse_matrix_ext.c": 312 320 if libs is "": 313 s = '%s -%s %s sparse_dok.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext) 314 else: 315 s = '%s -%s %s sparse_dok.o -o %s.%s "%s" -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs) 321 s = '%s -%s %s sparse_dok.o -o %s.%s -lm -fopenmp ' %(loader, sharedflag, object_files, root1, libext) 322 else: 323 s = '%s -%s %s sparse_dok.o -o %s.%s "%s" -lm -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs) 324 elif FN=="p_test.c": 325 if libs is "": 326 s = '%s -%s %s ptinpoly.o rand48.o -o %s.%s -lm -fopenmp ' %(loader, sharedflag, object_files, root1, libext) 327 else: 328 s = '%s -%s %s ptinpoly.o rand48.o -o %s.%s "%s" -lm -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs) 316 329 else: 317 330 if libs is "": 318 s = '%s -%s %s -o %s.%s -lm -lblas-fopenmp' %(loader, sharedflag, object_files, root1, libext)319 else: 320 s = '%s -%s %s -o %s.%s "%s" -lm - lblas -fopenmp' %(loader, sharedflag, object_files, root1, libext, libs)331 s = '%s -%s %s -o %s.%s -lm -fopenmp' %(loader, sharedflag, object_files, root1, libext) 332 else: 333 s = '%s -%s %s -o %s.%s "%s" -lm -fopenmp' %(loader, sharedflag, object_files, root1, libext, libs) 321 334 322 335
Note: See TracChangeset
for help on using the changeset viewer.