From: Murphy, J. T. <jtm...@an...> - 2012-11-25 22:45:27
|
Hi Mark, I'd be curious to know where you found this pdf/pptx document; it would make it easier to know exactly what the source of confusion is. The call to createComplementaryEdges in the RumorModel code occurs in RumorModel.cpp, line 127. Please note that this call occurs in the most recently distributed version of Repast HPC, version 1.0.1. The internal development code repository contains newer versions of Repast HPC and of the RumorModel demo, and in these the call to createComplementaryEdges may not be used. However, these repository versions are not yet fully tested nor finalized for release, nor is there any documentation of them. I would assume that any documentation or commentary that you find will refer to the released version- and I recommend you use the release version as well, if you are not. The RumorModel example in the release version (and in all other versions that I know of) is complete in the three files that you mentioned. It and the 'zombies' model are the two demonstration models that currently exist. Keep in mind that some explanations of these demonstration models may comment on both the elements that are handled by the code in the demonstrations themselves and also on aspects that are handled 'under the hood' by Repast HPC; Repast HPC is intended to do a lot of things without requiring explicit calls in the user's code. The documentation and comments may blur the lines between these, so that they discuss things that occur in the RumorModel but that are actually handled by code somewhere else in the Repast HPC library. Along with the new versions of Repast HPC there is more documentation being prepared, but the release date is not yet known. Best, John -- John T. Murphy Computational Postdoctoral Fellow Decision and Information Sciences and Argonne Leadership Computing Facility Argonne National Laboratory jtm...@an... On 11/25/12 8:47 AM, "markaehlen" <Mar...@gm...> wrote: > >Hey John - thanks again, you're a saint. I'm off to building a prototype >off >of the Rumor example that comes with the Repast HPC installation. I have a >secretarial question: a PDF PPTX I found on the web describes the Rumor >example with a lot of specifics, but when I open the RumorModel.{h,cpp} >and >main.cpp files that come with the installation, they appear to be missing >some of this detail, such as the creation of complimentary edges. Am I not >using the right RumorModel files? Where are the complete versions of these >files. More broadly, is there a repository of simple examples that users >have shared, that I can peruse? > >Thanks again! > >M > > > >Murphy, John T. wrote: >> >> Mark, >> >> In the simplest situation you get two pieces: .h files and a library >>like >> libMYLIB.a. >> >> The .h file (also, sometimes ".hpp", for c++ code) describes the >>functions >> and classes in the library; the .a file is an archive of the compiled >> versions of those functions and classes. >> >> You might also get .c files (or .cpp, again for c++ code); these are the >> source code that was used to generate the .a file. When you build the >> libraries on your own machine, you get only the .c and .cpp files, and >>you >> build the .a file. >> >> After the .a file is created, you can (if you want) throw away the .c >>and >> .cpp files. (It's good to keep them, but they're only good for >>reference.) >> >> To use this library, you need to write code that includes the >>appropriate >> .h files. This allows you to compile your code. To actually make it run, >> you need to link to the library .a file. (Linking can be done as part of >> compiling or during run-time.) >> >> The first step in building the RepastHPC library uses the .h and .cpp >> files from the other libraries like boost, netcdf, etc. The result is a >> repasthpc.a library. >> >> After that you can use the repast '.h' files (as well as any other >> library's .h files) in your own code. When you link, you can link to the >> other libraries and to the repasthpc.a library. >> >> This is all an outcome of the separation of 'structure' from 'content': >> the .h files describe what functions are available in the libraries; the >> .cpp files actually have the code they need. >> >> (There is also 'templated' code; this is code that is written at a >>generic >> level and can't be compiled until its specifics are filled in; basically >> there are .hpp files but no .cpp files.) >> >> So the upshot is that Repast HPC will need the .h files and the .a >>files, >> but shouldn't need the .cpp files. You should only need those if you're >> building the libraries yourself. >> >> Hope this makes sense. >> >> Best, >> John >> >> >> >> -- >> John T. Murphy >> Computational Postdoctoral Fellow >> Decision and Information Sciences and >> Argonne Leadership Computing Facility >> Argonne National Laboratory >> jtm...@an... >> >> >> >> >> On 8/20/12 2:11 PM, "markaehlen" <Mar...@gm...> wrote: >> >>> >>>Wow - thanks for the quick reply. I am in the middle of building (and >>>the >>>many variants it takes), so have some high-level thinking to do...will >>>eventually install correctly, it just will when it does. In the >>>meantime: >>> >>>Its helpful to understand, from RepastHPC's standpoint (yes, the code), >>>what >>>it needs to compile. Some of the requirements are, I am assuming, >>>runtime >>>libraries and other things are specific header files. For example, it >>>appears to want to find *actual files* such as boost/mpi.cpp and >>>netcdfcpp.h. I'm not a deep compiler thinker, so pardon me if this >>>sounds >>>sophomoric, but which of the mpi/boost/netcdf/netcdf-cxx links need to >>>be >>>files and which need to be / can be compiled libraries? I'm learning >>>this >>>RepastHPC division/grouping the hard way, but that's okay. Macports, for >>>example, just installs the needed libraries (and occasional executable >>>code?), but by default probably does not install *any* source code, >>>e.g., >>>*.h files. >>> >>>If you can harvest a question from the above, I look forward to an >>>answer >>>:) >>> >>>Thanks again! >>> >>>Mark >>> >>> >>> >>>markaehlen wrote: >>>> >>>> Hi - I'm installing Repast HPC on a new Mac with Mountain Lion. I have >>>> used MacPorts in the past and found it very good ('secretarially') in >>>> keeping track of prerequisite libraries and insuring the latest >>>>libraries >>>> are used. I have tried several times to use it but am getting strange >>>> errors. >>>> >>>> Before I ask specific questions about installation (I have also been >>>> following the guidance in the repast download files), should I / >>>>could I >>>> use MacPorts (it has entries for all of the pre-requisites: openmpi, >>>> mpich2, boost, netcdf, netcdf-cxx4), or should I really just do each >>>> pre-requisite manually? The problem appears to be that boost static >>>> libraries are not created, and certain header files (netcdfcpp.h) are >>>>not >>>> installed locally. >>>> >>>> Just high-level question for now... >>>> >>>> Thanks, >>>> >>>> Mark >>>> >>>-- >>>View this message in context: >>>http://old.nabble.com/Installing-RepastHPC-on-Mac%3A-Can-I-Install-Prere >>>qu >>>isite-Libraries-with-MacPort--tp34325774p34326062.html >>>Sent from the repast-interest mailing list archive at Nabble.com. >>> >>> >>>------------------------------------------------------------------------ >>>-- >>>---- >>>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 >> >> > >-- >View this message in context: >http://old.nabble.com/Installing-RepastHPC-on-Mac%3A-Can-I-Install-Prerequ >isite-Libraries-with-MacPort--tp34325774p34719546.html >Sent from the repast-interest mailing list archive at Nabble.com. > > >-------------------------------------------------------------------------- >---- >Monitor your physical, virtual and cloud infrastructure from a single >web console. Get in-depth insight into apps, servers, databases, vmware, >SAP, cloud infrastructure, etc. Download 30-day Free Trial. >Pricing starts from $795 for 25 servers or applications! >http://p.sf.net/sfu/zoho_dev2dev_nov >_______________________________________________ >Repast-interest mailing list >Rep...@li... >https://lists.sourceforge.net/lists/listinfo/repast-interest |