[Beowulf] An Ask about Compilation

Geoff Jacobs gdjacobs at gmail.com
Fri Jan 2 12:25:46 PST 2009


matheus reimann wrote:
> Thank you about the answer to my Question.
>  
> 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, because my
> 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, when the MPI part is on, will not be optimized.
>  
> With Regards
>  
> Matheus

Go with two binaries and share the parts of the program that make sense
by tossing them into separate source files. Avoid using macros
excessively, as they greatly diminish the clarity of your code, and you
don't have to go that route in this case.

> 
> --- *Mar 30/12/08, Bruno Coutinho /<coutinho at dcc.ufmg.br>/* ha scritto:
> 
>     Da: Bruno Coutinho <coutinho at dcc.ufmg.br>
>     Oggetto: Re: [Beowulf] An Ask about Compilation
>     A: beowulf at beowulf.org
>     Data: Martedì 30 dicembre 2008, 22:12
> 
> 
>     2008/12/30 matheus reimann <mgrhferlamb2002 at yahoo.it
>     <mailto:mgrhferlamb2002 at yahoo.it>>
>     >
>     > Hi,
>     >
>     > I am a newbie in the group, and I have an ask about Compilation of
>     programs in seriel and paralell.
>     >
>     > I wanna have a programm which decides if the run is parallel or
>     seriell. P.ex.: myexe.exe -> runs in seriell, and when I write:
>     myexe.exe -parallel -> runs in parallel.
>     >
>     > I dont wanna compile ever when I need the program in seriel or in
>     parallel. Usually is the seriell compilation with g++ and the
>     parallel with mpiCC. Has anybody done a program like this before???
> 
>     mpiCC is a wrap to g++ that adds flags to find MPI include and
>     library files.
>     You can compile both with mpiCC.
> 
>     To run the serial version, you can call  the binary directly and to
>     run the parallel version run your program through mpirun to run
>     inside the MPI enveronment.
> 
>     _______________________________________________
>     Beowulf mailing list, Beowulf at beowulf.org
>     To change your subscription (digest mode or unsubscribe) visit
>     http://www.beowulf.org/mailman/listinfo/beowulf
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf


-- 
Geoffrey D. Jacobs



More information about the Beowulf mailing list