0

Relevant code:

Parts(3, indexcount) = push(pi/2, 0.0d0,0.0d0,0.0d0, Parts(1, indexcount),Parts(2, indexcount), 0.01d0, 20000.0d0)

 real(16) function push(phaseinit, yinit, pxinit, pyinit, a0, R, dt, Time_total)
implicit none
real(16) :: phaseinit, yinit, pxinit, pyinit, gammamax, I0, R_star, k_ratio, Vph

etc...

When compiling:

Error: Type mismatch in argument 'yinit' at (1); passed REAL(8) to REAL(16)

I tried to find online resources detailing how exactly to properly initialize a numerical value for a real(16), but I couldn't find anything. This seemingly allows me to initialize real(8), but I don't know what the corresponding procedure is for real(16).

francescalus
  • 30,576
  • 16
  • 61
  • 96
  • That is, `0._16` is a real literal constant of kind 16. Other questions, answers, comments will address the fact that you should be careful assuming that 16. – francescalus Jul 19 '18 at 21:41
  • Almost any Fortran related source address this issue. You can search online for _fortran literal kind parameter_ . – Rodrigo Rodrigues Jul 19 '18 at 21:43
  • My preference would be to use the real intrinsic, although this does not work with all values. real(0,16), real(20000.0d0,16) and real(1,16)/100 all work, but real(0.01d0,16) does not. For me, it provides some documentation of what is being required. – johncampbell Jul 22 '18 at 11:05

0 Answers0