pe_environ(5)pe_environ(5) NAME pe_environ - Programming environment variables DESCRIPTION This man page describes environment variables used when developing and running MIPSpro 7 Fortran 90 and MIPSpro C and C++ programs on IRIX systems. The environment variables are grouped by function and platform. OPENMP API VARIABLES The following environment variables are defined in the OpenMP API. Variable Effect on system OMP_SCHEDULE Sets the schedule type and (optionally) the chunk size for DO and PARALLEL DO loops declared with a schedule of RUNTIME. For these loops, the schedule is set at run time when the system reads the value of this environment variable. Valid values for this environment variable are STATIC, DYNAMIC, and GUIDED. The default value for this environment variable is STATIC. For DO and PARALLEL DO directives that have a schedule type other than RUNTIME, this environment variable is ignored. If the optional chunk size is not set, a chunk size of 1 is assumed, except in the case of a STATIC schedule. For a STATIC schedule, the default chunk size is set to the loop iteration space divided by the number of threads applied to the loop. Examples: setenv OMP_SCHEDULE "GUIDED,4" setenv OMP_SCHEDULE "dynamic" OMP_NUM_THREADS Sets the number of threads to use during execution, unless that number is explicitly changed by calling the OMP_SET_NUM_THREADS(3) subroutine. When dynamic adjustment of the number of threads is enabled, the value of this environment variable is the maximum number of threads to use. The default value is the minimum of 8 and the number of CPUs on the system. Example: setenv OMP_NUM_THREADS 16 OMP_DYNAMIC Enables or disables dynamic adjustment of the number of threads available for execution of parallel regions. If set to TRUE, the number of threads that are used for executing parallel regions can be adjusted by the run time environment to best utilize system resources. The default value is TRUE. If set to FALSE, dynamic adjustment is disabled. Example: setenv OMP_DYNAMIC TRUE OMP_NESTED Enables or disables nested parallelism. If set to TRUE, nested parallelism is enabled. If it is set to FALSE, it is disabled. Default. Example: setenv OMP_NESTED TRUE ORIGIN SERIES VARIABLES The following environment variables are recognized on Origin 2000, Origin 200, and Cray Origin 2000 systems. Variable Effect on system _DSM_BARRIER Controls the barrier implementation within the MP run-time system. This environment variable accepts one of the following values: Value Action FOP Uses the uncached operations available on Origin series systems. FOP achieves the best performance. Default for ccNUMA (IP27 and IP35) systems. LLSC Uses load-linked (LL), store-conditional (SC) operations on shared memory. SHM Uses regular shared memory. Default for all systems other than ccNUMA. _DSM_MIGRATION Specifies aspects of automatic page migration. This environment variable accepts one of the following values: Value Action OFF Disables migration. Default. ON Enables migration for all but explicitly placed data (using PAGE_PLACE or a data distribution directive). ALL_ON Enables migration for all data. _DSM_MIGRATION_LEVEL Controls the aggressiveness level of automatic page migration. This environment variable must be set to an integer value between 0 (most conservative setting) and 100 (most aggressive). Specifying 0 disables this feature. The default setting is 100. _DSM_MUSTRUN Locks each thread to the corresponding CPU. This environment variable is not set by default. _DSM_OFF When set to OFF, disables nonuniform memory access (NUMA) calls. This can be used, for example, to allocate pages from a particular memory. On Origin series systems, _DSM_OFF is set to ON by default. This environment variable is not set by default. _DSM_PLACEMENT Allocates memory for all stack, data, and text segments. This environment variable accepts the following values: Value Action FIRST_TOUCH Specifies first-touch data placement. Default. ROUND_ROBIN Specifies round-robin data allocation. _DSM_PPM Specifies the number of processors to use per memory module. Must be set to an integer value. To use only one processor per memory module, set this environment variable to 1. _DSM_ROUND_ROBIN Specifies round-robin data allocation across memories rather than first-touch, for all of stack, data, and text segments. _DSM_VERBOSE When set, writes messages to stdout about parameters used during execution to stdout. _DSM_WAIT Controls how a thread waits for a synchronization event, such as a lock or a barrier. This environment variable accepts one of the following values: Value Action SPIN Specifies that a thread wait in a loop until the synchronization event succeeds. YIELD Specifies that a waiting thread should spin for a while and invokes sginap(2). This surrenders the CPU to another waiting process (if any). Default. MULTIPROCESSING VARIABLES The multiprocessing environment variables allow you to set up your multiprocessing environment. Some of the settings that these environment variables control can also be set through library routines. For more information on the multiprocessing library routines, see MP(3F). NOTE: Many of the environment variables in the following list are outmoded. The descriptions for each one indicate the preferred alternative, if one exists. Variable Effect on system MP_GET_SLAVE_STACKSIZE Returns the current value of the slave stack size as a size_t value. MP_SCHEDTYPE and CHUNK Specifies the type of scheduling to use on PARALLEL DO loops with scheduling specified as RUNTIME. The defaults are the same as those for the DOACROSS directive clauses. If neither environment variable is set, SIMPLE scheduling is assumed. If MP_SCHEDTYPE is set and CHUNK is not set, a CHUNK of 1 is assumed. If CHUNK is set, but MP_SCHEDTYPE is not set, DYNAMIC scheduling is assumed. Example 1: To set the scheduing to INTERLEAVE, specify the following (in the csh environment): setenv MP_SCHEDTYPE INTERLEAVE Example 2. To set the chunk size to 4, specify the following (csh): setenv CHUNK 4 For more information on the DOACROSS directive, see the MIPSpro Fortran 90 Commands and Directives Reference Manual. NOTE: The MP_SCHEDTYPE and CHUNK environment variables are outmoded. The preferred alternative is the OMP_SCHEDULE environment variable. MP_SET_NUMTHREADS, MP_BLOCKTIME, MP_SETUP, and NUM_THREADS Acts as an implicit call to the following library routines: MP_SET_NUMTHREADS(3F), MP_BLOCKTIME(3F), and MP_SETUP(3F) (respectively). The MP_SET_NUMTHREADS environment variable determines the number of processors across which an array is distributed during program execution, regardless of the number of processors physically present on the machine. As its value, MP_SET_NUMTHREADS accepts one of the following: an integer between 1 and the number of CPUs on your system; an integer expression that includes the symbols +, -, min, and max; and the special keyword all. The keyword all refers to the total number of CPUs on the machine. The default is either the number of CPUs on your system or 8. MP_BLOCKTIME accepts an integer value. MP_SETUP accepts no values. Example 1. The following two specifications prevent the slave threads from autoblocking: set MP_BLOCKTIME 0 (for sh) CALL MP_BLOCKTIME (0) (library call) Example 2. The following setting selects the number of threads to be two fewer than the total number of CPUs but always at least one: setenv MP_SET_NUMTHREADS max(1,all-2) (for csh) NOTE: The MP_SET_NUMTHREADS and NUM_THREADS environment variables are outmoded. The preferred alternative is the OMP_NUM_THREADS environment variable. MP_SIMPLE_SCHED Controls simple scheduling of parallel loops. This environment variable accepts the following values: Value Action EQUAL Distributes iterations as equally as possible across the processors. BLOCK Distributes iterations in a BLOCK distribution. If you are using distributed arrays, the default BLOCK. For all other cases, the default is EQUAL. The critical path (that is, the largest piece of the iteration space) is the same in either case. MP_SLAVE_STACKSIZE Controls the stack size of slave processes. As its value, it accepts an integer number that indicates the desired stack size, in bytes. The default is 16 Mbytes (4 Mbytes for greater than 64 threads). Slave processes allocate their local data only onto their stacks. Shared data, even if allocated on the master's stack, is not counted. MP_STACK_OVERFLOW Controls stack overflow checking. In a multi-threaded program (for example, one using OpenMP constructs) the MP runtime system automatically detects and reports stack overflow errors at runtime. When stack overflow errors are encountered, you can use the MP_SLAVE_STACKSIZE environment variable or the MP_SET_SLAVE_STACKSIZE(3F) library routine to request larger stacks for the parallel threads. The MP_SLAVE_STACKSIZE environment variable and the MP_SET_SLAVE_STACKSIZE(3F) library routine affect the allocation of stack space for parallel threads. If this effect is not desired, it can be be disabled by setting the MP_STACK_OVERFLOW environment variable to OFF. By default, this environment variable is set to ON. MP_SUGNUMTHD and MPC_SUGNUMTHD Enables an additional, asynchronous process that monitors the system load. This environment variable may be useful on a system with long-running jobs and varying workloads. The process that is enabled allows you to vary the number of threads during execution of some jobs. When idle processors exist, the number of threads is increased, up to the maximum specified by MP_SET_NUMTHREADS. When the system load increases, the number of threads is decreased, possibly to as few as one. Note that the number of threads being used is adjusted only at the start of a parallel region (for example, at a DOACROSS directive); it is not adjusted within a parallel region. Using this environment variable can improve overall system throughput. By avoiding excessive concurrency, this feature can reduce delays at synchronization points within a single application. These environment variables are on by default. NOTE: The MP_SUGNUMTHD and MPC_SUGNUMTHD environment variables are outmoded. The preferred alternative is the OMP_DYNAMIC environment variable. MP_SUGNUMTHD_MIN and MP_SUGNUMTHD_MAX Limits the effect of MP_SUGNUMTHD. These environment variables accept an integer value between 1 and the value of MP_SET_NUMTHREADS. When these environment variables are set, the number of processors is not lowered below the MP_SUGNUMTHD_MIN setting and it is not increased beyond the MP_SUGNUMTHD_MAX setting. NOTE: The MP_SUGNUMTHD_MIN and MP_SUGNUMTHD_MAX environment variables are outmoded. MP_SUGNUMTHD_VERBOSE Determines whether or not the system writes informational messages to stderr whenever the process changes the number of threads in use. The compiler interprets library calls to MP_NUMTHREADS(3F) and MP_SET_NUMTHREADS(3F) as a sign that the application depends on the number of threads in use, and the number is frozen upon encountering either of these calls. If MP_SUGNUMTHD_VERBOSE is set, a message to that effect is written to stderr. By default, this environment variable is not set. NOTE: The MP_SUGNUMTHD_VERBOSE environment variable is outmoded. The preferred alternative is the _DSM_VERBOSE environment variable. MPC_GANG Controls the use of gang scheduling, which is enabled by default. To disable gang scheduling, set this environment variable to OFF. By default, this environment variable is not set. NOTE: The MPC_GANG environment variable is outmoded. PAGESIZE_STACK, PAGESIZE_DATA, and PAGESIZE_TEXT Specifies the desired page size for each of the stack, data, and text segments. The default page size is 16 Kbytes on IRIX 6.4 and later systems; the default is 4 Kbytes on systems running previous IRIX revisions. These environment variables accept an integer value that represents the desired size in Kbytes. Typical values for this environment variable are 4, 16, or 64. Your operating system may not be able to accommodate larger values. If unsuitable values are specified, the system may adjust your page size to be lower than requested. I/O ENVIRONMENT VARIABLES The following environment variables are used by the I/O libraries. FF_IO_AIO_LOCKS, FF_IO_AIO_NUMUSERS, FF_IO_AIO_THREADS Specifies aspects of the aioinit structure. This structure contains the following fields: aio_locks, aio_numusers, and aio_threads. These environment variables alter the values used for these fields. For more information on using these environment variables, see the MIPSpro Application Programmer's I/O Guide, and the AIO_SGI_INIT(3) man page. FF_IO_LOGFILE Names a file to which statistics are written by the event FFIO layer. FILENV Specifies the location of the assign environment information. Use FILENV to assign a file name to store the assign information or to specify that it be stored in the process environment. CC_IO_NOMMAP Specifies the type of mechanism for reading a file using fstream in C++. When this environment variable is set, mmap will NOT be used, read will be used instead. MISCELLANEOUS ENVIRONMENT VARIABLES The following miscellaneous environment variables also affect compiling. COMPILER_DEFAULTS_PATH Specifies the a path or a colon-separated list of paths designating where the compiler is to look for the compiler.defaults file. The compiler.defaults file contains the following line: -DEFAULT [:abi=abi] [:isa=mips_num] [:proc=proc_num] [:platform=ip_num] [:opt=opt_lvl] [:arith=arith_lvl] The information in this file is used when compiling code unless it is overridden by command line options. The following list indicates the values to be specified on the -DEFAULT line and the command line options that supercede the -DEFAULT line specification: abi Specifies the Application Binary Interface (ABI). The -o32, -n32, and -64 options on the command line override this specification. Specify o32, n32, or 64 for abi. mips_num Specifies the Instruction Set Architecture (ISA). The -mips3 and -mips4 options to the f90(1) command override this specification. Specify either mips3 or mips4 for mips_num. proc_num Specifies the processor number. The -r4000, -r5000, -r8000, -r10000, -r12000, -r14000 and -r16000 options on the command line override this specification. Specify one of the following for proc_num: r4000, r5000, r8000, r10000, r12000, r14000, r16000. ip_num Identifies the target SGI platform for compilation. Corresponds to -TARG:platform=ipxx. The current supported values are ip19, ip20, ip21, ip22_4k, ip22_5k, ip24, ip25, ip26, ip27, ip28, ip30, ip32_5k, ip32_10k and ip35. The appropriate selection for your platform can be determined by running "hinv -c processor". The first line identifies the proper IP number and, for those where a processor suffix (for example, _5k) is required, the next line identifies the processor (R5000). opt_lvl Specifies the general optimization level used when compiling. The -O0, -O1, -O2, and -O3 options on the command line override this specification. Specify one of the following for opt_lvl: 0, 1, 2, 3. arith_lvl Specifies the IEEE arithmetic level used when compiling. The -OPT:IEEE_arith option on the command overrides this specification. Specify one of the following for arith_lvl: 1, 2, 3. If no file is present, or if this environment variable is not set, the compiler looks in the default directory, which is /etc. For example, the following command line: %f90 -64 myfile.f overrides a compiler.defaults file that contains: -DEFAULT:abi=n32:isa=mips4:proc=r10k and performs a -64, -mips4, -r10000 compilation. F2CFLAGS Controls the Fortran-to-C interface. As a value for this environment variable, specify options to the mkf2c(1) command. For example, if you want to pass the -l and the -signed command line options to mkf2c(1), and you are using the C shell, you can specify the following in your .cshrc file: setenv F2CFLAGS -signed -l. F90_BOUNDS_CHECK_ABORT Controls whether the compiler aborts during runtime if a bounds check fails. The -C option on the f90(1) command performs array bounds checking. By default, execution continues even if the bounds check fails. To cause the compiler to abort on a failed bounds check, set the F90_BOUNDS_CHECK_ABORT environment variable to YES. LD_LIBRARY_PATH, LD_LIBRARY64_PATH, and LD_LIBRARYN32_PATH Specifies the default library search path. This differs depending on the ABI being used. For more information on these environment variables, see rld(5). NLSPATH Affects compiler interactions with the message system. For more information, see catopen(3C). SGI_ABI Specifies the Application Binary Interface (ABI) used during compilation. This environment variable can be used to change the default ABI. Specify -o32, -n32, or -64 as values. See GETABI(3C) for more information. SGI_CC Specifies the default C compile mode. This environment variable can be set to any one of ansi, cckr (cc only), or xansi, and is interpreted as an option before any other options specified on the command line. SGI_C++ Specifies the default C++ compile mode. This environment variable can be set to either std or std=off, and is interpreted as an option before any other options specified on the command line. The -LANG:std[=off] option overrides this default value. TMPDIR Specifies a path for temporary files. When set, the value used is the directory in which the system places temporary files, rather than the default, /tmp. TRAP_FPE Controls the handling and classifying of floating-point exceptions and substitutes new values. It also provides a mechanism to count, trace, exit, or abort on enabled exceptions. The -TENV:check_div option on the command line inserts checks for divide by zero and for overflow. See FSIGFPE(3F) for information on HANDLE_FSIGFPES, which performs a function similar to that of this environment variable. For more information on this environment variable, including its possible values, see FSIGFPE(3F). _XPG Specifies that compilation should proceed according to X/Open XPG4 specifications. If set, cc or f77 (c89 or fort77, as they are known under XPG4, respectively) operates in conformance with the X/Open XPG4 specifications. The options and the command line behavior may differ in accordance to the XPG4 standards. CAUTIONS The following environment variables should not be changed from their system-supplied default settings: COMP_TARGET_ROOT, TOOLROOT, and RLS_ID_OBJECT. By default, the COMP_TARGET_ROOT environment variable is set to /. SEE ALSO assign(1), cc(1), CC(1), f90(1), mkf2c(1) catopen(3C), fsigfpe(3F), getabi(3C), mp(3F) rld(5) MIPSpro Application Programmer's I/O Guide MIPSpro Fortran 90 Commands and Directives Reference Manual