LISTSERV mailing list manager LISTSERV 16.0

Help for MASON-INTEREST-L Archives


MASON-INTEREST-L Archives

MASON-INTEREST-L Archives


MASON-INTEREST-L@LISTSERV.GMU.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

MASON-INTEREST-L Home

MASON-INTEREST-L Home

MASON-INTEREST-L  November 2010

MASON-INTEREST-L November 2010

Subject:

Re: Stack Overflow in socialnets package

From:

"Maciej M. Latek" <[log in to unmask]>

Reply-To:

MASON Multiagent Simulation Toolkit <[log in to unmask]>

Date:

Tue, 16 Nov 2010 10:55:18 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (232 lines)

Dear Martin,

Glad MASON team solved your problem. Let me step back and provide you
with two lines of effort which address the scalability problem from
different perspectives.

First, there are solutions which allow you to perform search for exact
or approximate shortest paths on large graphs by transforming the
problem either by spatial embedding of graphs or by making the problem
multi-resolution (so called landmark / backbone or center piece
routing). Check the following three examples:

http://www.cs.ucsb.edu/~bowlin/pdf/orion-wosn10.pdf (for social
networks example)
http://matsim.org/uploads/Garbald07_Balmer.pdf (for routing in dynamic
transport network)
http://research.yahoo.com/files/paper_7.pdf (a combination for
recommendation networks)

These approaches usually require precomputing some auxiliary
datastructures, but size of those can be adjusted and later quickly
amortized if queries are repeated, compared to default cached
Dijkstra. Additionally, frameworks like Matsim who is JAVA,
open-sourced, might be partially using JUNG, provide code which is
easy to hack.

Second, you stated that your actual problem is to find mean shortest
path metric, not to route. One might consider statistical approach:
sampling of the large graph and computing this statistic of the
sample. Of course, for a statistic like characteristic path length one
needs to apply a smart sampling (snowball, traceroute) to get unbiased
and consistent estimates. You might want to skim through the following
set of slides to get intuition behind those ideas:

http://vw.indiana.edu/netsci06/ws-slides/eric_kolaczyk.pdf

Lastly, if you a few bucks to spare for some cloud service this might be fun:

http://www.math.cmu.edu/~ctsourak/tkdd10.pdf

Regards

Maciek

On Mon, Nov 15, 2010 at 7:44 PM, Martin Pokropp
<[log in to unmask]> wrote:
> Dear Maciej,
>
> thankyou for your email concerning the problems I experienced with finding
> the mean shortest path of my simulated networks and sorry for my late
> response.
> Meanwhile, after Sean Luke had forwarded me a conversation he had with
> Gabriel Balan, I decided to customize the code in the socialnets package for
> my purposes and for my machine, which is limited to only 2GB. It still takes
> an eternity to  get the mean shortest path, but at least I do no longer
> experience any heap space problems. For my purposes, this is sufficient,
> because I don't really need the SP for my simulations. I only need it as an
> additional information about the properties of my networks. Therefore I
> think that considering to use JUNG  is no longer necessary for my purposes,
> although I found it very interesting to read about your approach!
>
> Thankyou and best regards
>
> Martin
>
>
>
> 2010/11/12 Maciej M. Latek <[log in to unmask]>
>>
>> Dear Martin,
>>
>> Sorry for delayed response, past two weeks were filled with
>> conferences and presentations. Let me share my experiences with large
>> scale routing on JUNG networks with you.
>>
>> The biggest network we routed was 33000 nodes, 70000 edges
>> transportation graph. 16GB machine was able to handle JUNG's Dijkstra
>> and service repeated calls for paths with reasonable speed. As most of
>> paths were "local", I would expect that in general cache necessary to
>> handle such a graph would be larger.
>>
>> One thing we experimented with was to switch to truncated
>> breadth-first search and caching of only requested paths. I attach a
>> sample modification of JUNG's code we played around. This approach
>> sacrifices sophistication for better control over speed / memory
>> trade-off.
>>
>> We assume that your SimState can provide horizon for the
>> TruncatedDistanceLabeller. The code for TruncatedShortestPath
>> implements truncated breadth-first search, but as far as I see it does
>> not implement the limited caching. Let me know if such a solution
>> would be of interest to you.
>>
>> Best regards
>>
>> Maciej
>>
>>
>>
>> On Mon, Nov 8, 2010 at 12:30 PM, Martin Pokropp
>> <[log in to unmask]> wrote:
>> > Dear Sean, Dear Mr. Balan, Mr. Panait and Mr. Latek,
>> >
>> >  increasing the stack size does the job for the task of finding the
>> > components of the network with
>> >
>> >
>> > sim.field.network.stats.ConnectivityStatistics.getConnectedComponents(network)
>> >
>> > But the biggest component (size about 29000 nodes) now seems to be too
>> > big
>> > for the shortest path algorithms in
>> >
>> >
>> > sim.field.network.stats.NetworkStatistics.getMeanShortestPath(giantComponent,
>> > metric)
>> >
>> > I tried out very high  heap sizes (2000M). The task goes on for minutes,
>> > then a "java.lang.OutOfMemoryError: java heap space" is thrown.
>> >
>> > Do you think that the Jung package would do the job here, or is the task
>> > generally too complex (I'm using an ordinary desktop pc)?
>> >
>> > Regards,
>> >
>> > Martin
>> >
>> >
>> >
>> >
>> >
>> >
>> > 2010/11/8 Sean Luke <[log in to unmask]>
>> >>
>> >> Martin, the right person to look into this is Gabriel Balan, and to a
>> >> lesser extend Liviu Panait (whom I am cc:ing).  They were the two who
>> >> put
>> >> this package together way back when.  Gabriel is moving to New
>> >> Hampshire so
>> >> may be in radio silence right now however.
>> >>
>> >> In the meantime we need to nail down whether or not it's a recursion
>> >> bug
>> >> or a um, misfeature.  Try increasing the stack size in Java.  This is
>> >> done
>> >> with the -Xss parameter.  The default value is probably 512K.  Try
>> >> increasing it considerably, like
>> >>
>> >>        java -Xss16392k ...
>> >>
>> >> You should also increase the heap I guess.  I'd do something like:
>> >>
>> >>        java -Xss16392k -Xmx500M -Xms500M ...
>> >>
>> >> If you can't find a stack size which will complete the task, then it's
>> >> possibly the case that we're seeing a recursion bug here rather than a
>> >> maximal graph limit.
>> >>
>> >> Your other option is to go with Jung.  Now beware: I believe that Jung
>> >> isn't serializable, so you may be stuck unable to checkpoint out.  I am
>> >> cc:ing Maciej Latek, who knows a lot about jerry-rigging MASON to Jung.
>> >>
>> >> Sean
>> >>
>> >>
>> >> On Nov 8, 2010, at 10:52 AM, Martin Pokropp wrote:
>> >>
>> >>> Dear Sean, Dear Mason Users,
>> >>>
>> >>>
>> >>> For my simulated undirected network I intend to use the additional
>> >>> socialnets package provided with Mason. My network has 30000 nodes and
>> >>> is
>> >>> sparse with about 6 edges per node.
>> >>>
>> >>> As there are isolated nodes, I cannot get the mean Shortest Path of
>> >>> the
>> >>> whole network. Instead, I'm trying to analyse the biggest connected
>> >>> component by using
>> >>>
>> >>>
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics.getConnectedComponents(network)
>> >>>
>> >>> Unfortunately the VM throws multiple stack overflow errors:
>> >>>
>> >>>
>> >>> Exception in thread "main" java.lang.StackOverflowError
>> >>>    at sim.field.network.Network.getNodeIndex(Network.java:618)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:220)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222)
>> >>>    at
>> >>>
>> >>> sim.field.network.stats.ConnectivityStatistics$ConnectedComponentFactory.exploreU(ConnectivityStatistics.java:222
>> >>> ...
>> >>>
>> >>> I guess that there are too many recursions and the
>> >>> getConnectedComponents
>> >>> method is not appropriate for networks such as mine?
>> >>>
>> >>> Best Regards,
>> >>>
>> >>> Martin
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >
>> >
>
>

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

January 2023
November 2022
April 2022
March 2022
January 2022
November 2021
May 2021
April 2021
March 2021
February 2021
August 2020
July 2020
June 2020
February 2020
August 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
October 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
September 2017
June 2017
May 2017
March 2017
February 2017
January 2017
December 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
February 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
July 2004
May 2004
April 2004
March 2004

ATOM RSS1 RSS2



LISTSERV.GMU.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager