Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Fortran Dll open file

okbi_z_
Beginner
151 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
151 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".

okbi_z_
Beginner
151 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 !!!

Steven_L_Intel1
Employee
151 Views

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

Reply