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

JNI problems with Fortran internal read/writes

longden
Beginner
384 Views
I'm using a Java JNI call to a Croutine which in turn invokes a Fortran program (main program converted to a subroutine for the C call). Most everything seemed to work OK until the Fortran code tried to do an internal write (it was trying to dynamically construct a FORMAT spec), and it appears that any READ/WRITEfrom/to acharacterstring fails under JNI.
For example, this fails under JNI:
CHARACTER*5 String
WRITE(string, '( "(i2)" )' )
When the converted Fortran routine is called by a C or Fortran main(), everything works fine.
During the abort, there's no traceback or exception information relating to the Fortran code ... only information on the JNI exception:
"An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x100103EE Function=[Unknown.]"
Is this a known problem, and if so isthere aworkaround?
I'm usingcompiler version - W_FC_C_9.0.024

Message Edited by longden on 11-30-2005 07:08 AM

0 Kudos
1 Reply
Steven_L_Intel1
Employee
384 Views
Doesn't sound familiar. Try it with 9.0.028 and see if it still is a problem. You should also verify that you are using the correct calling mechanism between Java and Fortran.
0 Kudos
Reply