- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a multithreaded code with which I am runnin into some problems. I have calls to the intrinsic function DATE_AND_TIME and GETDAT. When I start a second thread, the function DATE_AND_TIME causes a crash, so I replaced it with CPU_TIME which seems to work. However, later on there is call to GETDAT which causes the crash in a similiar way. However, both of these subroutines were called in the original master thread without problem.
More confusingly, this does not crash on windows xp, and does not crash on windows2000 with the development env (compilers etc) installed, only when I move the exe over to another machine running win2k (it works on winxp without compilers) without the compilers installed do I get this problem.
This leads me to think that it is a runtime library problem, however, I have taken over the required dll's I think, so it is difficult to understand the problem. It isn't consistent however, i have two options, which are similiar, that start different subroutines in threads. It is only with one threaded subroutine that causes the problem.
Any tips greatly appreciated, I cannot debug since the problem doesn't happen when the compilers are installed
Thanks
Ben
I have a multithreaded code with which I am runnin into some problems. I have calls to the intrinsic function DATE_AND_TIME and GETDAT. When I start a second thread, the function DATE_AND_TIME causes a crash, so I replaced it with CPU_TIME which seems to work. However, later on there is call to GETDAT which causes the crash in a similiar way. However, both of these subroutines were called in the original master thread without problem.
More confusingly, this does not crash on windows xp, and does not crash on windows2000 with the development env (compilers etc) installed, only when I move the exe over to another machine running win2k (it works on winxp without compilers) without the compilers installed do I get this problem.
This leads me to think that it is a runtime library problem, however, I have taken over the required dll's I think, so it is difficult to understand the problem. It isn't consistent however, i have two options, which are similiar, that start different subroutines in threads. It is only with one threaded subroutine that causes the problem.
Any tips greatly appreciated, I cannot debug since the problem doesn't happen when the compilers are installed
Thanks
Ben
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please elaborate on "crash". What is the exact and complete error message? Are you building with the multithreaded libraries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I should have been clearer. I get the error:
"The instruction at "0x78003ef8" referenced memory at "0x00000046". The memory could not be "read".
I have tried to increase the stacksize for the new thread, but this has not made any effect.
Thanks,
Ben
edit: Yes, I have the multithreaded libraries switched on. I have tried the exe on two win2k machines without compilers, one with the dotnetfx.exe applied one without, I am not sure if this should make a difference. The project is a mixed C++/IVF project, the IVF being the main code, the C++ linked in. Using Intel 9.0 and C++.NET 2003
"The instruction at "0x78003ef8" referenced memory at "0x00000046". The memory could not be "read".
I have tried to increase the stacksize for the new thread, but this has not made any effect.
Thanks,
Ben
edit: Yes, I have the multithreaded libraries switched on. I have tried the exe on two win2k machines without compilers, one with the dotnetfx.exe applied one without, I am not sure if this should make a difference. The project is a mixed C++/IVF project, the IVF being the main code, the C++ linked in. Using Intel 9.0 and C++.NET 2003
Message Edited by drb on 09-15-2005 06:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have no idea what dotnetfix.exe is.
Here's an experiment. On the system where this program doesn't work, boot into Safe Mode (typically you press F8 during the boot process to specify this) and then try running the program. What happens?
Here's an experiment. On the system where this program doesn't work, boot into Safe Mode (typically you press F8 during the boot process to specify this) and then try running the program. What happens?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I run highly multithreaded F90 codes on all varieties of WinXP and Win2K without any crashes. These codes make extensive use of timing functions, using the Win32 API GetLocalTime (st) where st is a TYPE T_SYSTEMTIME. The systemtime data type provides millisecond resolution andeasily supports any sort of elapsed-time calculations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the replies. I think I have discovered a solution, but not the problem (which I suspect lies in some memory problems somewhere else in the code).
In an attempt to resolve the crash, I tried add the instrinsic call in various places to the subroutine. If I place the call to DATE_AND_TIME at the first executable line in the subroutine,then the program works fine.
Ben
In an attempt to resolve the crash, I tried add the instrinsic call in various places to the subroutine. If I place the call to DATE_AND_TIME at the first executable line in the subroutine,then the program works fine.
Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the modules that contain the call the the intrinsic subroutine DATE_AND_TIME is the compiler option -Qauto used?.
i.e. is the 8 entry integer array for values on the stack?
Without the -Qauto a common name mangled block is created for the integer arrayfor exclusive use by the module (not the thread calling the module)and then used by all threads calling the particular routine?
Jim Dempsey

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