Sponsored Content
Operating Systems HP-UX Spawn more than 8 threads OpenMP & HPUX Post 302741143 by ATveretinov on Friday 7th of December 2012 01:12:22 PM
Old 12-07-2012
Spawn more than 8 threads OpenMP & HPUX

Hi folks,

I am trying to run more than 8 threads in OpenMP team on my HP-UX 11i v3 system (without root access), but NO success.

Compiler: aCC A.06.26
I tried to setup: OMP_NUM_THREADS, omp_set_num_threads(), max_thread_proc=1000, nkthread=8416, set_dynamic=0

Machine has 2 processors with 4 cores. So, the system shows me 8 processors.

If I do the same but compile with g++ I can spawn more threads, but I need aCC.

I guess maybe it's OpenMP version 2, because on this version I cannot even setup OMP_THREAD_LIMIT (system cannot find this variable).

code:
Code:
omp_set_dynamic(0);
omp_set_num_threads(20);
#pragma omp parallel
{
      printf("OMP_NUM_THREADS=%d, m=%d\n", omp_get_num_threads(), omp_get_max_threads());
}

output:
omp_in_parallel=0, omp_get_dynamic=0, omp_get_thread_limit=0
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8
OMP_NUM_THREADS=8, m=8

Any ideas?

Thank you for help.
Alexander.

Last edited by Corona688; 12-07-2012 at 02:40 PM..
 

7 More Discussions You Might Find Interesting

1. HP-UX

HPUX printers & plotters disable on a daily basis

HI all, I've been having issues with printers and plotters disabling with no reason at all...It could happen to the same workstation once a day or once a week..There is nothing consistant..I stop and restart the spooler, only then can I re-enable the disabled printer.... If anyone is... (0 Replies)
Discussion started by: Shutdown
0 Replies

2. UNIX for Advanced & Expert Users

UNIX 386 & HPUX

We have a C program which does the encryption and decryption. It is running fine in UNIX 386. But the same C program is giving different results in HP UX server. We found that the Ascii codes (output) are different. I don;t know why it is giving different results. How can we get the same output... (4 Replies)
Discussion started by: Rajeshsu
4 Replies

3. HP-UX

HPUX & Top Command

Hello, I'm a newbie to HPUX so please be patient :) I'm looking at top and it only shows 3 of the 8 cpu's: 0 4 and 5. But the box has 8 cpu's according to the 'machinfo' command. There are 4 processes using 10% "%CPU" each but it shows the box as 90% idle...??? Also, I don't see any... (16 Replies)
Discussion started by: mj62mj62
16 Replies

4. Programming

locking mutexes, threads & semahores

What is the difference between mutex_lock and pthread_mutex_lock ? Should I use both when using binary semaphores. Also, what is the difference between using a binary semaphore and a counting semaphore where you wait on the condition variable ? (1 Reply)
Discussion started by: joey
1 Replies

5. UNIX for Advanced & Expert Users

Native & Green Threads

Hi, While compiling an application on Solaris 10, I observe the following printout. The same compilation passed some time ago(but perhaps the compilers were different then! We are maintaining this product and lost track of previous changes). ... (1 Reply)
Discussion started by: smanu
1 Replies

6. Solaris

Which company's hardware is more stable, in case of IBM (AIX), HP (HPUX) & Sun (Solaris)

Hi guru I want to know which company's hardware is more stable means in term of H/W faults or replacement, in case of IBM (AIX), HP (HPUX) & SUN MICROSYSTEM (Solaris) & which order also, if we go through more stable to less stable system. Regards (1 Reply)
Discussion started by: girish.batra
1 Replies

7. Programming

Undefined reference to omp_get_thread_num using OpenMP?

I am using a large code-base that compiled successfully before using make with a makefile and cmake. However, now that I'm trying to use openmp with it, I'm now getting the errors undefined reference to `omp_get_thread_num' undefined reference to `omp_get_num_threads'I don't think this... (0 Replies)
Discussion started by: larry burns
0 Replies
GET_NPROCS(3)						     Linux Programmer's Manual						     GET_NPROCS(3)

NAME
get_nprocs, get_nprocs_conf - get number of processors SYNOPSIS
#include <sys/sysinfo.h> int get_nprocs(void); int get_nprocs_conf(void); DESCRIPTION
The function get_nprocs_conf() returns the number of processors configured by the operating system. The function get_nprocs() returns the number of processors currently available in the system. This may be less than the number returned by get_nprocs_conf() because processors may be offline (e.g., on hotpluggable systems). RETURN VALUE
As given in DESCRIPTION. CONFORMING TO
These functions are GNU extensions. NOTES
The current implementation of these functions is rather expensive, since they open and parse files in the /sys file system each time they are called. The following sysconf(3) calls make use of the functions documented on this page to return the same information. np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */ np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */ EXAMPLE
The following example shows how get_nprocs() and get_nprocs_conf() can be used. #include <stdio.h> #include <sys/sysinfo.h> int main(int argc, char *argv[]) { printf("This system has %d processors configured and " "%d processors available. ", get_nprocs_conf(), get_nprocs()); return 0; } COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2012-03-20 GET_NPROCS(3)
All times are GMT -4. The time now is 07:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy