- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
(I initially posted this in the Intel Clusters and HPC Technology forum, but was told this is the better place for this question.)
I have what I think is a bug. I have a very simple OpenMP program with two threads. When compiled with integer(4) real(4) the print statements show that the parallelness is working (the "parallel variables" are defined). When compiled with integer(8) real(8) the parallelness doesn't work. I have attached/uploaded a zipped VS2010 project showing this problem. The project is currently set to int8/rl8 to show the "not working" state. If you change project properties / Fortran / Data / Default Integer KIND and Default Real KIND back to 4, it works.
In some ways I hope I just made a mistake - I hope there is a simple fix for this problem!
Cheers, Geoff
(I initially posted this in the Intel Clusters and HPC Technology forum, but was told this is the better place for this question.)
I have what I think is a bug. I have a very simple OpenMP program with two threads. When compiled with integer(4) real(4) the print statements show that the parallelness is working (the "parallel variables" are defined). When compiled with integer(8) real(8) the parallelness doesn't work. I have attached/uploaded a zipped VS2010 project showing this problem. The project is currently set to int8/rl8 to show the "not working" state. If you change project properties / Fortran / Data / Default Integer KIND and Default Real KIND back to 4, it works.
In some ways I hope I just made a mistake - I hope there is a simple fix for this problem!
Cheers, Geoff
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a simple fix. Your program incorrectly declares the omp_ routines as "default integer". When you change that to integer(8), it is inconsistent with the actual routines.
Remove the declarations of the omp_ routines. Add:
use omp_lib
just before the "implicit none".
Remove the declarations of the omp_ routines. Add:
use omp_lib
just before the "implicit none".
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been running successfully with default integer(4) real(8) and have had no problems with OpenMP
Jim Dempsey
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a simple fix. Your program incorrectly declares the omp_ routines as "default integer". When you change that to integer(8), it is inconsistent with the actual routines.
Remove the declarations of the omp_ routines. Add:
use omp_lib
just before the "implicit none".
Remove the declarations of the omp_ routines. Add:
use omp_lib
just before the "implicit none".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ohhhh! (bangs head against wall)
Thanks for your answer. I'd also missed along the way the doco that idenified the module omp_lib. So double thanks.
Hope you enjoy the rest of your weekend.
Cheers, Geoff
Thanks for your answer. I'd also missed along the way the doco that idenified the module omp_lib. So double thanks.
Hope you enjoy the rest of your weekend.
Cheers, Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is just one instance of a general problem caused by use of "big hammer" options such as changing the default integer size. It can have effects you have not considered, such as this one where functions now have the wrong type. This is why I strongly recommend against use of such options - if you want individual entities to be some non-default kind, declare them that way. (I do recognize that these options may have a use when porting from architectures such as Cray.)
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