LAM/MPI logo

XMPI User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |  

From: Heiko Bauke (heiko.bauke_at_[hidden])
Date: 2005-03-04 16:04:47


Dear all,

today I wrote this small sample program

#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include "mpi.h"

int main(int argc, char *argv[]) {
  time_t t;
  char str[256];
  int rank;
  MPI_Datatype String256;
  MPI_Init(&argc, &argv);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Type_contiguous(256, MPI_CHAR, &String256);
  MPI_Type_commit(&String256);
  MPI_Type_set_name(String256, "String256");
  MPI_Comm_set_name(MPI_COMM_WORLD, "MPI Universe");
  if (rank==0) {
    t=time(NULL);
    strncpy(str, ctime(&t), 256);
  }
  MPI_Bcast(str, 1, String256, 0, MPI_COMM_WORLD);
  printf("rank %i: %s", rank, str);
  MPI_Type_free(&String256);
  MPI_Finalize();
}

Unfortunately when I run this code with xmpi, the datatype shown in xmpi
datatype window is "MPI_CONTIG (256) MPI_CHAR" not "String256" as I
expected. Does xmpi not support MPI_Type_set_name functionality?
MPI_Comm_set_name seams to work fine.

Are there plans to add support for MPI_Type_set_name functionality? This
would be a usefull feature.

       Heiko

P.S.: I am using xmpi 2.2.3b8 with LAM/MPI 7.0.6.

--
-- Man kann ohne Liebe Holz hacken, Ziegel formen, Eisen schmieden. Aber
-- mit Menschen kann man nicht ohne Liebe umgehen. (Leo Tolstoj)
-- Supercomputing in Magdeburg @ http://tina.nat.uni-magdeburg.de
--                 Heiko Bauke @ http://www.uni-magdeburg.de/bauke