parallel program on smp kernel

parallel program on smp kernel

I have an xw6000 dual xeon smp machine with linux8-smp installed. I can see both cpus in top and both have processes running on them.
I compiled a fortran openmp program to run on this machine and defined OMP_NUM_THREADS=2. the program run in two threads or more if I use larger number of threads, but only on one cpu which shows in top 100%. How do i tell linux to run the threads on both cpus at the same time?
I am using intel 7.1 fortran compiler.


6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I'm not sure I understand your description of your machine or linux version. We have had difficulty with redhat 8.0 on Xeon with HyperThreading enabled, but it generally works well with HT disabled. You might examine your linux boot log (accessible for a while by the dmesg command) to see whether your linux appears to recognize your system configuration correctly. A non-HT BIOS (one which doesn't have an option to disable HT) could have such problems, if you have HT CPU's. I think all Xeon CPU's with clock speeds over 1.7Ghz require HT-aware BIOS, and require HT to be disabled to work with a linux which doesn't schedule properly for HT. I'm not aware of anyone testing recent linux versions on P-III Xeon.

The machine-
hp xw6000 dual xeon 3.06 without HT and 2GB memory.
The OS-
redhat linux 8 with the latest kernel smp 2.4.20.

I do not have any problems with this setup. the machine runs fine programs and on both cpus since when I run AN application and see 100% (in top) use I can still use other programs with total cpus usage above 100% so they are running on the other cpu.

The question I am asking is this:
I have a parallel program written for openmp.
It runs fine without problem on one cpu.

Now I want to use the parallel benefit so I define
OMP_NUM_THREADS=2 so it will run in two threads.
The program still runs fine and opens 2 threads.
But both threads run on the same cpu becasue I see 100% on only on cpu.

What I need is that each thread run on a different cpu so I get best performance results.

The program runs fine on an Altix sgi 4 cpus machine with linux on all 4 cpus in parallel.

How do I tell linux to run each thread on a different cpu?
Do I need to compile it with special linked libraries besides the -openmp switch?


Using the -openmp switch for all compile and link steps should be sufficient.

I have a similar problem. A Linux 4-CPU workstation and nothing in the world can force an OpenMP program compiled with ifc to run on several CPUs. An -openmp switch should be sufficient, according to the documentation. Because it actually does not work, all I can say that it is another bug in ifc.


I am still not sure.
I have an sgi altix with 4 cpus.
It Has linux smp with an sgi patch to work as an shared memry machine.
I compiled the program with efc (the ifc version for itanium) and in openmp the program run each thread on a differnt cpu.
There other bugs in efc O3 doesnt work.
It might suggest that there is also a problem with the linking to linux kernel.


Leave a Comment

Please sign in to add a comment. Not a member? Join today