- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I have a c# windows service that starts a couple of threads and then each thread executes the same fortran function.
When that happen, the first function keeps running just fine, while the other one triggers a c# exception.
Is there any compiler option to fix that? I googled a lot and only find recursive and save. I have to test them in the office tomorrow, but I am not optimistic.
PS: The fortran code has modules
Thanks
I have a c# windows service that starts a couple of threads and then each thread executes the same fortran function.
When that happen, the first function keeps running just fine, while the other one triggers a c# exception.
Is there any compiler option to fix that? I googled a lot and only find recursive and save. I have to test them in the office tomorrow, but I am not optimistic.
PS: The fortran code has modules
Thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Declaring the Fortran function or subroutine as RECURSIVE would be an important step, which avoids the need to use one of the ifort options /Qauto or the like. SAVEd variables are incompatible with allowing each thread to have its own copy. It would also be important to clean up any undefined variables (often referred to as un-initialized, although technically I've been told that's not correct Fortran terminology).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page