Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-28 Thread Jeff Squyres
Something odd is definitely going on here.  I'm able to replicate your  
problem with the intel compiler suite, but I can't quite figure out  
why -- it all works properly if I convert the app to C (and still use  
the MPI_REAL16 datatype with long double data).


George and I are investigating; I've opened a ticket on this: 
https://svn.open-mpi.org/trac/ompi/ticket/1603


On Oct 28, 2008, at 6:35 AM, Julien Devriendt wrote:



Yes point to point communication is OK with quad prec. and one-way  
reductions as well. I also tried my sample code on another platform  
(which sports AMD opterons instead of Intel CPUs) with the same  
compilers, and get the same *wrong* results with the call to  
MPI_ALLREDUCE in quad prec, so it does not seem to be a machine bug.  
Also altering a bit my sample code so as to replace MPI_SUM by  
MPI_MAX in the call to MPI_ALLREDUCE works perfectly well in quad  
prec !!!



On Tue, 28 Oct 2008, Terry Frankcombe wrote:


I assume you've confirmed that point to point communication works
happily with quad prec on your machine?  How about one-way  
reductions?



On Tue, 2008-10-28 at 08:47 +, Julien Devriendt wrote:

Thanks for your suggestions.
I tried them all (declaring my variables as REAL*16 or REAL(16))  
to no

avail. I still get the wrong answer with my call to MPI_ALLREDUCE.

I think the KINDs are compiler dependent.  For Sun Studio  
Fortran, REAL*16
and REAL(16) are the same thing.  For Intel, maybe it's  
different.  I don't

know.  Try running this program:

double precision xDP
real(16) x16
real*16 xSTAR16
write(6,*) kind(xDP), kind(x16), kind(xSTAR16), kind(1.0_16)
end

and checking if the output matches your expectations.

Jeff Squyres wrote:

I dabble in Fortran but am not an expert -- is REAL(kind=16) the  
same  as
REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100%  
sure  that

REAL(kind=16) is the same thing...?

On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:


Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real  
and

MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double
precision
real works fine.
My version of openmpi is 1.2.7 and it has been compiled with  
ifort  v10.1

and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

  implicit none

  include "mpif.h"

  real(kind=16) :: vartored(8),vartemp(8)
  integer   :: nn,nslaves,my_index
  integer   :: mpierror

  call MPI_INIT(mpierror)
  call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
  call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

  nn   = 8
  vartored = 1.0_16
  vartemp  = 0.0_16
  print*,"P1 ",my_index,vartored
  call  MPI_ALLREDUCE
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)
  print*,"P2 ",my_index,vartemp

  stop

end program test_quad

Any idea why this happens?



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Jeff Squyres
Cisco Systems



Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-28 Thread Julien Devriendt


Yes point to point communication is OK with quad prec. and one-way 
reductions as well. I also tried my sample code on another platform 
(which sports AMD opterons instead of Intel CPUs) with the same compilers, 
and get the same *wrong* results with the call to MPI_ALLREDUCE in quad 
prec, so it does not seem to be a machine bug. Also altering a 
bit my sample code so as to replace MPI_SUM by MPI_MAX in the call to 
MPI_ALLREDUCE works perfectly well in quad prec !!!



On Tue, 28 Oct 2008, Terry Frankcombe wrote:


I assume you've confirmed that point to point communication works
happily with quad prec on your machine?  How about one-way reductions?


On Tue, 2008-10-28 at 08:47 +, Julien Devriendt wrote:

Thanks for your suggestions.
I tried them all (declaring my variables as REAL*16 or REAL(16)) to no
avail. I still get the wrong answer with my call to MPI_ALLREDUCE.


I think the KINDs are compiler dependent.  For Sun Studio Fortran, REAL*16
and REAL(16) are the same thing.  For Intel, maybe it's different.  I don't
know.  Try running this program:

double precision xDP
real(16) x16
real*16 xSTAR16
write(6,*) kind(xDP), kind(x16), kind(xSTAR16), kind(1.0_16)
end

and checking if the output matches your expectations.

Jeff Squyres wrote:


I dabble in Fortran but am not an expert -- is REAL(kind=16) the same  as
REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure  that
REAL(kind=16) is the same thing...?

On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:


Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double
precision
real works fine.
My version of openmpi is 1.2.7 and it has been compiled with ifort  v10.1
and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

   implicit none

   include "mpif.h"

   real(kind=16) :: vartored(8),vartemp(8)
   integer   :: nn,nslaves,my_index
   integer   :: mpierror

   call MPI_INIT(mpierror)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

   nn   = 8
   vartored = 1.0_16
   vartemp  = 0.0_16
   print*,"P1 ",my_index,vartored
   call  MPI_ALLREDUCE
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)
   print*,"P2 ",my_index,vartemp

   stop

