Skip to content

Commit

Permalink
ifdef PGI -> ifdef LANDAU_PREC16
Browse files Browse the repository at this point in the history
Higher precision mode for comparison purposes
  • Loading branch information
quickfly committed Nov 23, 2024
1 parent e7ff35e commit 03d5d4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions cgyro/src/cgyro_init_collision_landau.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ subroutine cgyro_init_landau()
if (i_proc==0) print 1,'WARNING: dens_rot not yet implemented!!'
if (i_proc==0) print 1,'WARNING: nu_global not yet implemented!!'
if (i_proc==0 .and. collision_test_mode==1) print 1,'collision_test_mode==1, comparing ...'
#ifdef __PGI
if (i_proc==0) print 1,'WARNING: precision loss in landau.F90 - can''t use quad precision in PGI!!'
#endif
if (i_proc==0 .and. maxval(abs(temp(1:n_species)-temp(1)))/=0) then
print 1,'Warning: Landau not yet working for different species temperatures!!'
end if
Expand Down
10 changes: 6 additions & 4 deletions shared/landau/landau.F90
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
! gfortran -march=native -O3 -fno-stack-arrays -fimplicit-none -fdefault-real-8 landau.F90 -c
!intel:
!ifort -stand f15 -warn all -march=native -O3 -heap-arrays 10 -implicitnone -real-size 64 landau.F90 -c
#ifndef __PGI
!can't use quad precision with frumpy pgi compiler

#ifdef LANDAU_PREC16
!at least in the past couldn't use quad precision with frumpy pgi compiler
!for comparison purposes
#define HIREAL real(16)
#define HRS _16
#else
#define HIREAL real
#define HRS
#endif

module landau
HIREAL, parameter,private :: pi1=atan(1.HRS)*4
! real, parameter :: intnorm=pi1**(-1.5)*4*pi1
Expand Down Expand Up @@ -85,14 +88,13 @@ subroutine gentestkernel(n,a1,b1,c1,xmax,beta,gp,gw,ngauss,lor_int,dif_int,addcu
addcutoff1=.true.
if (present(addcutoff)) addcutoff1=addcutoff

#ifndef __PGI
2 format (A,3G25.16)

if (verbose>2) then
print 2,'1,lo,hi',fct1lo(xmaxx),fct1hi(xmaxx),fct1(xmaxx)
print 2,'2,lo,hi',fct2lo(xmaxx),fct2hi(xmaxx),fct2(xmaxx)
end if
#endif

! lor_int and dif_int are symmetric in i,j
! t1t2_int is not symmetric (but not antisymmetric.)
! The first index is in that case the output index
Expand Down

0 comments on commit 03d5d4d

Please sign in to comment.