Opened 15 years ago

Closed 15 years ago

#184 closed defect (invalid)

Mesh instance has no attribute 'number_of_triangles_per_node'

Reported by: nick Owned by: duncan
Priority: high Milestone:
Component: Functionality and features Version:
Severity: major Keywords:
Cc:

Description

I'm modelling pt hedland, i have sucessfully run a model with 118000 triangle, see inundation\data\western_australia\pt_hedland_tsunami_scenario_2006\anuga\outputs\20070704_010800_run_basic_3.6_onslow_nbartzis

however now i'm trying to run the "final" triangle resolutions for the model and there is an error.

Traceback (most recent call last):
  File "run_pt_hedland_urs.py", line 259, in ?
    dir_comment=project_urs.dir_comment)
  File "run_pt_hedland_urs.py", line 140, in run_model
    alpha = kwargs['alpha'])
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/abstract_2d_finite_volumes/domain.py", line 334, in set_quantity
    self.quantities[name].set_values(*args, **kwargs)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py", line 419, in set_values
    use_cache = use_cache)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py", line 813, in set_values_from_file
    max_read_lines=max_read_lines)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/fit.py", line 476, in fit_to_mesh
    dependencies=dep)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/caching/caching.py", line 351, in cache
    T = apply(func,args,kwargs)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/fit.py", line 552, in _fit_to_mesh
    verbose=verbose)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/fit.py", line 349, in fit
    self.build_fit_subset(points, z)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/fit.py", line 430, in build_fit_subset
    self._build_matrix_AtA_Atz(point_coordinates, z, verbose)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/fit.py", line 278, in _build_matrix_AtA_Atz
    element_found, sigma0, sigma1, sigma2, k = \
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/search_functions.py", line 35, in search_tree_of_vertices
    candidate_vertices, x)
  File "/d/cit/1/cit/unixhome/nbartzis/anuga/anuga_core/source/anuga/fit_interpolate/search_functions.py", line 68, in _search_triangles_of_vertices
    if mesh.number_of_triangles_per_node[v] == 0:
AttributeError: Mesh instance has no attribute 'number_of_triangles_per_node'

all the files used in this run are in this directory \inundation\data\western_australia\pt_hedland_tsunami_scenario_2006\anuga\outputs\20070704_060636_run_final_3.6_onslow_nbartzis

There is very little difference between these two model, I simply changed the parameter "setup" in project_urs.py from "basic" to "final" which changes res_factor from 4 to 1 increasing the number of triangles in the mesh.

the final screen output is below

Caching: looking for cached files /d/cit/1/cit/unixhome/nbartzis/.python_cache/_fit[-2139543826238746427]_{Result,Args,Admin}.z
Caching: Dependencies are []
+----------------------------------------------------------
| Wed Jul  4 06:20:10 2007. Caching statistics (retrieving)
+----------------------------------------------------------
| Function:     _fit
| Arguments:    (Array: (233097, 2), Array: (465557, 3))
| Keyword Args: {'alpha': 0.1, 'mesh_origin': None, 'verbose': True}
| CPU time:     822.88 seconds
| Loading time: 252.75 seconds
| Time saved:   570.13 seconds
|
| Caching dir:  /d/cit/1/cit/unixhome/nbartzis/.python_cache/
| Result file:  _fit[-2139543826238746427]_Result.z (95238084 bytes, compressed)
| Args file:    _fit[-2139543826238746427]_Args.z (5862211 bytes, compressed)
| Admin file:   _fit[-2139543826238746427]_Admin.z (174 bytes, compressed)
|
| No dependencies
+----------------------------------------------------------

Geospatial data created from file: /d/xrd/gem/5/nhi/inundation/data/western_australia/pt_hedland_tsunami_scenario_2006/anuga/topographies/pt_hedland_combined_elevation.pts
Data will be loaded blockwise on demand
Got 1 variables: ['elevation']
Reading 2217250 points (in ~4434 blocks) from file /d/xrd/gem/5/nhi/inundation/data/western_australia/pt_hedland_tsunami_scenario_2006/anuga/topographies/pt_hedland_combined_elevation.pts.  Each block consists of 500 data points
Reading block 0 (points 0 to 500) out of 4434
Processing Block 0

Change History (2)

comment:1 Changed 15 years ago by ole

  • Owner changed from ole to duncan

comment:2 Changed 15 years ago by nick

  • Resolution set to invalid
  • Status changed from new to closed

This problem was encountered when i ran a similar model without caching

This problem could be linked to a situation where "set_quantity" was caching some results then it crashed and then from that point on running this code was actually retrieving some bad cached data.

Note: See TracTickets for help on using tickets.