public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: "Jorge D'Elia" <jdelia@intec.unl.edu.ar>
Cc: Gfortran List <fortran@gcc.gnu.org>
Subject: Re: coarrays using extended precision (80 bits) ?
Date: Sat, 22 Apr 2023 06:07:33 -0700	[thread overview]
Message-ID: <ZEPcFa9PIlBBB6ZI@troutmask.apl.washington.edu> (raw)
In-Reply-To: <752042381.292.1682160372932.JavaMail.zimbra@intec.unl.edu.ar>

On Sat, Apr 22, 2023 at 07:46:12AM -0300, Jorge D'Elia wrote:
> > On Fri, Apr 21, 2023 at 08:33:31AM -0300, Jorge D'Elia wrote:
> >> 
> >> One question: is there any chance of encoding with coarrays using
> >> extended precision (80 bits) at least inside a multicore computer?
> >> (as if to simplify a bit).
> >> 
> >> To date, the possibility of using double precision (64 bits) or
> >> extended precision (80 bits) is an alternative in our production
> >> code, but sometimes we would like to do computations in
> >> 80 bits and, in certain parts, there are coarrays.
> >> We have validated even in quadruple precision (128 bits), using
> >> ifort although, as is well known, the CPU times are largely
> >> excessive.
> >> 
> > Well, I just installed OpenCoarray and downloaded a pi/4
> > monte carlo code that Thomas wrote using REAL.  I changed
> > everything to use REAL(10).  Compiled and executed without
> > a problem.  I also tested REAL(16), which worked although
> > it's painfully slow due to software floating point.  So,
> > I guess I don't understand what you're asking?
> > 
> 
> Thanks a lot for your answer. Now:
> 
> Since we were noticing numerical issues in certain cases in our code, 
> we moved on to a toy model. The toy model is based on a standard LU 
> factorization with a dense block-distributed system matrix. So:
> 
> 1/2) When we use gfortran+opencoarrays:
> The verification computation of the numerical solution of the system 
> of equations is OK if we use precision either (single, double, extended, 
> quadruple) when the number Z of images is equal to 1. It is also OK if 
> we use precision either (single, double) when Z>1. But it fails if we 
> use precision either (extended, quadruple) when Z>1.
> 
> 2/2) When we use ifort:
> The verification computation of the numerical solution of the system 
> of equations is OK if we use precision either (single, double, quadruple) 
> either when Z=1 or when Z>1. We cannot check it in extended precision 
> because ifort does not support the use of extended precision.
> 
> As a first attempt to explain the discrepancy, we assume that those 
> verification failures in the solution could be attributed to 
> gfortran+opencoarrays not quite correctly transmitting numbers in 
> extended precision, because opencoarrays relies on some standard MPI 
> for single and double precision (it would be like this?).

This might be a bug in OC or gfortran or both.  It is unclear if
there is any further work being done on OC.  If the LU toy code
is short enough, you might try compiling it with -fcoarray=lib
-fdump-tree-original to see if there are any obvious function
argument mismatches in the underlying code.

I looked more closely at Thomas's code.  It was passing
integer arrays between images while the images internally
used REAL(10).  If it's an argument passing issues with
REAL(10), his code would not expose it.

-- 
Steve

  reply	other threads:[~2023-04-22 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21 11:33 Jorge D'Elia
2023-04-21 22:53 ` Steve Kargl
2023-04-22 10:46   ` Jorge D'Elia
2023-04-22 13:07     ` Steve Kargl [this message]
2023-04-22 23:26       ` Jorge D'Elia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZEPcFa9PIlBBB6ZI@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=jdelia@intec.unl.edu.ar \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).