<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<big><tt>Hi Jayesh,<br>
<br>
Thanks for your reply.<br>
I'm using MPICH2-1.2.1p1 (not the latest...) on a Unix 64 with ifort
11.1. I get no error message when I use the basic compilation "mpif90
MPItest.f90" with no further options.<br>
Here I paste the output of the code, using complex(8) and a ring of 2
processes:<br>
<br>
&nbsp;BCAST with count=1*MPI_COMPLEX: (1.50000000000000,0.500000000000000)<br>
&nbsp;Proc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; received (1.50000000000000,0.000000000000000E+000)<br>
&nbsp;BCAST with count=2*MPI_COMPLEX: (1.50000000000000,0.500000000000000)<br>
&nbsp;Proc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; received (1.50000000000000,0.500000000000000)<br>
&nbsp;BCAST with count=1*MPI_DOUBLE_COMPLEX:
(1.50000000000000,0.500000000000000)<br>
&nbsp;Proc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; received (1.50000000000000,0.500000000000000)<br>
&nbsp;<br>
&nbsp;REDUCE with count=1*MPI_DOUBLE_COMPLEX<br>
&nbsp;Proc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; has (1.50000000000000,0.500000000000000)<br>
&nbsp;Proc.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; has (2.50000000000000,1.50000000000000)<br>
... and here the program hangs...<br>
<br>
You can see that, when using count=1 and datatype=MPI_COMPLEX on </tt></big><big><tt>a
complex(8) variable, only the real part is broadcasted (that is, the
first data in memory that has the length of a double. The whole
complex(8) variable, which is twice larger than a double, is only
broadcasted when using count=2 with datatype=MPI_COMPLEX, or count=1
with datatype=MPI_DOUBLE_COMPLEX.<br>
Declaring the variable as "double complex" instead of "complex(8)" is
exactly equivalent.<br>
If I declare a "complex(16)", which is twice larger than a complex(8),
nothing is broadcasted when using count=1*MPI_COMPLEX, and only the
real part is broadcasted when using count=2*MPI_COMPLEX or
count=1*MPI_DOUBLE_COMPLEX.<br>
<br>
It looks like something is wrong with the "size" of the complex
variables, doesn't it?<br>
I hope these indications are helpful...<br>
<br>
Regards,<br>
Antonin<br>
<br>
</tt></big>
</body>
<br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</html>