Opened 17 years ago

Closed 17 years ago

#245 closed defect (fixed)

Updating of mesh breaks on 64 bit machines

Reported by: anonymous Owned by: duncan
Priority: highest Milestone:
Component: Architecture and API Version:
Severity: critical Keywords:
Cc:

Description

There has been some recent updates to mesh, which has broken anuga on 64 bit machines, using pyrhon 2.4. Probably the usual problem of something which should be an integer being a list containing one integer?

For instance running test_all.py in the damage_modelling directory produces errors of the form:

Testing:

test_inundation_damage.py

EEEEEEEEE ====================================================================== ERROR: test_calc_collapse_probability (test_inundation_damage.Test_inundation_damage)


Traceback (most recent call last):

File "damage_modelling/test_inundation_damage.py", line 62, in setUp

m.auto_segment()

File "/home/steve/ga/anuga_core/source/anuga/pmesh/mesh.py", line 1540, in auto_segment

self._createBoundary(alpha=alpha)

File "/home/steve/ga/anuga_core/source/anuga/pmesh/mesh.py", line 1553, in _createBoundary

alpha=alpha)

File "/home/steve/ga/anuga_core/source/anuga/alpha_shape/alpha_shape.py", line 66, in init

self._alpha_shape_algorithm(alpha)

File "/home/steve/ga/anuga_core/source/anuga/alpha_shape/alpha_shape.py", line 213, in _alpha_shape_algorithm

self._vertex_intervals()

File "/home/steve/ga/anuga_core/source/anuga/alpha_shape/alpha_shape.py", line 364, in _vertex_intervals

vertexnbrs[j].append(t)

TypeError?: list indices must be integers

Change History (2)

comment:1 Changed 17 years ago by steve

By the way, this was reported by steve

comment:2 Changed 17 years ago by Steve

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

Fixed the problem.

We have seen this before, some sort of problem with some of the Numeric commands on 64 bit machines, in which the entries of an integer array are seen as arrays and not as integers. So a way around this is to coerce the entry to an int.

ie from

vertexnbrs[j].append(t)

to

vertexnbrs[int(j)].append(t)

Hopefully this will be fixed once we move onto numpy.

Note: See TracTickets for help on using tickets.