- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Intel composer XE 2011. I have some simple codes as below to test the function OMP_set_num_threads, the program freezes once entering the parallel region.
call OMP_set_num_threads(4)
!$omp parallel
print *, 'hello parallel'
!$omp end parallel
It works fine if I use clause instead.
!$omp parallel num_threads(4)
print *, 'hello parallel'
!$omp end parallel
What am I missing in using the routine OMP_set_num_threads?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[plain]C:Projects>ifort /Qopenmp U85077.f90 Intel Visual Fortran Compiler XE for applications running on IA-32, Version 1 2.0.5.221 Build 20110719 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Microsoft Incremental Linker Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. -out:U85077.exe -subsystem:console -nodefaultlib:libiompprof5mt.lib -nodefaultlib:libiompprof5md.lib -defaultlib:libiomp5md.lib -nodefaultlib:vcomp.lib -nodefaultlib:vcompd.lib U85077.obj C:Projects>u85077.exe hello parallel hello parallel hello parallel hello parallel [/plain]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PROGRAM ACCTEST
external OMP_set_num_threads
call OMP_set_num_threads(4)
!$omp parallel
print *, 'hello parallel'
!$omp end parallel
END
The commands for compile and link are:
ifort set_num_th.for /nologo /extend_source:132 /Qopenmp /iface:cvf /Fd"vc100.pdb" /threads /c
link /OUT:"para.exe" /INCREMENTAL:NO /NOLOGO /SUBSYSTEM:CONSOLE set_num_th.obj
Running the program will lead to an error of out of heap memory. The same problem happens on several machine.
Do you need more information to figure out the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you need /iface:cvf?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens if you keep /iface:cvf
Replace
external OMP_set_num_threads
with
USE omp_lib
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page