There is a challenge here because there is no standard type in C
corresponding to REAL*16. Either the reduction operation needs to be
written in Fortran or MPICH needs to figure out the compiler-dependent
equivalent of REAL*16 that works in C. While GCC __float128 and Intel
_Quad might be equivalent, this is not a rigorous assumption.
I recommend that you write your own user-defined reduction for REAL*16 with
the reduction operation callback in Fortran.
Jeff
On Thu, Aug 9, 2018 at 2:31 AM, Jiancang Zhuang <zhuangjc(a)ism.ac.jp> wrote:
> I have found that the fortran version mpi_reduce does not work for
> real*18. This can be shown by the following program. I have not test the C
> version of mpi_reduce.
>
>
> c-----------------------Fortran code begins -----------------------------
> implicit real*8 (a-h, o-z)
> include 'mpif.h'
> real*16 h1, h
>
>
> call mpi_init(ierr)
> call mpi_comm_size(mpi_comm_world, nprocs, ierr)
> call mpi_comm_rank(mpi_comm_world, myrank, ierr)
>
>
> h1 = (myrank+4) *2.00000000000000
> write(*,'(''before reduce --'', i4,2f12.8)')myrank, h1,h
>
>
> call mpi_reduce(h1,h,1,mpi_long_double,mpi_sum,0,
> & mpi_comm_world,ierr)
> write(*,'(''after reduce --'',i4,2f12.8)')myrank, h1,h
>
> call mpi_bcast(h,1,mpi_long_double,0,
> & mpi_comm_world,ierr)
>
> write(*,'(''bcastvalue -- '',i4,2f12.8)')myrank, h1,h
>
> call mpi_finalize(ierr)
> end
>
> c-----------------------Fortran code begins -----------------------------
>
>
> $ mpif77 a.f -o a.out
> $ mpirun -np 3 ./a.out
> before reduce -- 1 10.00000000 0.00000000
> after reduce -- 1 10.00000000 0.00000000
> before reduce -- 2 12.00000000 0.00000000
> before reduce -- 0 8.00000000 0.00000000
> after reduce -- 2 12.00000000 0.00000000
> after reduce -- 0 8.00000000 8.00000000
> bcastvalue -- 0 8.00000000 8.00000000
> bcastvalue -- 1 10.00000000 8.00000000
> bcastvalue -- 2 12.00000000 8.00000000
>
>
>
> _______________________________________________
> discuss mailing list discuss(a)mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
>
--
Jeff Hammond
jeff.science(a)gmail.com
http://jeffhammond.github.io/
_______________________________________________
discuss mailing list discuss(a)mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
I have found that the fortran version mpi_reduce does not work for real*18.
This can be shown by the following program. I have not test the C version
of mpi_reduce.
c-----------------------Fortran code begins -----------------------------
implicit real*8 (a-h, o-z)
include 'mpif.h'
real*16 h1, h
call mpi_init(ierr)
call mpi_comm_size(mpi_comm_world, nprocs, ierr)
call mpi_comm_rank(mpi_comm_world, myrank, ierr)
h1 = (myrank+4) *2.00000000000000
write(*,'(''before reduce --'', i4,2f12.8)')myrank, h1,h
call mpi_reduce(h1,h,1,mpi_long_double,mpi_sum,0,
& mpi_comm_world,ierr)
write(*,'(''after reduce --'',i4,2f12.8)')myrank, h1,h
call mpi_bcast(h,1,mpi_long_double,0,
& mpi_comm_world,ierr)
write(*,'(''bcastvalue -- '',i4,2f12.8)')myrank, h1,h
call mpi_finalize(ierr)
end
c-----------------------Fortran code begins -----------------------------
$ mpif77 a.f -o a.out
$ mpirun -np 3 ./a.out
before reduce -- 1 10.00000000 0.00000000
after reduce -- 1 10.00000000 0.00000000
before reduce -- 2 12.00000000 0.00000000
before reduce -- 0 8.00000000 0.00000000
after reduce -- 2 12.00000000 0.00000000
after reduce -- 0 8.00000000 8.00000000
bcastvalue -- 0 8.00000000 8.00000000
bcastvalue -- 1 10.00000000 8.00000000
bcastvalue -- 2 12.00000000 8.00000000
_______________________________________________
discuss mailing list discuss(a)mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
Hi Min,
Thank you for your response to my question. I will try using mpich-3.3b3. I downloaded it today and it appears to have built successfully using Sun Studio 12.5, so that is a good start. I will be working with it in the coming weeks.
Thanks again,
--Mike
-----Original Message-----
From: discuss-request(a)mpich.org <discuss-request(a)mpich.org>
Sent: Tuesday, July 31, 2018 12:00 PM
To: discuss(a)mpich.org
Subject: discuss Digest, Vol 69, Issue 16
Send discuss mailing list submissions to
discuss(a)mpich.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.mpich.org/mailman/listinfo/discuss
or, via email, send a message with subject or body 'help' to
discuss-request(a)mpich.org
You can reach the person managing the list at
discuss-owner(a)mpich.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of discuss digest..."
Today's Topics:
1. Re: Building MPICH 3.2.1 with Sun Studio 12.5
(Michael Pulverenti)
2. Re: Building MPICH 3.2.1 with Sun Studio 12.5 (Min Si)
----------------------------------------------------------------------
Message: 1
Date: Tue, 31 Jul 2018 14:01:23 +0000
From: Michael Pulverenti <Michael.Pulverenti(a)roguewave.com>
To: "discuss(a)mpich.org" <discuss(a)mpich.org>
Subject: Re: [mpich-discuss] Building MPICH 3.2.1 with Sun Studio 12.5
Message-ID:
<SN6PR02MB4175902082C0430EA41C3CE48D2E0(a)SN6PR02MB4175.namprd02.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I did some more digging at it appears the call to the unresolved function MPIR_Memcpy was introduced in 2016 by Changeset https://trac.mpich.org/projects/mpich/changeset/c3bb71e72f88034ce7ebcc68144….
Can anyone confirm they have built MPICH 3.2.1 on SPARC with Sun Studio, and if so, if/how they resolved the call to MPIR_Memcpy that appears in src/mpid/ch3/channels/nemesis/src/ch3_progress.c?
Thanks for any help.
--Mike
-----Original Message-----
From: discuss-request(a)mpich.org <discuss-request(a)mpich.org>
Sent: Tuesday, July 24, 2018 12:00 PM
To: discuss(a)mpich.org
Subject: discuss Digest, Vol 69, Issue 13
Send discuss mailing list submissions to
discuss(a)mpich.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.mpich.org/mailman/listinfo/discuss
or, via email, send a message with subject or body 'help' to
discuss-request(a)mpich.org
You can reach the person managing the list at
discuss-owner(a)mpich.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of discuss digest..."
Today's Topics:
1. Building MPICH 3.2.1 with Sun Studio 12.5 (Michael Pulverenti)
----------------------------------------------------------------------
Message: 1
Date: Tue, 24 Jul 2018 13:30:11 +0000
From: Michael Pulverenti <Michael.Pulverenti(a)roguewave.com>
To: "discuss(a)mpich.org" <discuss(a)mpich.org>
Subject: [mpich-discuss] Building MPICH 3.2.1 with Sun Studio 12.5
Message-ID:
<SN6PR02MB417551F2DB6679E20440811C8D550(a)SN6PR02MB4175.namprd02.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I'm having trouble building MPICH 3.2.1 and I'm hoping for some help resolving the problem(s). Perhaps someone has seen this before.
The environment is:
% uname -a
SunOS spc64sol113ci 5.11 11.3 sun4v sparc sun4v % f95 -V
f90: Studio 12.5 Fortran 95 8.8 SunOS_sparc 2016/05/31
The config command I used is:
% ./configure --prefix=/export/home4/erhome/jenkins/michaelp/ports/fnl/sol113/mpi/build_area/Mikes_build CC=cc CXX=CC F77=f77 FC=f95 CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 LDFLAGS=-m64
Looking at the output from running mpich-3.2.1/make, it appears the problem is an unresolved symbol MPIR_Memcpy:
CCLD src/env/mpichversion
Undefined first referenced
symbol in file
MPIR_Memcpy lib/.libs/libmpi.a(lib_libmpi_la-ch3_progress.o)
ld: fatal: symbol referencing errors
*** Error code 2
The following command caused the error:
echo " CCLD " src/env/mpichversion;/bin/sh ./libtool --silent --tag=CC --mode=link cc -m64 -O2 -static -m64 -o src/env/mpichversion src/env/mpichversion.o lib/libmpi.la -lnsl -lsocket -lpthread
make: Fatal error: Command failed for target `src/env/mpichversion'
I can provide the full output from my config and make commands if that helps, but I didn't want to overload my first email to this mail group.
Thanks for any help you are able to provide, --Mike