[Beowulf] An Ask about Compilation
Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.
Mark Hahn hahn at mcmaster.caFri Jan 2 11:53:29 PST 2009
- Previous message: [Beowulf] An Ask about Compilation
- Next message: [Beowulf] An Ask about Compilation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I will try this. but I believe, the compiler will include all the MPI's > code, and I would like to disable this part with macros it's normally more convenient to provide two binaries: one with MPI and the serial version without. using MPI requires, for instance, initialization and finalization calls, as well as actual message passing. you can, of course, make these conditional: if (mpi) Mpi_Init(...) but this is distracting in the code. > programm works with lists and normally the list are made with pointers, and > as far as I know, the MPI dont "like" pointers... So the Seriell version, I think this indicates a more fundamental problem: MPI is for distributed memory programs - if you want dynamic data available to an individual process (rank/worker), then you have to send it. it's not so much that MPI is pointer-hostile, but rather that a pointer is a reference within a single process, and have no real meaning outside the process (such as in the address space of another rank.) you can, of course, pass the actual data pointed to instead. or possibly your data might be amenable to using "handles", tags which you assign to your data, and explicitly manage. (with a little more effort, you _could_ actually explicitly manage pointers as handles - you'd have to control allocation explicitly, and synchronize your memory use on all ranks. mmap() allows you to do this, and with the prevalence of 64b machines, you certainly can avoid colliding with system allocations within your address space.) of course, it may also be that your workload is embarassingly parallel - that is, once set up, each rank will compute independently of the others. if that's the case, then the mpi portions are really quite constrained: distribution of data and collection of results. controlling this via a commandline argument would be very doable.
- Previous message: [Beowulf] An Ask about Compilation
- Next message: [Beowulf] An Ask about Compilation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Beowulf mailing list
