From 03d5d4dff45753f50de26f64c993cb8bddd00bbc Mon Sep 17 00:00:00 2001 From: Klaus Hallatschek Date: Sat, 23 Nov 2024 10:11:50 +0100 Subject: [PATCH] ifdef PGI -> ifdef LANDAU_PREC16 Higher precision mode for comparison purposes --- cgyro/src/cgyro_init_collision_landau.F90 | 3 --- shared/landau/landau.F90 | 10 ++++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cgyro/src/cgyro_init_collision_landau.F90 b/cgyro/src/cgyro_init_collision_landau.F90 index ff58c8e72..49f8b4447 100644 --- a/cgyro/src/cgyro_init_collision_landau.F90 +++ b/cgyro/src/cgyro_init_collision_landau.F90 @@ -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 diff --git a/shared/landau/landau.F90 b/shared/landau/landau.F90 index a305eed95..c4a6fbf42 100644 --- a/shared/landau/landau.F90 +++ b/shared/landau/landau.F90 @@ -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 @@ -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