Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussões

Fortran DLL called from do loop does not work OK second time

Reinaldo
Principiante
546 Visualizações

Hi:

I am integrating a fortran DLL with a fortran main program.

The DLL is a subroutine that calls several other subroutines. The DLL sub is called a number of times within a do loop in the main program.

The first time the DLL sub is called it works apparently OK. Howrver the second time it does not work ok. For example the second time this piece of code is called it does not correctly assing the pointer variables.

SUBROUTINE SGWF2BAS7PNT(IGRID)

C Change global data to a different grid.

USE GLOBAL

USE PARAMMODULE

USE GWFBASMODULE

NCOL=>GLOBALDAT(IGRID)%NCOL

NROW=>GLOBALDAT(IGRID)%NROW

NLAY=>GLOBALDAT(IGRID)%NLAY

Any idea?

Thanks,

Reinaldo

0 Kudos
1 Responder
DavidWhite
Contribuidor valorado II
546 Visualizações
Reinaldo,
I think we need to see some more of the code associated with the call and the variables involved.
Can you post a more complete code example?
David

Responder