-
Notifications
You must be signed in to change notification settings - Fork 108
Build failure with submodules #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seems I can't attach a tgz file :( - I'll try to think of something else |
... but it does support .gz - go figure! tar xf autodiff.gz |
I got it to build with
or by applying this patch to remove some implied diff --git a/app/av_utest.f90 b/app/av_utest.f90
index a5770f0..87935e0 100644
--- a/app/av_utest.f90
+++ b/app/av_utest.f90
@@ -16,10 +16,10 @@ program utest
ref = T1(0.5*sin(1.0),cos(1.0)) !,-2*sin(1.0d0)) !,-4*cos(1.0d0),8*sin(1.0d0))
call testResult_av1('T1 => sin(x)*cos(x)',ref,w)
- u = 0.5*sin(2*a)
+ u = 0.5d0*sin(2*a)
call testResult_av1('T1 => 0.5*sin(2x)',ref,u)
- s = 0.5
+ s = 0.5d0
w = s**3 + s
ref = T1(0.5**3+0.5,3*0.5**2 + 1) !,6*0.5) !, 6, 0)
call testResult_av1('T1 => x**3 + x',ref,w)
@@ -38,10 +38,10 @@ program utest
ref = T2(0.5*sin(1.0),cos(1.0),-2*sin(1.0)) !,-4*cos(1.0d0),8*sin(1.0d0))
call testResult_av2('T2 => sin(x)*cos(x)',ref,w)
- u = 0.5*sin(2*a)
+ u = 0.5d0*sin(2*a)
call testResult_av2('T2 => 0.5*sin(2x)',ref,u)
- s = 0.5
+ s = 0.5d0
w = s**3 + s
ref = T2(0.5**3+0.5,3*0.5**2 + 1,6*0.5) !, 6, 0)
call testResult_av2('T2 => x**3 + x',ref,w)
@@ -61,10 +61,10 @@ program utest
ref = T3(0.5*sin(1.0),cos(1.0),-2*sin(1.0),-4*cos(1.0)) !,8*sin(1.0d0))
call testResult_av3('T3 => sin(x)*cos(x)',ref,w)
- u = 0.5*sin(2*a)
+ u = 0.5d0*sin(2*a)
call testResult_av3('T3 => 0.5*sin(2x)',ref,u)
- s = 0.5
+ s = 0.5d0
w = s**3 + s
ref = T3(0.5**3+0.5,3*0.5**2 + 1,6*0.5, 6)
call testResult_av3('T3 => x**3 + x',ref,w)
@@ -94,10 +94,10 @@ program utest
ref = T4(0.5*sin(1.0),cos(1.0),-2*sin(1.0),-4*cos(1.0),8*sin(1.0))
call testResult_av4('T4 => sin(x)*cos(x)',ref,w)
...skipping...
call testResult_av3('T3 => x**3 + x',ref,w)
@@ -94,10 +94,10 @@ program utest
ref = T4(0.5*sin(1.0),cos(1.0),-2*sin(1.0),-4*cos(1.0),8*sin(1.0))
call testResult_av4('T4 => sin(x)*cos(x)',ref,w)
- u = 0.5*sin(2*a)
+ u = 0.5d0*sin(2*a)
call testResult_av4('T4 => 0.5*sin(2x)',ref,u)
- s = 0.5
+ s = 0.5d0
w = s**3 + s
ref = T4(0.5**3+0.5,3*0.5**2 + 1,6*0.5, 6, 0)
call testResult_av4('T4 => x**3 + x',ref,w)
@@ -142,11 +142,11 @@ program utest
ref = T4(t*y,1+log(2.0)+log(t),1/t,-1/t**2,2/t**3)
call testResult_av4('T4 => x*log(2x)',ref,w)
- u = 0.5*sinh(2*a)
+ u = 0.5d0*sinh(2*a)
ref = T4(0.5*sinh(1.0),cosh(1.0),2*sinh(1.0),4*cosh(1.0),8*sinh(1.0))
call testResult_av4('T4 => 0.5*sinh(2x)',ref,u)
- u = 0.5*cosh(2*a)
+ u = 0.5d0*cosh(2*a)
ref = T4(0.5*cosh(1.0),sinh(1.0),2*cosh(1.0),4*sinh(1.0),8*cosh(1.0))
call testResult_av4('T4 => 0.5*cosh(2x)',ref,u)
|
Nice catch. The compiler options I use in my makefiles for gfortran/debug builds: -fPIC -cpp -std=f2018 -fimplicit-none -fdefault-real-8 -ffree-line-length-200 -Wall -Wextra -Jobj_gfortran_debug -D_DEBUG -W -ggdb -fbounds-check -ffpe-trap=denormal,invalid and for ifort/debug builds: -fPIC -fpp -r8 -module obj_intel_debug -D_DEBUG -g -check bounds -warn all -debug-parameters used -traceback I never want real*4 so this gets round having to specify d0 everywhere. Can I put the compiler options in the .toml file? |
The next best option will be the response file support John is adding with #364. This will make specifying custom arguments easier until we get the compile profiles into the package manifest. |
That's a nice trick, even if achieved in a non-standard way using compiler flags. |
I'm not so much a fan of relying on compiler flags for correctness in compilation or execution; it just causes issues when testing other compilers/build systems and makes your code difficult to use by someone else not familiar with it. Considering the small size of Sebastian's patch in this instance, the custom compiler flag doesn't seem beneficial IMO. Since this is to do with compiler flags I'll close this issue. |
The attached code fails to build:
This is a working project which builds and runs fine with makefiles. It looks as if the problem could be due to the fact that the submodule needs to be compiled after the module. As an aside I don't think fpm itself should be reporting its own call stack in the final release.
The text was updated successfully, but these errors were encountered: