Trying to fix NaN for lmax > 30.
epsi-builds/msspec_python3/pipeline/head This commit looks good Details

It is impossible to compute the crosssection if LMAX > 30.
This is due to a lack of precision in the djmn.f subroutine which
is written in simple precision. This commit is a first step to promote
this subroutine and all its dependensices to doucle precision.
This commit is contained in:
Sylvain Tricot 2020-12-01 11:13:24 +01:00
parent 50219b9f45
commit 70eef0af8a
4 changed files with 26 additions and 7 deletions

View File

@ -106,11 +106,12 @@ else:
env.Append(F2PY=p.stdout.decode('utf8').strip())
if GetOption('dbg'):
gfortran_env.Append(FORTRANFLAGS = ['-g', '-Wall', '-Wextra', '-Warray-temporaries',
'-Wconversion', '-fbacktrace', '-ffree-line-length-0',
'-fcheck=all', '-ffpe-trap=zero,overflow,underflow,invalid,denormal',
'-finit-real=nan'],
F2PY_OPTS = ['--noopt', '--debug-capi', '--debug'])
flags = ['-g', '-Wall', '-Wextra', '-Warray-temporaries',
'-Wconversion', '-fbacktrace', '-ffree-line-length-0',
'-fcheck=all', '-ffpe-trap=zero,overflow,underflow,invalid,denormal',
'-finit-real=nan']
gfortran_env.Append(FORTRANFLAGS = flags,
F2PY_OPTS = ['--noopt', '--debug-capi', '--debug', '--f77flags=-g -fcheck=all -fbacktrace -ffpe-trap=zero,overflow,underflow,invalid,denormal'])
if GetOption('verbose'):
env.Replace(FORTRANCOMSTR = "")

View File

@ -44,6 +44,7 @@
USE COEFRLM_MOD
USE EXPROT_MOD
USE EXPFAC_MOD
USE DEXPFAC_MOD
USE LOGAMAD_MOD
USE EXPFAC2_MOD
USE FACTSQ_MOD
@ -155,6 +156,7 @@
CALL ALLOC_COEFRLM()
CALL ALLOC_EXPROT()
CALL ALLOC_EXPFAC()
CALL ALLOC_DEXPFAC()
CALL ALLOC_LOGAMAD()
CALL ALLOC_EXPFAC2()
CALL ALLOC_FACTSQ()

View File

@ -58,8 +58,10 @@ C ===============================================================
NCG_M=4*LI_M+2
N_BESS=100*NL_M
N_GAUNT=5*NL_M
C N_BESS=100*NL_M
C N_GAUNT=5*NL_M
N_BESS=200*NL_M
N_GAUNT=10*NL_M
NLTWO=2*NL_M
END SUBROUTINE INIT_DIM

View File

@ -764,6 +764,20 @@ C=======================================================================
END SUBROUTINE ALLOC_EXPFAC
END MODULE EXPFAC_MOD
C=======================================================================
MODULE DEXPFAC_MOD
IMPLICIT NONE
REAL*8, ALLOCATABLE, DIMENSION(:,:) :: DEXPF
CONTAINS
SUBROUTINE ALLOC_DEXPFAC()
USE DIM_MOD
IF (ALLOCATED(DEXPF)) THEN
DEALLOCATE(DEXPF)
ENDIF
ALLOCATE(DEXPF(0:2*NL_M-2,0:2*NL_M-2))
END SUBROUTINE ALLOC_DEXPFAC
END MODULE DEXPFAC_MOD
C=======================================================================
MODULE LOGAMAD_MOD
IMPLICIT NONE