I observe some dangerous situation in my program using threads. It stops reading from file randomly. I have found, that problem may be connected with INQUIRE statement.
I have prepared sample code and project to demonstrate behavior.
When I run the code it randomly ends with I/O error 40 - Recursive I/O operation
Thread 20 still alive in cycle 1
Thread 20 read error at line 5452 error 40
If I comment lines 27,28 creating thread with INQUIRE statement (so only thread reading file is running) everything works OK.
Source code is compiled with multithreaded libraries using Intel(R) Visual Fortran Compiler XE 15.0.0.108 [IA-32]
What I am doing wrong?