- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I inherit a fortran code that has 2 openmp parallel do declarations. When I compile the code in Release mode, the compiler will tell me that both openmp defined loops are parallelized. However, when I compile the code in Debug mode, the compiler will only tell me that code is compile successfully. If I remove pieces of code in the parallel do region, I can sometime get 1 or both openmp region parallelize under Debug mode.
Under what condition will Fortran compiler not generating Openmp code?
I am using IVF 11.074 and VS2005 SP1.
Thanks you
Under what condition will Fortran compiler not generating Openmp code?
I am using IVF 11.074 and VS2005 SP1.
Thanks you
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check the project properties for the Debug configuration to ensure it is enabling OpenMP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
Check the project properties for the Debug configuration to ensure it is enabling OpenMP.
Both debug and release have OpenMP enabled.
the problem I have is that by removing pieces of code within inparallel region, I can sometimes get the compiler to compiler code with OpenMP statements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is the section of code in the parallel region such that optimizations can eliminate the code completely? (assuming optimizations are enabled and the entire region appears as "dead code").
Also, insert a diagnostic write(*,*) omp_get_thread_num()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The openmp problem shows up in debug mode, not in release mode, so there shouldn't be any optimization done to the code. Essentially, in debug code, the code is compiled as if openmp statement does not exist.
Quoting - jimdempseyatthecove
Quoting - jimdempseyatthecove
Is the section of code in the parallel region such that optimizations can eliminate the code completely? (assuming optimizations are enabled and the entire region appears as "dead code").
Also, insert a diagnostic write(*,*) omp_get_thread_num()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved the problem by trying the evaluation copy of the latest Intel Fortran compiler. I guess it was a compiler related problem. Time to upgrade.

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