Fortran on X86 : **2 on a complex*16 crashes


Topic author
joukj
Master
Posts: 224
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Fortran on X86 : **2 on a complex*16 crashes

Post by joukj » Tue Jun 13, 2023 7:42 am

Hi all

I found this, which is not to be expected:

Code: Select all

rumba-jj) f90/vers
VSI Fortran X8.5-0002 (GEM 50X2N) for X86 systems
rumba-jj) ty test.f90 
program test
  complex*16 x
  x =x**2
end
  13-JUN-2023 13:33:32
rumba-jj) f90 test
rumba-jj) link test
rumba-jj) run test
%SYSTEM-F-ACCVIO, access violation, reason mask=06, virtual address=000000000000
0002, PC=FFFF830008A491FB, PS=0000001B
%TRACE-F-TRACEBACK, symbolic stack dump follows
image     module    routine               line      rel PC           abs PC     
LIBOTS                                       0 00000000800021FB FFFF830008A491FB
DPML$SHR  DPML_CPOWI.C;1                #13088 0000000080072E93 FFFF830008C51E93
TEST  test.f90;33  TEST                      3 0000000000000045 0000000080000045
                                             0 FFFF8300071FBDC6 FFFF8300071FBDC6
DCL                                          0 000000008006741B 000000007ADFF41B
%TRACE-I-LINENUMBER, Leading '#' specifies a source file record number.
%TRACE-I-END, end of TRACE stack dump
rumba-jj)
Last edited by marty.stu on Tue Jun 13, 2023 7:45 am, edited 1 time in total.


Topic author
joukj
Master
Posts: 224
Joined: Thu Aug 27, 2020 5:50 am
Reputation: 0
Status: Offline

Re: Fortran on X86 : **2 on a complex*16 crashes

Post by joukj » Tue Jul 30, 2024 6:42 am

Is there some indication which functions do not work with complex*16? I tried the SQRT and SIN functions. They give the same result (except the number of decimals) for both single and double precision.


sergey_vorfolomeev
VSI Expert
Master
Posts: 106
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Fortran on X86 : **2 on a complex*16 crashes

Post by sergey_vorfolomeev » Tue Jul 30, 2024 7:08 am

All functions will work with complex*16 (you need fortran > X8.6), soon.

Code: Select all

ANCHOR> f90 CMPLX16
ANCHOR> link CMPLX16
ANCHOR> run CMPLX16
(1.10000002384186,2.20000004768372)  **2 =  (-3.63000015735626,4.84000020980835)
sin(  (1.10000002384186,2.20000004768372)  )=(4.07095376160951,2.02172562223619)
sqrt(  (1.10000002384186,2.20000004768372)  )=(1.33410547791463,0.824522529928663)
ANCHOR> type CMPLX16.F90
program test
  complex*16 x, y
  x = (1.1, 2.2)
  y = x**2
  print *, x, " **2 = ", y
  y = sin(x)
  print *, "sin( ", x, " )= ", y
  y = sqrt(x)
  print *, "sqrt( ", x, " )= ", y
end
ANCHOR>

Post Reply