This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157459 - need MPI support
Summary: need MPI support
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@cnd
Depends on:
Reported: 2009-01-26 19:08 UTC by Thomas Preisler
Modified: 2009-01-26 19:18 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preisler 2009-01-26 19:08:34 UTC
MPI support within the IDE is desired.  Support includes the following:

1) Support for ClusterTools 6 (based on an implementation acquired by Sun in 1996) and for ClusterTools 7 and beyond (based on the Open MPI source 

2) Makefile support for MPI builds.  This includes:

2a) Invoking the correct compiler driver (mpf90, mpcc, and mpCC for CT6, but mpif90, mpicc, and mpiCC for CT7 and beyond).

2b) Invoking the correct compiler options (e.g., -dalign and others?).

2c) Linking the MPI library (e.g., -lmpi for CT6).

3) Program launch (e.g., mprun for CT6 and mpirun for CT7).  Users may have a variety of parameters they may want or need to provide to the IDE for 
program launch, possibly including the number of processes to launch, on what nodes of a cluster, etc.

4) Code templates for C/MPI and Fortran/MPI.  E.g., for C/MPI:

#include <stdio.h>
#include <mpi.h>

int main(int argc, char **argv) {
  int me, np, tag = 5;
  double t0, t1;
  MPI_Status status;

  MPI_Comm_rank(MPI_COMM_WORLD, &me);
  MPI_Comm_size(MPI_COMM_WORLD, &np);

  if ( np == 1 ) {
    printf("only one MPI process\n");
  } else {


    t0 = MPI_Wtime();

    if ( me == 1 ) MPI_Send(&t0,1,MPI_DOUBLE,0,tag,MPI_COMM_WORLD        );
    if ( me == 0 ) MPI_Recv(&t1,1,MPI_DOUBLE,1,tag,MPI_COMM_WORLD,&status);

    if ( me == 0 ) printf("time difference: %15.9lf\n", t1 - t0);


  return 0;

or for F90/MPI:

  use mpi

  integer :: ier, me, np, tag = 5
  real(8) t0, t1
  integer status(MPI_STATUS_SIZE)

  call MPI_Init(ier)
  call MPI_Comm_rank(MPI_COMM_WORLD, me, ier)
  call MPI_Comm_size(MPI_COMM_WORLD, np, ier)

  if ( np == 1 ) then
    write(6,*) "only one MPI process"
    call MPI_Barrier(MPI_COMM_WORLD, ier)
    t0 = MPI_Wtime()

    if ( me == 1 ) call MPI_Send(t0,1,MPI_REAL8,0,tag,MPI_COMM_WORLD,       ier)
    if ( me == 0 ) call MPI_Recv(t1,1,MPI_REAL8,1,tag,MPI_COMM_WORLD,status,ier)

    if ( me == 0 ) write(6,'("time difference: ",f15.9)') t1 - t0
  end if

  call MPI_Finalize (ier)


Note that these code templates use the six most fundamental MPI calls (MPI_Init, MPI_Comm_rank, MPI_Comm_size, MPI_Send, MPI_Recv, and MPI_Finalize) 
as well as two other very common ones (MPI_Barrier and MPI_Wtime).

5) Click to API prototype.  Note that MPI programming is library-API programming.  Users must routinely check argument lists for correct usage of library 
routines.  There should be IDE support.  E.g., if a user types "MPI_Send(" and clicks, s/he should be able to see the routine's prototype or even man page.  
(This must be generally interesting.  I don't know if the IDE already has other support for this -- e.g., when typing in code, click on a routine name and 
automatically see its prototype.  Importantly, the IDE must support this functionality for Fortran and not just for C.)
*** (#1 of 2): 2007-08-01 17:06:18 PDT eugene

See about the "mpiplatform" project, a NetBeans MPI plug-in.
*** (#2 of 2): 2007-10-15 23:36:46 PDT eugene
Comment 1 Thomas Preisler 2009-01-26 19:13:19 UTC
There are many tricky issues here.  E.g., MPI does not currently ship with the IDE -- e.g., with Studio.  Also, the IDE is supported on Linux, but ClusterTools is only 
supported on the Solaris OE.  Someone still needs to work out all the details.  This CR can serve as a placeholder.
*** (#1 of 3): 2007-08-01 17:06:18 PDT eugene

Debugging support would be nice, but we can limit the scope of this particular RFE not to include debugging.  Debugging of parallel MPI programs is typically with the 
TotalView debugger.  Extending dbx for rudimentary debugging of "small" MPI codes would be nice.  Again, however, the scope of this RFE does not include debugging.
*** (#2 of 3): 2007-08-01 17:48:13 PDT eugene

There is a NetBeans plugin module that provides support for MPI projects:
I tried it, and it looks like a great step in right direction. Can this module
be included in standard Sun Studio installation?
*** (#3 of 3): 2007-10-16 15:10:35 PDT nikolay
Comment 2 Thomas Preisler 2009-01-26 19:18:01 UTC
Was CR 6588231