Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Parallel Programming Guide for HP-UX Systems: K-Class and V-Class Servers > Appendix A Porting CPSlib functions to pthreads

Environment variables

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

Unlike CPSlib, pthreads does not use environment variables to establish thread attributes. pthreads implements function calls to achieve the same results. However, when using the HP compiler set, the environment variables below must be set to define attributes.

The table below describes the environment variables and how pthreads handles the same or similar tasks.

The environment variables below must be set for use with the HP compilers if you are not explicitly using pthreads.

Table A-2 CPSlib environment variables

Environment variable DescriptionHow handled by pthreads
MP_NUMBER_OF_THREADSSets the number of threads that the compiler allocates at startup time.By default, under HP-UX you can create more threads than you have processors for.
MP_IDLE_THREADS_WAITIndicates how idle compiler threads should wait.

The values can be:

-1 - spin wait;

0 - suspend wait;

N - spin suspend where N > 0.

CPS_STACK_SIZETells the compiler what size stack to allocate for all it's child threads. The default stacksize is 80 Mbyte.

Pthreads allow you to set the stack size using attributes. The attribute call is pthread_attr_setstacksize.

The value of CPS_STACK_SIZE is specified in Kbytes.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.