end program test_quad

Any idea why this happens?



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-28 Thread Terry Frankcombe
I assume you've confirmed that point to point communication works
happily with quad prec on your machine?  How about one-way reductions?


On Tue, 2008-10-28 at 08:47 +, Julien Devriendt wrote:
> Thanks for your suggestions.
> I tried them all (declaring my variables as REAL*16 or REAL(16)) to no 
> avail. I still get the wrong answer with my call to MPI_ALLREDUCE.
> 
> > I think the KINDs are compiler dependent.  For Sun Studio Fortran, REAL*16 
> > and REAL(16) are the same thing.  For Intel, maybe it's different.  I don't 
> > know.  Try running this program:
> >
> > double precision xDP
> > real(16) x16
> > real*16 xSTAR16
> > write(6,*) kind(xDP), kind(x16), kind(xSTAR16), kind(1.0_16)
> > end
> >
> > and checking if the output matches your expectations.
> >
> > Jeff Squyres wrote:
> >
> >> I dabble in Fortran but am not an expert -- is REAL(kind=16) the same  as 
> >> REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure  that 
> >> REAL(kind=16) is the same thing...?
> >> 
> >> On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:
> >> 
> >>> Hi,
> >>> 
> >>> I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
> >>> MPI_SUM and open mpi does not give me the correct answer (vartemp
> >>> is equal to vartored instead of 2*vartored). Switching to double 
> >>> precision
> >>> real works fine.
> >>> My version of openmpi is 1.2.7 and it has been compiled with ifort  v10.1
> >>> and icc/icpc at installation
> >>> 
> >>> Here's the simple f90 code which fails:
> >>> 
> >>> program test_quad
> >>> 
> >>>implicit none
> >>> 
> >>>include "mpif.h"
> >>> 
> >>>real(kind=16) :: vartored(8),vartemp(8)
> >>>integer   :: nn,nslaves,my_index
> >>>integer   :: mpierror
> >>> 
> >>>call MPI_INIT(mpierror)
> >>>call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
> >>>call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)
> >>> 
> >>>nn   = 8
> >>>vartored = 1.0_16
> >>>vartemp  = 0.0_16
> >>>print*,"P1 ",my_index,vartored
> >>>call  MPI_ALLREDUCE 
> >>> (vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)
> >>>print*,"P2 ",my_index,vartemp
> >>> 
> >>>stop
> >>> 
> >>> end program test_quad
> >>> 
> >>> Any idea why this happens?
> >> 
> > ___
> > users mailing list
> > us...@open-mpi.org
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
> >
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-28 Thread Julien Devriendt


Sorry, forgot to mention that running your sample program with ifort 
produces the expected result:


8 16 16 16



Thanks for your suggestions.
I tried them all (declaring my variables as REAL*16 or REAL(16)) to no avail. 
I still get the wrong answer with my call to MPI_ALLREDUCE.


I think the KINDs are compiler dependent.  For Sun Studio Fortran, REAL*16 
and REAL(16) are the same thing.  For Intel, maybe it's different.  I don't 
know.  Try running this program:


double precision xDP
real(16) x16
real*16 xSTAR16
write(6,*) kind(xDP), kind(x16), kind(xSTAR16), kind(1.0_16)
end

and checking if the output matches your expectations.

Jeff Squyres wrote:

I dabble in Fortran but am not an expert -- is REAL(kind=16) the same  as 
REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure  that 
REAL(kind=16) is the same thing...?


On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:


Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double 
precision

real works fine.
My version of openmpi is 1.2.7 and it has been compiled with ifort  v10.1
and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

   implicit none

   include "mpif.h"

   real(kind=16) :: vartored(8),vartemp(8)
   integer   :: nn,nslaves,my_index
   integer   :: mpierror

   call MPI_INIT(mpierror)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

   nn   = 8
   vartored = 1.0_16
   vartemp  = 0.0_16
   print*,"P1 ",my_index,vartored
   call  MPI_ALLREDUCE 
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)

   print*,"P2 ",my_index,vartemp

   stop

end program test_quad

Any idea why this happens?



___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-28 Thread Julien Devriendt
Yes it is: REAL(kind=16) = REAL*16 = 16 byte REAL in fortran, or a 
long double in C that is why I thought MPI_REAL16 should work.


On Mon, 27 Oct 2008, Jeff Squyres wrote:

