# Compilation error with gfortran10

**URL:** <https://calculix.discourse.group/t/compilation-error-with-gfortran10/1048>\
**Category:** Uncategorized\
**Created:** [March 22, 2022, 11:32pm UTC](https://calculix.discourse.group/t/compilation-error-with-gfortran10/1048 "2022-03-22T23:32:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jpaul](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jpaul](https://calculix.discourse.group/u/jpaul)\
**Post date:** [May 12, 2022, 8:51am UTC](https://calculix.discourse.group/t/compilation-error-with-gfortran10/1048/2 "2022-05-12T08:51:43Z")

</div>

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.

```auto
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:

```auto
123c123
< & "*CRACK PROPAGATION%")
---
> & "*CRACK PROPAGATION%", ier)

```

The next item is this:

```auto
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:

```auto
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:

```auto
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.:

```auto
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:

```auto
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)

---

_[View the full topic](https://calculix.discourse.group/t/compilation-error-with-gfortran10/1048)._
