<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<br><br>I have a problem with creating a new MPI datatype,<br>my old_type is a linked list:<br> <br>struct ListeElt<br>{<br> long indice;<br> long val;<br> struct ListeElt *suiv;<br>};<br>typedef struct ListeElt LISTE_Elt:<br><br>I try to create a new datatype MPI_Liste:<br><br>MPI_Datatype MPI_Liste;<br>MPI_Datatype type[3] = {MPI_LONG,MPI_LONG,MPI_Liste};<br><br>int longueur_bloc[3]={1,1,1};<br>MPI_Aint disp[3];<br><br>LISTE_Elt L;<br>MPI_Address(&L.indice, disp); <br>MPI_Address(&L.val, disp+1); <br>MPI_Address(&L.suiv, disp+2); <br> <br>int base = disp[0]; <br>for (j=0; j <3; j++) disp[j] -= base;<br>MPI_Type_struct(3, longueur_bloc,disp, type,&MPI_Liste);<br>MPI_Type_commit(&MPI_Liste);<br><br>but i got the following error:<br><br>Fatal error in PMPI_Type_struct: Invalid datatype, error stack:<br>PMPI_Type_struct(210): MPI_Type_struct(count=3, blocklens=0x7fff830c6db0, indices=0x7fff830c6d40, old_types=0x7fff830c6da0, new_type_p=0x7fff830c6e40) failed<br>PMPI_Type_struct(177): Invalid datatype<br><br>Thank you for any help.<br><br><br><br>                                            </div></body>
</html>