Re: [OMPI users] fortran program with integer kind=8 using openmpi

2012-07-01 Thread George Bosilca
Based on the sizes reported by configure (in the opal_config.h file), we map 
the Fortran types to C types at runtime. Thus, if there is an identical C type 
(and this is the case for all integers), all Fortan types will have as a 
backend the corresponding int type.

Can you send your opal_config.h and config.log please.

  george.

On Jun 30, 2012, at 00:15 , William Au wrote:

> My concern is how do the C side know fortran integer using 8 bytes?
> My valgrind check show something like:
> 
> ==8482== Invalid read of size 8
> ==8482==at 0x5F4A50E: ompi_op_base_minloc_2integer 
> (op_base_functions.c:631)
> ==8482==by 0xBF70DD1: ompi_coll_tuned_allreduce_intra_recursivedoubling 
> (op.h:498)
> ==8482==by 0x5F031CB: PMPI_Allreduce (pallreduce.c:105)
> ==8482==by 0x62E2F22: PMPI_ALLREDUCE (pallreduce_f.c:77)
> ==8482==by 0x5C8934: mumps_276_ (mumps_part9.F:4667)
> ==8482==by 0x54D89A: dmumps_ (dmumps_part1.F:157)
> ==8482==by 0x43D358: dmumps_f77_ (dmumps_part3.F:6651)
> ==8482==by 0x41420C: dmumps_c (mumps_c.c:422)
> ==8482==by 0x412CB4: main (my_cExample_client.c:80)
> ==8482==  Address 0x7369608 is 0 bytes after a block of size 8 alloc'd
> ==8482==at 0x4A0610C: malloc (vg_replace_malloc.c:195)
> ==8482==by 0xBF709B9: ompi_coll_tuned_allreduce_intra_recursivedoubling 
> (coll_tuned_allreduce.c:158)
> ==8482==by 0x5F031CB: PMPI_Allreduce (pallreduce.c:105)
> ==8482==by 0x62E2F22: PMPI_ALLREDUCE (pallreduce_f.c:77)
> ==8482==by 0x5C8934: mumps_276_ (mumps_part9.F:4667)
> ==8482==by 0x54D89A: dmumps_ (dmumps_part1.F:157)
> ==8482==by 0x43D358: dmumps_f77_ (dmumps_part3.F:6651)
> ==8482==by 0x41420C: dmumps_c (mumps_c.c:422)
> ==8482==by 0x412CB4: main (my_cExample_client.c:80)
> 
> 
> The fortran side:
> 
>   INTEGER IN( 2 ), OUT( 2 )
>   
>   CALL MPI_ALLREDUCE( IN, OUT, 1, MPI_2INTEGER, MPI_MINLOC,
>  &COMM, IERR)
> 
> The compiler options will take care of IN be INTEGER*8, but will
> it do the same for MPI_2INTEGER in the C side
> 
> Thanks.
> 
> Regards,
> 
> William
> 
> 
> 
> Date: Fri, 29 Jun 2012 07:03:18 -0400
> From: Jeff Squyres 
> Subject: Re: [OMPI users] fortran program with integer kind=8 using
>   openmpi
> To: , Open MPI Users 
> Message-ID: <6ffea644-3f39-4b6e-add6-3721f4855...@cisco.com>
> Content-Type: text/plain; charset=iso-8859-1
>  
> On Jun 28, 2012, at 8:37 PM, David Warren wrote:
>  
> > You should not have to recompile openmpi, but you do have to use the 
> > correct type. You can check the size of integers in your fortrana nd use 
> > MPI_INTEGER4 or MPI_INTEGER8 depending on what you get.
>  
> If you configure ompi with -fdefault-integer-8, then OMPI will assume that 
> Fortran integers are always 8 bytes, so be sure to also compile all of your 
> MPI applications the same way.  Indeed, you may want to configure OMPI with 
> something like:
>  
> ./configure FCFLAGS=-fdefault-integer-8 FFLAGS=-fdefault-integer-8 \
>--with-wrapper-fflags=-fdefault-integer-8 \
>--with-wrapper-fcflags=-fdefault-integer-8
>  
> This will add -fdefault-integer-8 to the mpif77 and mpif90 command lines 
> automatically so that you *can't* compile without that flag.
>  
> Be aware that 8-byte Fortran integers *should work* in Open MPI, but it is 
> probably not well tested.  You may well run into some issues; be sure to let 
> us know if you run into bugs.  Sending small test programs that show the 
> problem are usually the best way to help us identify/fix the precise problem.
>  
> > in gfortran use
> > integer i
> > if(sizeof(i) .eq. 8) then
> > mpi_int_type=MPI_INTEGER8
> > else
> > mpi_int_type=MPI_INTEGER4
> > endif
>  
> I don't think that this should be necessary -- as long as you configured OMPI 
> with the 8-byte-integer setting, then MPI_INTEGER should represent an 8 byte 
> integer.
>  
> -- 
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to: 
> http://www.cisco.com/web/about/doing_business/legal/cri/
>  
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users



Re: [OMPI users] Cannot build openmpi-1.6 on

2012-07-01 Thread John R. Cary

On 6/30/12 8:47 AM, Ralph Castain wrote:

Add --disable-vt to your configure line - if you don't need VampirTrace, just 
bypass the problem


Works.  Thanks.



On Jun 30, 2012, at 8:32 AM, John R. Cary wrote:


My system:

$ uname -a
Linux multipole.txcorp.com 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 
00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version
gcc (GCC) 4.6.3
Copyright (C) 2011

Configured with

'/scr_multipole/cary/vorpalall/builds/openmpi-1.6/configure' \
  --prefix=/scr_multipole/cary/contrib/openmpi-1.6-nodl \
  CC='/usr/local/contrib/bin/gcc' \
  CXX='/usr/local/contrib/bin/g++' \
  FC='/usr/local/contrib/bin/gfortran' \
  F77='/usr/local/contrib/bin/gfortran' \
  --enable-static \
  --with-pic \
  --disable-dlopen \
  --enable-mpirun-prefix-by-default \
--with-wrapper-ldflags='-Wl,-rpath,/scr_multipole/cary/contrib/openmpi-1.6-nodl/lib
 -Wl,-rpath,/usr/local/contrib/gcc-4.6.3/lib64'

fails at

make[10]: Entering directory 
`/scr_multipole/cary/vorpalall/builds/openmpi-1.6/nodl/ompi/contrib/vt/vt/extlib/otf/tools/otfmerge/mpi'
  CC otfmerge_mpi-handler.o
  CC otfmerge_mpi-otfmerge.o
  CCLD   otfmerge-mpi
/usr/bin/ld: cannot find -lmpi
collect2: ld returned 1 exit status



ThxJohn

___
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