[mpich-discuss] MPI Implementation on 1 module

Pavan Balaji balaji at mcs.anl.gov
Tue Dec 14 19:20:40 CST 2010


You can just add MPI calls to the module you want to use MPI in, compile 
it with mpicc/mpif77/whatever and link it to the rest of the object files.

MPI has always been designed to work in such environments.

  -- Pavan

On 12/14/2010 03:05 PM, Gulshan Singh wrote:
> What is available:
> I have full access to the module that I wish to implement MPI in.
> However I do not have access to source code of other modules, only
> object files of all the modules are available for me to do linking.
>
> workflow/pipeline?
> I do not completely understand this question but the software calls
> certain number of modules one after another depending upon the problem
> to be solved. The modules are called one after another. Each module that
> is called provides some results to the next module.
>
> move on?
> Yes exactly right. Need to launch MPI-enhanced subroutine/module, wait
> until it is done. And move on to next next without even knowing that the
> computation was done in parallel of serial.
>
> Resources allocation is not a problem; the software will have n number
> of processors to itself whenever needed. This is accomplished by
> requesting n processors for the entire run time.
>
> Additional Question:
> I have source code of one module and object files of all other modules.
> The object files were created using ifort (Intel Fortran). The
> MPI-enhanced object file I am creating is using MPIF90. Does linking
> these two type of object files is a problem? Do I need to create all
> object files using MPIF90 or ifort object files will work?
>
> Gulshan
>
> On Tue, Dec 14, 2010 at 4:51 AM, Nicolas Rosner <nrosner at gmail.com
> <mailto:nrosner at gmail.com>> wrote:
>
>     Hello Gulshan,
>
>     I'm assuming you meant more or less the following:
>
>       - you have a program spanning multiple compilation units and/or libs
>           and
>       - you would like to MPI-enable just one of said units or modules
>           and
>       - any necessary IPC/comm/sync between the MPI-ized unit and the rest
>         is addressed by separate mechanisms (other than MPI)
>
>     If so, sure, as long as you have the source code for that particular
>     unit
>     or module, you should be able to limit any MPI
>     compile/link-dependency of
>     your system to the one module that actually uses MPI calls.
>
>
>      > There are more than 10 modules in the software we are trying to
>     modify to
>      > improve the speed. We know that the most time is taken by only
>     one module.
>
>     Do these modules map to sequential stages of a workflow/pipeline? Is
>     that
>     one module one such stage? Is it currently invoked in a call-return way?
>
>
>      > So MPI starts when the particular module is called and
>      > the MPI collapses as soon as the computation in the module is
>     finished.
>
>     What you describe sounds essentially like a sequential program that, at
>     some point --or perhaps every now and then-- needs to launch a parallel,
>     MPI-enhanced subroutine/subprocess, wait until it's done, then move
>     on..?
>
>     If so, this is certainly possible, assuming your resource allocation
>     plays along (ie the machines are always there for you when you need
>     them, etc).
>
>     HTH, just guessing; good luck!  N.
>     _______________________________________________
>     mpich-discuss mailing list
>     mpich-discuss at mcs.anl.gov <mailto:mpich-discuss at mcs.anl.gov>
>     https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
>
>
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mpich-discuss mailing list