[ET Trac] #2571: runtime failure due to useing character*8 in DECLARE_CCTK_ARGUMENTS_CHECKED macro

Roland Haas trac-noreply at einsteintoolkit.org
Thu Oct 21 07:57:23 CDT 2021


#2571: runtime failure due to useing character*8 in DECLARE_CCTK_ARGUMENTS_CHECKED macro

 Reporter: Roland Haas
   Status: new
Milestone: 
  Version: development version
     Type: bug
 Priority: major
Component: Cactus

Comment (by Roland Haas):

We are using `characTer*8, intent(IN) :: dtbetax_p` for grid functions that are neither read nor written by a scheduled function that is that should not even be accessible. Since there is only a single C to Fortran wrapper per thorn, they are still being passed to the Fortran subroutine but we want to make sure that the compiler aborts with an error if the code actually tries to access it. 

Declaring it as a nonsensical type achieves that since the compiler will not let you assign a real or integer number to a `charcater*8`. We can only use `character*(*)` if that does not add an extra integer “length of string” to the end of the argument list. 

We may however have to do something like:

```
CCTK_REAL :: dtbetax_p
integer, parameter :: cctki_use_dtbetax_p = kind(dtbetax_p)
#define dtbetax_p dtbetax_p_IS_NOT_ACCESSIBLE
```

‌

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2571/runtime-failure-due-to-useing-character-8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/trac/attachments/20211021/7da47c14/attachment.html 


More information about the Trac mailing list