Newsgroups: comp.parallel.mpi
From: hejc@apap2.pap.univie.ac.at
Subject: Re: MPI newbi problem
Organization: Vienna University Computer Center
Date: 7 Oct 1996 08:07:08 GMT
Message-ID: <53adnc$p6q@www.univie.ac.at>

In article <32552241.34DDDCB7@informatik.uni-muenchen.de>, Andreas Baumhof <baumhof@informatik.uni-muenchen.de> writes:
>Hello MPI-Users,
>
>I am very new to MPI an have a question how MPI works.
>I am using it on LINUX with the ch_p4 device.
> ...
>} else if (my_rank == 2) {
>  erg=d(punkt);
>  sprintf(message, "d(..) = (%0.12f, %0.12f), *erg, *(erg+1));
>  MPI_Send(message, strlen(message)+1, MPI_CHAR, 0, tag,
>MPI_COMM_WORLD);

Hi,

 I think the origin of this program crash is the line

 sprintf(message, "d(..) = (%0.12f, %0.12f), *erg, *(erg+1));

and not the communication. Because erg is a double pointer,
use %0.12lf instead. It is also possible that erg+1 is no valid
address ( depends on how the function d works ) or the buffer
message is too small. Communications looks OK.

 Regards,
    Gerhard
  

