LANDIS-II running speed on high performance computers

193 views
Skip to first unread message

Bogdan Chivoiu

unread,
Mar 4, 2010, 4:52:38 PM3/4/10
to LANDIS-II Users
Hello,

I am running LANDIS-II on some large landscapes, up to 1.4 million ha
at 30m resolution (~ 60 million cells, including the non-active/
background), with around 30% forest (initial forest percentage can go
up a lot in some scenarios). Are there ways to make the model more
efficient when using high performance computers (server environment)
that have multiple processors with multiple cores and a large amount
of RAM? In one test run that I did, the model ran for about 11 hours
on a server, using only one of the 16 processor cores that were
available and it used about 9GB of RAM.

If it's possible to run several instances of the model (maybe using
Virtual Machines), is there a way to partition the model in the
spatial domain (separate in smaller landscapes that can still
communicate when they need to) or in the forest processes domain (use
individual processes in a model run, maybe using one extension at a
time, but make the linkages for each time step)? I'm not sure that the
architecture of the model allows these kinds of partitioning.

Is there a version of LANDIS-II that can run on Linux? Sometimes the
same model runs faster in a Linux environment. Would it be difficult
to implement a version using Mono, which seem to provide multi-
platform compatibility in a language similar to C#?

Thank you.

Cheers,
Bogdan

Jimm Domingo

unread,
Mar 5, 2010, 2:45:48 PM3/5/10
to LANDIS-II Users
On Mar 4, 3:52 pm, Bogdan Chivoiu <poves...@gmail.com> wrote:
...

> Is there a version of LANDIS-II that can run on Linux? Sometimes the
> same model runs faster in a Linux environment. Would it be difficult
> to implement a version using Mono, which seem to provide multi-
> platform compatibility in a language similar to C#?

Because LANDIS-II is 100% C# and doesn't use any specific Microsoft
libraries, it can run on the Mono Framework as well. (For those who
don't know, Mono is a cross-platform, open source implementation of
the .NET Framework). In fact, several people have run LANDIS-II on
OS X using Mono. So yes, LANDIS-II can run on Linux using Mono.

The challenge is that LANDIS-II and its extensions are packaged as
Windows installers. Therefore, the simplest way to get the LANDIS-II
files onto a non-Windows platform is to first install LANDIS-II and
the
desired extensions on a Windows machine, and then copy the files to
the other system.

Jimm
--
James Domingo
Green Code LLC

Bogdan Chivoiu

unread,
Apr 7, 2010, 12:49:15 PM4/7/10
to LANDIS-II Users

Thank you, Jimm. It does work quite easily in Linux with Mono. I get
similar performance in Linux (Ubuntu 9.10 virtual machine in VMWare
Player) with the performance in Windows. I can't run Linux as a stand
alone OS, but it's possible that the model would run faster in that
case.

I was able to run the model fine in Linux when I used a lower
resolution (90 and 60 m), but I get an error and the model stops (when
writing the first reclass map) when I run it at 30 m resolution. The
30 m model runs in Windows Server 2008, where it's using about 4GB of
RAM. It don't know if it's a memory issue because I allocated 7GB for
the Ubuntu VM, but some of it is reserved for buffers/cache, according
to the memory info.

total used free shared
buffers cached
Mem: 3614580 381044 3233536 0 46764
214584
-/+ buffers/cache: 119696 3494884
Swap: 1767108 0 1767108

The main error messages when trying to run the 30 m model in Linux
are:
"Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS", and

"Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application."

I can send the full stacktrace if that's useful. Could you or somebody
else suggest a solution to this?

Thank you.

All the best,
Bogdan

Bogdan Chivoiu

unread,
Apr 13, 2010, 3:39:46 PM4/13/10
to LANDIS-II Users

An update to my last post. The Ubuntu VM that I was using was 32-bit,
so it couldn't handle more than 4GB of RAM. I am using a 64-bit Ubuntu
VM now and I allocated 6.7 GB of RAM, but I still get the abort
message from Mono (version 2.4.4). The memory usage increases
gradually up to about 70% of available RAM, and then the model run
stops.

