There are a couple of issues here.
The first in your definition of the test_interface interface, the interface. You do not need or need the allocatable keyword.
subroutine test_interface(dose) bind(C,name="INTERFACE") import :: c_int integer (kind=c_int) :: dose(:) end subroutine
The second iso_c_binding will follow the link. Therefore, when you define your function in C, it should take a pointer to an array:
void INTERFACE (int *dose[NDIM])
Finally, as an additional note, you do not need to define your Fortran array starting at 0. You can use Fortran, usually starting at 1.
source share