PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

real*16

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Jerry Orosz



Joined: 02 Jan 2008
Posts: 20
Location: San Diego

PostPosted: Fri Apr 25, 2014 9:02 am    Post subject: real*16 Reply with quote

I have received some code that uses quadruple precision in some parts:

Code:
      SUBROUTINE GAUSSQ(NS,C,B,NSD,A)
      IMPLICIT REAL*16 (A-H,O-Z)
      DIMENSION C(NS),B(NS),A(NSD,NS)
      IF (NS.EQ.2) THEN
         C(1)=  .211324865405187117745425609749Q+00
         C(2)=  .788675134594812882254574390251Q+00
         B(1) =  0.5Q+00
         A(1,1)=  .250000000000000000000000000000Q+00
         A(1,2)= -.386751345948128822545743902510Q-01
         A(2,1)=  .538675134594812882254574390251Q+00
         A(2,2)=  .250000000000000000000000000000Q+00
      END IF

and so on. However, I can't compile this code with pgf77, pgf90, etc. I get an error

PGFTN-W-0031-Illegal data type length specifier for real

Is there a way to get this to compile and run?
Back to top
View user's profile
cparrott



Joined: 02 May 2011
Posts: 146

PostPosted: Fri Apr 25, 2014 1:51 pm    Post subject: Reply with quote

Jerry,

REAL*16 is not currently supported with PGI Fortran.

Best regards,

+chris
Back to top
View user's profile
Jerry Orosz



Joined: 02 Jan 2008
Posts: 20
Location: San Diego

PostPosted: Wed Apr 30, 2014 6:02 pm    Post subject: Reply with quote

cparrott wrote:
Jerry,

REAL*16 is not currently supported with PGI Fortran.

Best regards,

+chris


Could this support be added to a future release? real*16 capabilities, even if it is "slow" because of software implementation, could be very useful for a number of applications.
Back to top
View user's profile
frnkyl004



Joined: 06 Dec 2011
Posts: 50

PostPosted: Thu May 01, 2014 2:00 am    Post subject: Reply with quote

Hi Jerry,

Not sure if this will help, but there are a few Variable- or Multiple- or High-Precision Arithmetic libraries/modules for FORTRAN. I've never used any of them (I've been meaning to, but haven't found the time), so I can't say much about them. Two examples are http://crd-legacy.lbl.gov/~dhbailey/mpdist/ and http://myweb.lmu.edu/dmsmith/fmlib.html. If you do land up using something like these, it would be great if you could share some of your experiences.

Hope this helps.

Cheers,
Kyle
Back to top
View user's profile
Malcolm M.Bibby55695



Joined: 05 Feb 2014
Posts: 23

PostPosted: Thu May 01, 2014 10:29 am    Post subject: DD Reply with quote

Jerry, you could try using double-double, DD, The mantissa uses two double words, although the exponent is still limited to +/- E308. There is a paper on using it here in the PGI library - do a search.

Malcolm
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group