_POSIX_C_SOURCE=199506L

Required by pthread.

libpthread.*

Kernel thread library used on 11.x systems

See “Using Threads” (page 163) for more information.

NOTE: Make sure that -mtis used consistently at compile and link times. When you link with -mt, everything must be compiled with -mt, even if you do not think your file will be used in a threaded application. When you incorrectly mix and match with -mt, you get a runtime abort with the following message:

aCC runtime: Use of "-mt" must be consistent during both compilation and linking.

To find the library or object that is missing -mt, use /usr/ccs/bin/footprints and look for the following:

-mt [(off) 1] -mt [on 1] (Or not present)

The number 1 above is the count of objects with that -mtsetting. Not present implies the source was not compiled with a recent compiler that contains this information.

+O[no]autopar

+O[no]autopar

The +Oautopar option enables automatic parallelization of loops that are deemed safe and profitable by the loop transformer.

Usage:

This optimization allows applications to exploit otherwise idle resources on multicore or multiprocessor systems by automatically transforming serial loops into multithreaded parallel code. When the +Oautopar option is used at optimization levels +O3 and above, the compiler automatically parallelizes those loops that are deemed safe and profitable by the loop transformer.

Automatic parallelization can be combined with manual parallelization through the use of OpenMP directives and the +Oopenmp option. When both +Oopenmp and +Oautopar options are specified, then any existing OpenMP directives take precedence, and the compiler will only consider auto-parallelizing other loops that are not controlled by those directives.

Programs compiled with the +Oautopar option require the libcps, libomp, and libpthreads runtime support libraries to be present at both compilation and runtime. When linking with the HP-UX B.11.61 linker, compiling with the +Oautoparoption causes them to be automatically included. Older linkers require those libraries to be specified explicitly or by compiling with +Oopenmp.

The +Oautopar option is supported when compiling C, C++, or Fortran files. Specifying +Oautopar implies the -mtoption.

The default is +Onoautopar, which disables automatic parallelization of loops.

+tls=[staticdynamic]

+tls=[staticdynamic]

The +tls option specifies whether references to thread local data items are to be performed according to the mode.

Usage:

+tls=mode

The defined values of mode are:

static This is a more efficient mode in which only thread local data in the program startup set can be accessed.

Parallel Processing Options

67

Page 67
Image 67
HP C/aC++ for PA-RISC Software manual +Onoautopar, +tls=staticdynamic