Fair enough.

But be aware that if you are building MPICH with double-width Fortran types and 
single-width C types, you might want to verify that MPICH is actually working 
properly.

Open MPI is refusing to configure because for each Fortran type X, it looks for 
a corresponding C type Y.  If it can't find a correspondence, then it 
fails/aborts configure (i.e., it lets a human figure it out -- usually by 
ensuring that there are equivalent flags for the C/C++ and Fortran compilers).  
At least in Open MPI, having a C/Fortran type equivalence is necessary for 
reduction operations (because we do them in C).  I don't know if MPICH has this 
restriction or not.

In your case, Open MPI is failing to find a basic (single-width) C type that 
corresponds to the (double-width) Fortran type COMPLEX.  This may not matter 
for your specific application, but we tend to take an all-or-nothing approach 
to configuration/building (i.e., we won't knowingly build a half-functional 
Open MPI).

I hope that our rationale for this design choice at least makes sense.

Also, if you are compiling your application with double-width Fortran types but 
are compiling your application with single-width Fortran types (this is how the 
thread started), that's quite dangerous -- your MPI doesn't agree with your 
application on the size of Fortran types, and all types of unpredictable 
hilarity can/will ensure.

That's exactly why you were getting a 0 from MPI_WTIME() in Open MPI -- Open 
MPI was returning an 8 byte DOUBLE PRECISION, but your application was looking 
for a 16 byte DOUBLE PRECISION.

I can't tell from your replies, but I'm guessing you compiled MPICH with 
double-width Fortran types and single-width C types.  In this case, you should 
get correct values back from MPI_WTIME (because both MPI and your application 
use 16-byte DOUBLE PRECISIONS).  What is an open question is how MPICH treats 
reductions on Fortran types (i.e., whether they are done in C or Fortran), 
and/or whether it matters for your application.



> On Dec 20, 2016, at 5:51 AM, 🐋 Jan Hegewald <jan.hegew...@awi.de> wrote:
> 
> Hi Gilles,
> 
>> On 20 Dec 2016, at 05:31, Gilles Gouaillardet <gil...@rist.or.jp> wrote:
>> 
> 
>> btw, do you really want 32 bytes complex in Fortran ?
> 
> that is not for me to decide. I also do not want to change the default build 
> just because of the open-mpi flags.
> 
>> 
>> if yes, then you should use an other compiler (such as gcc/g++)
>> 
>> if not, then you can configure with FFLAGS='-fdefault-real-8 
>> -fdefault-double-8',
> 
> Thank you for the suggestion. open-mpi configures and compiles find now, but 
> running my program fails:
> 
>       An error occurred in MPI_Comm_size
>       reported by process [2925920257,6]
>       on communicator MPI_COMM_WORLD
>       MPI_ERR_COMM: invalid communicator
> 
> I will continue to use mpich at this point, as I do not have the time for now 
> to fiddle with the open-mpi configuration. I like open-mpi better, so maybe I 
> will invest more time to get it running next year.
> 
> Cheers and many thanks for all the suggestions,
> Jan
> _______________________________________________
> devel mailing list
> devel@lists.open-mpi.org
> https://rfd.newmexicoconsortium.org/mailman/listinfo/devel


-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to