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

Fortran Dll open file

okbi_z_
Beginner
543 Views

Hello, After weeks of search...

I have a program written in fortran, which, inside a subroutine makes an "open (file .....)" My program works very well.

But as soon as I make a dynamic library (DLL) of this program and I call my subroutine from a java program (JNA), it blocks when arrive at the "open" action!


Can anyone help me?

0 Kudos
3 Replies
Steven_L_Intel1
Employee
543 Views

What exactly do you mean by "blocks"? Which version of Intel Fortran are you using? What are the compile options? 

If you are building in Visual Studio, I recommend setting the project property Fortran > Libraries > Use Runtime Library to "Multithread DLL".

0 Kudos
okbi_z_
Beginner
543 Views

Hello, Intel Fortran Compiler 17.0, visual studio

Thank's Dr Fortran 

The error was "invalid memory access" I could thanks to this forum for help me to find a solution, which consisted of putting in the same folder my Fortran dll , as well as my Jna librarie, why? I do not know!!! On the other hand my program in fortran worked quickly, there, oddly, it takes 4 minutes to provide a result, which it provided in less than a second !!!

0 Kudos
Steven_L_Intel1
Employee
543 Views

I would guess then that your Java code didn't check for failure to load the DLL.

0 Kudos
Reply