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

fortran dll and common block variables

abhisinghal
Beginner
601 Views
Hi

I am trying to convert old FORTRAN exe files to dlls callable from VB.NET

In this process the "main program" has to be converted to a subroutine which can be called from VB.NET

The FORTRAN source code has many common block variables. I understand that the FORTRAN functions are static functions and so these common block variables will also be static variables.

This means that if different threads call the subroutine, there will be jumbling up.

Any solution ?

I hope the problem is clear enough.

Thanks
Abhishek
0 Kudos
1 Reply
Francesco_B_6
Beginner
601 Views
Hi Abhishek, Since this post is quite old, probably you found the solution or you already gave up, but I try to answer anyway. I've done something similar writing a Fortran dll that is called from a VB.NET program. Could you describe better which is your problem? Is it the loss of data between two calls to the library? If it is so, it can be solved by defining a common block of variables external to functions and subroutines. Francesco
0 Kudos
Reply