Skip to content

Commit

Permalink
Corrected an OpenMP directive and added an Intel compiler flag that d…
Browse files Browse the repository at this point in the history
…isables optimizations changing floating point results.
  • Loading branch information
matsbn committed May 3, 2021
1 parent f14423e commit 9d778bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fuk95/mod_fuk95.F90
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ subroutine ictsz_fuk95

! Set layer velocity.
call xctilr(z, 1, kk + 1, 1, 1, halo_ps)
!$omp parallel do private(k, l, i, zm)
!$omp parallel do private(k, l, i, x, zm)
do j = 1, jj
do k = 1, kk - 1
do l = 1, isv(j)
Expand Down
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ elif fcc.get_id() == 'intel'
'-init=snan,arrays', '-fpe0','-ftrapuv'],
language: 'fortran')
endif
if get_option('buildtype') == 'release'
add_project_arguments('-fp-model precise'.split(),language: 'fortran')
endif
if get_option('processors') == 1 and get_option('grid') == 'channel'
add_project_arguments('-mcmodel=medium', language: 'fortran')
endif
Expand Down
3 changes: 1 addition & 2 deletions phy/rdlim.F
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ subroutine rdlim
nstep2=nday2*nstep_in_day
c
if (csdiag) then
nstep2=nstep1+2
nstep2=nstep1+5
endif
c
endif
Expand Down Expand Up @@ -905,7 +905,6 @@ subroutine rdlim
c
if (GLB_AVEPERIO(n).lt.0) then
diagfq_phy(n)=-real(nstep_in_day)/GLB_AVEPERIO(n)
write (*,*) 'diagfq',diagfq_phy(n)
else
diagfq_phy(n)=nstep_in_day*max(1,GLB_AVEPERIO(n))
endif
Expand Down

0 comments on commit 9d778bd

Please sign in to comment.