I am pasting the complete output from the LANDIS run with the error
messages, in case it is useful for diagnosing the issue.

Thank you,
Bogdan


<<
Loading scenario from file "scenario30.txt" ...
Loading species data from file "species.txt" ...
Loading ecoregions from file "./ecoregions.txt" ...
Initializing landscape from ecoregions map "./ecoregions30.gis" ...
Cell length: 30 meters
Warning: Cell width (30) in map is not = to cell height (0)
Map dimensions: 4,480 rows by 4,481 columns = 20,074,880 cells
Sites: 4,093,616 active (20.4 %), 15,981,264 inactive (79.6 %)
Loading Age-only Succession plug-in ...
Creating Dispersal Neighborhood List.
Dispersal: NeighborRadius=3015, CellLength=30, numCellRadius=100
Loading initial communities from file "./initial-communities.txt" ...
Reading initial communities map "./initial-communities30.gis" ...
Loading Output Reclass plug-in ...
Loading Output Cohort Stats plug-in ...
Running Reclass Output ...
Writing reclass map to output/reclass/reclass1-0.gis ...


Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

Stacktrace:

at (wrapper managed-to-native)
object.__icall_wrapper_mono_object_new_fast (intptr) <0x00045>
at (wrapper managed-to-native)
object.__icall_wrapper_mono_object_new_fast (intptr) <0xffffffff>
at Landis.AgeCohort.SpeciesCohorts/<GetEnumerator>d__0.MoveNext ()
<0x000e7>
at Landis.AgeCohort.Util.GetMaxAge
(Landis.AgeCohort.ISpeciesCohorts) <0x00096>
at Landis.Output.Reclass.PlugIn.CalcForestType
(Landis.Landscape.Site,Landis.Output.Reclass.IForestType[]) <0x000db>
at Landis.Output.Reclass.PlugIn.Run () <0x00177>
at Landis.Model.Run (Landis.PlugIns.PlugIn) <0x00060>
at Landis.Model.Run (string) <0x00afb>
at Landis.App.Main (string[]) <0x0032b>
at (wrapper runtime-invoke) Landis.App.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

mono [0x482543]
/lib/libpthread.so.0 [0x7f0ca53f50f0]
/lib/libc.so.6(gsignal+0x35) [0x7f0ca4e22015]
/lib/libc.so.6(abort+0x183) [0x7f0ca4e23b83]
mono [0x585af9]
mono [0x57ca51]
mono [0x57cb39]
mono [0x57d61e]
mono [0x57db45]
mono [0x57e8dc]
mono [0x57befe]
mono [0x57b0a7]
[0x416c5195]

Debug info from gdb:


=================================================================

Jimm Domingo

unread,
Apr 13, 2010, 6:55:16 PM4/13/10
to LANDIS-II Users
The error message "too many heap sections" means that the memory
heap has become fragmented. The heap is a large section of unused
memory from which the program dynamically allocates chunks as it
executes:

http://en.wikipedia.org/wiki/Dynamic_memory_allocation

The garbage collectors in .NET and Mono are responsible for
identifying
and collecting memory chunks that the program is no longer using. But
they use different garbage collectors (GCs). .NET uses a generational
GC (see the section "Generational GC" on this page:

http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29)

while Mono uses a more conservative Boehm GC. There is work on a
new GC for Mono:

http://www.mono-project.com/Compacting_GC

which is expected to be included in Mono 2.8 (the latest release is
Mono 2.6;
please note all stable releases are even-numbered):

http://www.mono-project.com/Release_Notes_Mono_2.8

So your options are:

* wait until Mono 2.8 is released

* run the 30m scenario on a 64-bit Windows system with > 4Gb of
memory

* compile a custom configuration of Mono and the Boehm GC library
(libgc)
with the --enable-large-config option.

The options aren't in any particular order.

Jimm
--
James Domingo
Green Code LLC

[stacktrace snipped]

Reply all
Reply to author
Forward
0 new messages