I dabble in Fortran but am not an expert -- is REAL(kind=16) the same as 
REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure that 
REAL(kind=16) is the same thing...?



On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:



Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double precision
real works fine.
My version of openmpi is 1.2.7 and it has been compiled with ifort v10.1
and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

   implicit none

   include "mpif.h"


   real(kind=16) :: vartored(8),vartemp(8)
   integer   :: nn,nslaves,my_index
   integer   :: mpierror


   call MPI_INIT(mpierror)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

   nn   = 8
   vartored = 1.0_16
   vartemp  = 0.0_16
   print*,"P1 ",my_index,vartored
   call MPI_ALLREDUCE 
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)

   print*,"P2 ",my_index,vartemp

   stop

end program test_quad

Any idea why this happens?

Many thanks in advance!

J.
___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Jeff Squyres
Cisco Systems

___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-27 Thread Eugene Loh
I think the KINDs are compiler dependent.  For Sun Studio Fortran, 
REAL*16 and REAL(16) are the same thing.  For Intel, maybe it's 
different.  I don't know.  Try running this program:


double precision xDP
real(16) x16
real*16 xSTAR16
write(6,*) kind(xDP), kind(x16), kind(xSTAR16), kind(1.0_16)
end

and checking if the output matches your expectations.

Jeff Squyres wrote:

I dabble in Fortran but am not an expert -- is REAL(kind=16) the same  
as REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure  
that REAL(kind=16) is the same thing...?


On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:


Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double  
precision

real works fine.
My version of openmpi is 1.2.7 and it has been compiled with ifort  
v10.1

and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

   implicit none

   include "mpif.h"

   real(kind=16) :: vartored(8),vartemp(8)
   integer   :: nn,nslaves,my_index
   integer   :: mpierror

   call MPI_INIT(mpierror)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

   nn   = 8
   vartored = 1.0_16
   vartemp  = 0.0_16
   print*,"P1 ",my_index,vartored
   call  MPI_ALLREDUCE 
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)

   print*,"P2 ",my_index,vartemp

   stop

end program test_quad

Any idea why this happens?




Re: [OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-27 Thread Jeff Squyres
I dabble in Fortran but am not an expert -- is REAL(kind=16) the same  
as REAL*16?  MPI_REAL16 should be a 16 byte REAL; I'm not 100% sure  
that REAL(kind=16) is the same thing...?



On Oct 23, 2008, at 7:37 AM, Julien Devriendt wrote:



Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double  
precision

real works fine.
My version of openmpi is 1.2.7 and it has been compiled with ifort  
v10.1

and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

   implicit none

   include "mpif.h"


   real(kind=16) :: vartored(8),vartemp(8)
   integer   :: nn,nslaves,my_index
   integer   :: mpierror


   call MPI_INIT(mpierror)
   call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
   call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

   nn   = 8
   vartored = 1.0_16
   vartemp  = 0.0_16
   print*,"P1 ",my_index,vartored
   call  
MPI_ALLREDUCE 
(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)

   print*,"P2 ",my_index,vartemp

   stop

end program test_quad

Any idea why this happens?

Many thanks in advance!

J.
___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Jeff Squyres
Cisco Systems



[OMPI users] MPI_SUM and MPI_REAL16 with MPI_ALLREDUCE in fortran90

2008-10-23 Thread Julien Devriendt


Hi,

I'm trying to do an MPI_ALLREDUCE with quadruple precision real and 
MPI_SUM and open mpi does not give me the correct answer (vartemp
is equal to vartored instead of 2*vartored). Switching to double precision 
real works fine.

My version of openmpi is 1.2.7 and it has been compiled with ifort v10.1
and icc/icpc at installation

Here's the simple f90 code which fails:

program test_quad

  implicit none

  include "mpif.h"


  real(kind=16) :: vartored(8),vartemp(8)
  integer   :: nn,nslaves,my_index
  integer   :: mpierror


  call MPI_INIT(mpierror)
  call MPI_COMM_SIZE(MPI_COMM_WORLD,nslaves,mpierror)
  call MPI_COMM_RANK(MPI_COMM_WORLD,my_index,mpierror)

  nn   = 8
  vartored = 1.0_16
  vartemp  = 0.0_16
  print*,"P1 ",my_index,vartored
  call 
MPI_ALLREDUCE(vartored,vartemp,nn,MPI_REAL16,MPI_SUM,MPI_COMM_WORLD,mpierror)
  print*,"P2 ",my_index,vartemp

  stop

end program test_quad

Any idea why this happens?

Many thanks in advance!

J.