jacobwilliams / quadpack

Modern Fortran QUADPACK Library for 1D numerical quadrature
Other
66 stars 8 forks source link

Bug in dqnc79 routine #21

Closed sllorente closed 1 year ago

sllorente commented 1 year ago

I get the following error when I try to compile the library using the Intel compiler:

./quadpack_generic.F90(7823): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   [ERR]
    subroutine dqnc79(fun,a,b,err,ans,ierr,k)
------------------------------^

I believe that err argument is actually an input argument, so the fix would be obviuos. diff --git a/src/quadpack_generic.F90 b/src/quadpack_generic.F90

index 66344ed..eb8b056 100644
--- a/src/quadpack_generic.F90
+++ b/src/quadpack_generic.F90
@@ -7830 +7830 @@ subroutine dquad(f, a, b, result, epsil, npts, icheck)
-    real(wp),intent(out) :: err !! a requested error tolerance.  Normally, pick a value
+    real(wp),intent(in) :: err !! a requested error tolerance.  Normally, pick a value
jacobwilliams commented 1 year ago

You are right! Thanks! I'll fix it now

jacobwilliams commented 1 year ago

Fixed in #22