As I have slogged forward (I hope) in the process of OMPizing my large legacy program, I have already encountered one of OMP's most endearing traits: the program now crashes multiple times in multiple places in a single run. (Of course, this is progress compared to the program simply stopping without explanation or error message.)
I am hoping someone can provide insight into this particular message beyond what the documentation provides:
forrtl: severe (152) unresolved contention for Intel Fortran RTL global resource
This seems to indicate that the system is having trouble handling multiple calls to IO routines from the individual threads -- that is, the routines are not capable of handling threaded IO calls. This reminds me of something I read about using CRITICAL declarations to isolate IO calls.
I am wondering about the level of granularity I need to use for this protection. Is it sufficient to isolate calls to an individual file, or must Iisolate all IO calls to all files? Or does it depend on the call: do I need to isolate all READ calls from each other and all WRITE calls from each other, but can permit Thread 0 to READ while Thread 3 WRITEs?
And are there other considerations I'm missing?