Ticket #416 (closed: fixed)

Opened 16 years ago

Last modified 14 years ago

Opening model to Ecospace with large map takes a looooooooooooooooong time

Reported by: carieh Owned by:
Priority: urgent Milestone: Ecopath 6: build 6.0.7
Component: Overall Logistics Version:
Severity: major Keywords:

Description (last modified by jeroens) (diff)

I am not sure if this is my computer, but it keep happening. When you open a model and try to go directly to Ecospace, the program freezes.
-open model
-open Ecospace tab (Be sure not to open any of the Ecosim interfaces)
-when prompted, choose Ecosim scenario (this should load correctly)
-when prompted load the Ecospace scenarion
-my program freezes at this point and I have to close and restart.

When you go through Ecosim (open 1 interface in Ecosim and then try Ecospace)..
It still freezes
Model : antarctic

Change History

comment:1 Changed 16 years ago by carieh

I tried with Ocean test model and this is NOT an issue. It may just be my models or databases that are corrupted. These are the Antarctic models (Jeroen has them too)

comment:2 Changed 16 years ago by jeroens

Version - Unable to duplicate with any Antartic model

comment:3 Changed 16 years ago by carieh

Ha this actually happened a long time ago. I am guessing the reason is my basemap
Please use Ecosim scenarion: 5 year fit
Ecospace: carie
there should be a rather large basemap in that scenario which was imported in version 5

comment:4 Changed 16 years ago by jeroens

Confirmed! I'm on it

comment:5 Changed 16 years ago by jeroens

Joe, this one is for you and/or Carl and/or Villy.

The Ecospace model loads fine. The problem caused by the dimensions of the Ecospace data, making the call to cEcospace.SetHabGrad? last a loooooooooong time. Here, a habitat gradient of 59 groups is computed over a 100x200 basemap. The loop that is called at most 236000000 times take very, very long to complete.

It would be best if HabGrad? were computed in a different way.

comment:6 Changed 16 years ago by jeroens

Villy, the 4-deep nested loop in the code is the culprit. It should be revised somehow.

comment:7 Changed 16 years ago by villyc

We need this, and it will be slow for a large map, don't think there's any way around it apart from using a smaller map

comment:8 Changed 16 years ago by villyc

Well, we don't actually need this when opening an ecospace scenario, only when running it. It would be possible to set a flag when doing opening the ecospace scenario, and then only do the initialization of sethabgrad once. It is only if the (1) number of row/col, (2) habitats, or (3) land has been changed in any way, that we need to run the sethabgrad. So, it would be possible to find a smart way of handling this, where sethabgrad is only called if needed.

comment:9 Changed 14 years ago by jeroens

  • Status changed from assigned to closed
  • Resolution changed from repoened to fixed
  • Description modified (diff)

JS 30oct09: Removed PrefHab? initialization from Ecopath scenario load logic. It does not seem to affect any inputs or outputs, and is in sync w version 5.

Note: See TracTickets for help on using tickets.