pmodels / oshmpi

OpenSHMEM Implementation on MPI
https://pmodels.github.io/oshmpi-www/
Other
25 stars 14 forks source link

Misc: multipliers in SHMEM_SYMMETRIC_SIZE environment variables #95

Closed minsii closed 3 years ago

minsii commented 3 years ago

See Section 8 in OpenSHMEM spec 1.5.

Current version supports only integer value. The new version allows also a floating point value with an optional character suffix (e.g., k, m, t)

Specifies the size (in bytes) of the symmetric heap memory per PE. The resulting size is implementation-defined and must be least as large as the integer ceiling of the product of the numeric prefix and the scaling factor. The allowed character suffixes for the scaling factor are as follows:
• k or K multiplies by 210 (kibibytes)
• m or M multiplies by 220 (mebibytes)
• g or G multiplies by 230 (gibibytes)
• t or T multiplies by 240 (tebibytes)
For example, string “20m” is equivalent to the integer value 20971520, or 20 mebibytes. Similarly the string “3.1M” is equivalent to the integer value 3250586. Only one multi- plier is recognized and any characters following the mul- tiplier are ignored, so “20kk” will not produce the same result as “20m”. Usage of string “.5m” will yield the same result as the string “0.5m”.
An invalid value for SHMEM_SYMMETRIC_SIZE is an er- ror, which the OpenSHMEM library shall report by either returning a nonzero value from shmem_init_thread or caus- ing program termination.