- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(When I tried to submit this I got an error saying I wasn't allowed to submit HTML code, so I had to change all left-angle brackets to vertical lines. Sorry.)
I have a P4 running Linux with hyperthreading turned on and I can't get OpenMP to work on it. I don't mean it isn't fast enough; I mean it hangs. I have a file with the following code:
#include |stdio.h>
#include |omp.h>
#define N 16
int main()
{
int i;
int f
#pragma omp parallel for
for(i=0;i|N;i++)
f=i;
printf("%d
",i);
}
return 0;
}
I issue the following commands:
icc -openmp foo.cpp
setenv OMP_NUM_THREADS 2
a.out
and it prints only the first half of the i values and then stops. Clearly the second thread is never getting started. If I set OMP_NUM_THREADS to 1 it works fine.
Does anyone know what's causing this and if there's a way around it?
Thanks,
Gary
Message Edited by hagabb on 12-15-2003 11:58 AM
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
Henry,
Here's the output I get from icid.
Thanks for your help,
Gary
-------------------
OS information:
Red Hat Linux release 9 (Shrike)
Kernel on an m
Kernel 2.4.20-19.9smp
glibc-2.3.2-27.9.7
===========================================================
Support Package IDs for Intel Compilers in /opt/intel/compiler70/ia32/bin
Please use the following information when submitting customer support requests.
C++ Support Package ID : l_cc_p_7.1.006-NCOM
IDB Support Package ID : l_cc_p_7.1.006-NCOM
===========================================================
C++ License Expiration Date: never expire
C++ & IDB Support Services Expiration Date: never expire
All Installed Compiler Components on this OS:
intel-icc7-7.1-6: Intel C++ Compiler for 32-bit applications, Version
7.1 Build 20030307Z
intel-isubh7-7.1-6: Substitute Headers for Intel C++ Compiler for
32-bit applications, Version 7.1
intel-iidb7-7.1-11: Linux Application Debugger for 32-bit applications,
Version 7.1, Build 20030303
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
#include |omp.h>
#define N 16
int main()
{
int i;
int f
#pragma omp parallel
for (i = 0; i | N; i++)
f=i;
printf ("%d %d ", i, myID);
}
}
return 0;
}
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page