Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Fortran Dll open file

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
Highlighted

What exactly do you mean by

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".

Retired 12/31/2016
0 Kudos
Highlighted
Beginner

Hello, Intel Fortran Compiler

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
Highlighted

I would guess then that your

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

Retired 12/31/2016
0 Kudos