aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-10-04 22:34:53 +0200
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-10-04 22:34:53 +0200
commit8df87c9e2c0a31c669625c4942d09b03d36c73e9 (patch)
tree1ac8786b5a56815c0c534f4b8deba011bfc46823 /gcc
parentc92ee4037c3a6df882907c06ae6313d2dcb0cc0d (diff)
Take memory from envirnoment variables; document those.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/gfortran.texi31
-rw-r--r--gcc/fortran/invoke.texi9
2 files changed, 39 insertions, 1 deletions
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index a54153b0951..6c5ed844770 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -608,6 +608,8 @@ Malformed environment variables are silently ignored.
* GFORTRAN_ERROR_BACKTRACE:: Show backtrace on run-time errors
* GFORTRAN_FORMATTED_BUFFER_SIZE:: Buffer size for formatted files
* GFORTRAN_UNFORMATTED_BUFFER_SIZE:: Buffer size for unformatted files
+* GFORTRAN_NUM_IMAGES:: Number of images to for -fcoarray=shared
+* GFORTRAN_SHARED_MEMORY_SIZE:: Memory for shared-memory coarrays
@end menu
@node TMPDIR
@@ -793,6 +795,35 @@ The @env{GFORTRAN_UNFORMATTED_BUFFER_SIZE} environment variable
specifies buffer size in bytes to be used for unformatted output.
The default value is 131072.
+@node GFORTRAN_NUM_IMAGES
+@section @env{GFORTRAN_NUM_IMAGES}---Set number of images for shared-memory coarrays
+
+The @env{GFORTRAN_NUM_IMAGES} environment variable specifies the number
+of images to be run for shared-memory coarrays, as an integer. The default
+value is the number of CPUs on the system.
+
+@node GFORTRAN_SHARED_MEMORY_SIZE
+@section @env{GFORTRAN_SHARED_MEMORY_SIZE}---Set size for shared-memory coarrays
+
+The @env{GFORTRAN_SHARED_MEMORY_SIZE} environment variable specifies
+the size of the shared memory block to be allocated for shared
+coarrays. It is safe on Linux and Darwin to make this larger than
+needed. When specifying this value, keep in mind that part of the space
+will not be available to the user program because of overhead.
+
+The format is an integer, optionally followed by @code{k} or @code{K}
+for a unit of kilobytes, @code{m} or @code{M} for a unit of megabytes
+and @code{g} or @code{G} for a unit of gitabytes.
+
+For example, if the size of all coarrays is known to be smaller than
+50 megabyte, the syntax could be
+@smallexample
+$ GFORTRAN_SHARED_MEMORY_SIZE=80M ./a.out
+@end smallexample
+
+The default is 256 kilobyte for 32-bit systems and 256 gigabyte for
+64-bit systems.
+
@c =====================================================================
@c PART II: LANGUAGE REFERENCE
@c =====================================================================
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 0fb7e1add7e..e9f89cb750a 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -188,7 +188,7 @@ and warnings}.
-fbounds-check -ftail-call-workaround -ftail-call-workaround=@var{n} @gol
-fcheck-array-temporaries @gol
-fcheck=@var{<all|array-temps|bits|bounds|do|mem|pointer|recursion>} @gol
--fcoarray=@var{<none|single|lib>} -fexternal-blas -ff2c @gol
+-fcoarray=@var{<none|single|lib|shared>} -fexternal-blas -ff2c @gol
-ffrontend-loop-interchange -ffrontend-optimize @gol
-finit-character=@var{n} -finit-integer=@var{n} -finit-local-zero @gol
-finit-derived -finit-logical=@var{<true|false>} @gol
@@ -1607,6 +1607,13 @@ Single-image mode, i.e. @code{num_images()} is always one.
@item @samp{lib}
Library-based coarray parallelization; a suitable GNU Fortran coarray
library needs to be linked.
+
+@item @samp{shared}
+This enables an experimental shared-memory implementation of
+coarrays. Expect bugs and incomplete implementation. Currently,
+this depends on POSIX shared mutexes, so this option is not supported
+on systems which do not have them. There is no Windows implementation
+at the moment.
@end table