Thank you for this workaround. The solution would be to fix the compiler errors, though, as these mismatches might actually be bugs. I tried digging through the code, but my fortran day are now long past (10+ years), so I do not know if I fixed the issues or broke the code.
gfortran -Wall -O2 -c crackpropagations.f
crackpropagations.f:123:72:
123 | & "*CRACK PROPAGATION%")
| 1
Error: Missing actual argument for argument ‘_formal_4’ at (1)
This seems to be missing an argument, I do not know if I choose the right one, though:
123c123
< & "*CRACK PROPAGATION%")
---
> & "*CRACK PROPAGATION%", ier)
The next item is this:
gfortran -Wall -O2 -c cubtri.f
cubtri.f:131:18:
131 | CALL CUBRUL(F, VEC, W(1,1), IDATA, RDATA)
| 1
Error: Interface mismatch in dummy procedure ‘f’ at (1): 'f' is not a function
cubtri.f:170:20:
170 | CALL CUBRUL(F, VEC, W(1,J), IDATA, RDATA)
| 1
Error: Interface mismatch in dummy procedure ‘f’ at (1): 'f' is not a function
This now wants an interface:
75c75,82
< EXTERNAL F,rnderr
---
> interface
> real*8 function F(x, y, idata, rdata)
> real*8 x, y
> integer, dimension(:) :: idata
> real*8, dimension(:) :: rdata
> end function f
> end interface
> EXTERNAL rnderr
I have no idea how to do this F77 conforming, though.
The next item is this:
gfortran -Wall -O2 -c resultsmech_us3.f
f951: Warning: Nonconforming tab character in column 1 of line 304 [-Wtabs]
resultsmech_us3.f:465:18:
353 | & xstiff,ncmat_)
| 2
......
465 | & xstiff,alcon)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
The call is to us3_materialdata_me()
, which expects an integer as its last argument, but gets passed real*8 alcon(0:6,ntmat_,*)
. Looking at the code in us3_sub.f, this should be ‘ncmat_’ lika above, as it agrees with the dimension of the first argument etc.:
304c304
< vl(j,k) = v(j,konl(k)) ! uvw
---
> vl(j,k) = v(j,konl(k)) ! uvw
353c353
< & xstiff,ncmat_)
---
> & xstiff,ncmat_)
465c465
< & xstiff,alcon)
---
> & xstiff,ncmat_)
The diff also takes care of the tab character and a bogus indentation.
I haven’t looked into this yet:
gfortran -Wall -O2 -c us4_sub.f
us4_sub.f:494:42:
494 | call us4_Ni(ri,si,X,Nrs,dNr,dNs,Jm,invJm,detJm,detinvJm,dNx,dNy) ! s4 interpolation
| 1
Error: Rank mismatch in argument ‘invjm’ at (1) (rank-2 and scalar)
Edit: Never mind. invJm is the inverse of the Jacobian and should be REAL*8 :: invJm(2,2)