From: Sam S. <sam...@gm...> - 2012-06-26 13:57:00
|
Nick (and John), Thank you for the replies on DataSources, but I had a follow-up question, it is possible to print out the data from different processes independently? Thanks Sam On Fri, Jun 15, 2012 at 9:42 AM, Nick Collier <nic...@ve...> wrote: > Sam, > > The DataSources can only be templated with a double or an int. We should probably improve this at some point, but the idea is that a DataSource is a single column of tabular data (e.g. a spreadsheet column) so a single value makes the most sense. If you want to record a vector of data, you'll have to do that yourself. > > See also some replies embedded below. > > Nick > > On Jun 13, 2012, at 1:41 PM, Sam Seaver wrote: > >> John, >> >> Thanks for the reply, in fact, it hadn't occurred to me that the >> SharedContext would recognize the types stored in AgentId, so this >> turned out to be much more straightforward than I originally thought. >> >> Moving along, I'm now looking at creating DataSources. As it happens, >> one of my parameters is the number of dimensions in the model, so this >> means that for n dimensions, I will need n DataSources. I can simply >> create a vector of DataSources. This means implementing/defining a >> generic DataSource and its accompanying getData() function in the >> header, and then creating n copies of it, I wanted to write and check >> that this is legal within the RepastHPC framework. >> > > If I understand you correct, this should be fine. You just create N of them and then add them to the DataSet. > > >> In addition to this, I'd like to store dimensional information of all >> the agents, so I'm writing to ask if it's OK to use a DataSource that >> is templated with a vector of doubles, for instance, rather than a >> single double > > See above. > >> Finally, when writing to file, as I'll be using different parameters >> for different simulations, is there a function that defines a filename >> using the parameters, or will I have to code that myself (i.e. >> nagents_100_ndims_3 etc.) > > There's no built-in function for this. John may (or may not) have some bash scripts that create this. > > > >> >> Thanks >> Sam >> >> On Mon, Jun 4, 2012 at 5:21 AM, Murphy, John T. <jtm...@an...> wrote: >>> Hi Sam, >>> >>> I haven't found the use of multiple contexts in RepastHPC to be straightforward; my suggestion would be to add these agents to the same SharedContext. You will probably want to use a different agent 'type' so that you can 'filter' the iterators that move through the agent lists so that the centroid agents are not part of the same game. >>> >>> Best, >>> John >>> >>> John T. Murphy, PhD, M.A. Ed. >>> Computational Postdoctoral Fellow >>> Argonne National Laboratory >>> jtm...@an... >>> ________________________________________ >>> From: Sam Seaver [sam...@gm...] >>> Sent: Sunday, June 03, 2012 11:53 PM >>> To: GULYÁS László >>> Cc: rep...@li... >>> Subject: Re: [Repast-interest] Parallelization with RepastHPC. >>> >>> Thanks to everyone for the feedback, I'm sticking with RepastHPC, but >>> I'll implement it so that it runs one simulation per process. >>> >>> I had a follow-up question regarding the SharedContext. My code >>> monitors whether a collection of agents splits into groups, and I use >>> extra Agent objects (centroids) to store the groups' centers (the mean >>> position of the member agents). This is necessary as the agents >>> change position and switch groups, so the groups' centers change. >>> >>> So, my question is really, for my simulation to run within one >>> process, do I need to add these agents to the same SharedContext? Or, >>> I guess, in other words, do I use multiple agents types in one >>> SharedContext, or multiple SharedContexts? >>> >>> Thanks >>> Sam >>> >>> On Fri, May 25, 2012 at 9:20 AM, GULYÁS László <lg...@ai...> wrote: >>>> Hi Sam, >>>> >>>> You might find this interesting: http://gridabm.sourceforge.net/ >>>> >>>> Best regards, >>>> >>>> -- Laszlo >>>> -- >>>> Dr. Gulyás, László >>>> igazgató / director >>>> Intelligens Alkalmazások és Webszolgáltatások / >>>> Intelligent Applications and Web Services >>>> AITIA International, Budapest >>>> ----- Original Message ----- From: "Sam Seaver" <sam...@gm...> >>>> To: <rep...@li...> >>>> Sent: Friday, May 25, 2012 3:19 AM >>>> Subject: [Repast-interest] Parallelization with RepastHPC. >>>> >>>> >>>> >>>> Dear Repast, >>>> >>>> I'm now starting to consider how I would like run my simulation using >>>> parallel processes. It's my first foray into the world of >>>> parallelization so bear with me. My previously serialized simulation >>>> could be generalized as n agents performing n stochastic interactions >>>> in 3-dimensional space over 1,000 time-steps, after which statistics >>>> on the agents' state is calculated. The simulations would be >>>> performed 1,000 times, or more. >>>> >>>> As I understand it, there's two ways in which I can parallelize my >>>> simulations: >>>> >>>> 1) For a given number of processes, I can perform one simulation, >>>> where n agents are shared amongst all the processes, and their >>>> interactions are also shared amongst the processes. Since all of the >>>> agents are in the same 3-dimensional space, this seems it will involve >>>> a lot of non-local agents sharing their states amongst different >>>> processes. >>>> >>>> 2) Alternatively, I can run a given number of simulations at the same >>>> time, but each simulation occurs within one process, so every agent is >>>> local to its process, and this minimizes cross-process communication. >>>> I'm leaning towards the second method, but I'm not sure if one method >>>> is "better" than the other. >>>> >>>> Any thoughts? >>>> Thanks >>>> Sam >>>> >>>> -- >>>> Postdoctoral Fellow >>>> Mathematics and Computer Science Division >>>> Argonne National Laboratory >>>> 9700 S. Cass Avenue >>>> Argonne, IL 60439 >>>> >>>> http://www.linkedin.com/pub/sam-seaver/0/412/168 >>>> sam...@gm... >>>> (773) 796-7144 >>>> >>>> "We shall not cease from exploration >>>> And the end of all our exploring >>>> Will be to arrive where we started >>>> And know the place for the first time." >>>> --T. S. Eliot >>>> >>>> ------------------------------------------------------------------------------ >>>> Live Security Virtual Conference >>>> Exclusive live event will cover all the ways today's security and >>>> threat landscape has changed and how IT managers can respond. Discussions >>>> will include endpoint security, mobile security and the latest in malware >>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>> _______________________________________________ >>>> Repast-interest mailing list >>>> Rep...@li... >>>> https://lists.sourceforge.net/lists/listinfo/repast-interest >>>> >>> >>> >>> >>> -- >>> Postdoctoral Fellow >>> Mathematics and Computer Science Division >>> Argonne National Laboratory >>> 9700 S. Cass Avenue >>> Argonne, IL 60439 >>> >>> http://www.linkedin.com/pub/sam-seaver/0/412/168 >>> sam...@gm... >>> (773) 796-7144 >>> >>> "We shall not cease from exploration >>> And the end of all our exploring >>> Will be to arrive where we started >>> And know the place for the first time." >>> --T. S. Eliot >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Repast-interest mailing list >>> Rep...@li... >>> https://lists.sourceforge.net/lists/listinfo/repast-interest >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Repast-interest mailing list >>> Rep...@li... >>> https://lists.sourceforge.net/lists/listinfo/repast-interest >> >> >> >> -- >> Postdoctoral Fellow >> Mathematics and Computer Science Division >> Argonne National Laboratory >> 9700 S. Cass Avenue >> Argonne, IL 60439 >> >> http://www.linkedin.com/pub/sam-seaver/0/412/168 >> sam...@gm... >> (773) 796-7144 >> >> "We shall not cease from exploration >> And the end of all our exploring >> Will be to arrive where we started >> And know the place for the first time." >> --T. S. Eliot >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Repast-interest mailing list >> Rep...@li... >> https://lists.sourceforge.net/lists/listinfo/repast-interest > -- Postdoctoral Fellow Mathematics and Computer Science Division Argonne National Laboratory 9700 S. Cass Avenue Argonne, IL 60439 http://www.linkedin.com/pub/sam-seaver/0/412/168 sam...@gm... (773) 796-7144 "We shall not cease from exploration And the end of all our exploring Will be to arrive where we started And know the place for the first time." --T. S. Eliot |