Opened 17 years ago

Closed 17 years ago

#201 closed defect (fixed)

Memory errors in latest version (1.0beta_4733) - and possible speed problems

Reported by: duncan Owned by: Duncan
Priority: normal Milestone:
Component: Efficiency and optimisation Version:
Severity: normal Keywords:
Cc:

Description

Hi,

I've encountered memory errors when applying ANUGA to large (~1,000,000 triangle) meshes, that I didn't have in previous versions.

I'll attach a typical error message below. Any ideas about how I can prevent this?

Cheers, William

GNS Science, NZ

Traceback (most recent call last):

File "run_subduction_splay_1200yr.py", line 207, in ?

alpha = 0.1)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/abstract_2d_f inite_volumes/quantity.py", line 421, in set_values

use_cache = use_cache)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/abstract_2d_f inite_volumes/quantity.py", line 796, in set_values_from_file

max_read_lines=max_read_lines)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/fit_interpola te/fit.py", line 477, in fit_to_mesh

dependencies=dep)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/caching/cachi ng.py", line 351, in cache

T = apply(func,args,kwargs)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/fit_interpola te/fit.py", line 544, in _fit_to_mesh

verbose=verbose)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/fit_interpola te/fit.py", line 377, in fit

self._build_coefficient_matrix_B(verbose)

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/fit_interpola te/fit.py", line 127, in _build_coefficient_matrix_B

self.B = self.AtA + self.alpha*self.D

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/utilities/spa rse.py", line 162, in add

new = other.copy()

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/utilities/spa rse.py", line 86, in copy

new[i,j] = self.Data[i,j]

File

"/seis/tsunami/ANUGA/exported_anuga/anuga_core/source/anuga/utilities/spa rse.py", line 63, in setitem

self.Data[key] = float(x)

MemoryError?

Change History (2)

comment:1 Changed 17 years ago by ole

  • Summary changed from Memmory errors in latest version (1.0beta_4733) to Memory errors in latest version (1.0beta_4733) - and possible speed problems

I have noticed that the speed appears slower with the fix addressing the memory issue. Around line 853 in set_quantity.py it is possible to choose the new implementation versus the old by changing the boolean value in 'if True:' to 'if False'. In case of the new implementation, fitting data in the onslow example (e.g in ..\western_australia\onslow_tsunami_scenario_2006\anuga\outputs\20071116_013137_run_final_1.5_onielsen_exmouth_revised) didn't get past block 0 after 2 hours, even though from cached versions using the old implementation the whole thing should take only about 4500s. A quick debug of the code revealed that almost all the time is spent in the line self._build_matrix_AtA_Atz inside build_fit_subset.

comment:2 Changed 17 years ago by duncan

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

fixed. General_mesh had a function that was very slow if absolute values were used. changeset:4839 is the main one.

Note: See TracTickets for help on using tickets.