- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an OpenMP code in which each thread reads some data from a file (a Fortran unformatted file), processes it and then repeats those steps until no more data remains in the file to be processed. The file I/O is inside an OpenMP critical region. It doesn't matter which data are processed by which thread. I'm finding that my code crashes intermittently with what looks like corrupted data being read in. Is there some reason why I can't have multiple OpenMP threads reading from the same Fortran file? Do I need to somehow syncrhonize the file over all threads after each read?
Any help greatly appreciated!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure you build your Fortran sources with -threads specified. (-threads is the default on Intel 64 architecture.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure you build your Fortran sources with -threads specified. (-threads is the default on Intel 64 architecture.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make sure you build your Fortran sources with -threads specified. (-threads is the default on Intel 64 architecture.)
Thanks - that seems to have fixed it!
![](/skins/images/A813B21DBC25E22B34567C634318FFFF/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page