||[CAF] fix for handling statements with remote access on both sides
This fixes handling of statements where there is a coindexed reference on both
the LHS and RHS, of the form:
A(...)[p] = B(...)[q]
||[CAF] Improvements for strided accesses + more
This commit adds several improvements to the handling of strided coarray
accesses. Currently handled accesses fall into 3 categories:
(1) non-strided (or contiguous data) accesses
e.g. a(1:10) = b( 1:10, 5)[p]
b(1:10)[p] = a(1:10, 2)
(2) simple strided accesses (subscripts are not strided)
e.g. a(1:3, 1:5) = b(1:3, 6:10)[p]
b(2, 1:5)[p] = a(1:5)
(3) strided accesses with strided subscripts
e.g. a(5, 1:4) = b(1:8:2)[p]
b(1:10:2,1:4:2)[p] = a(1:5, 4:7:2)
It should now handle more general strided transfers without requiring the
extra LCB copy. Also, subscript extents need not match, so long as the array
shapes of the left and right sides are conforming. These are all accepted and
translated without needing to introduce an intermediate LCB buffer.
b(1:10, 5) = a(1, 1:10)
b(1, 2, 1:10:2) = a(1:5, 3)
b(1:10:2, 1, 1:4) = a(1:5, 1:8;2, 1)
Improvements are listed:
* runtime checks for contiguous accesses
* will convert strided access to contiguous access if the remote side is
contiguous while the local side is strided.
* compiler configure checks that gasnet-root path is valid
* compiler options can be specified for uhcaf just as with uhf90 (i.e. no need
to specify these options after -- )
* added --show-info option to uhcaf to get more informatoin about the default
compiler flags and the libraries linked in.
||[CAF] new coarray prelowering phase + misc fixes
This commit reorganizes the coarray prelowering phase in the back-end. It also
adds a number of fixes to the CAF implementation.
Prelowering has been split into 2 distinct phases. The first phase will
identify places in which an intermediate communication buffer should be
introduced to hold data to write out to read into and generate assignment
statements for this. The second phase will traverse the tree and replace
coindexed references with GET/PUT runtime calls.
Additionally, ths following fixes/enhancements are added:
* adding reduction routines for 1d arrays in libcaf-extra
* distinguish scalar from 1D arrays in libcaf-extra broadcast routines
* fixed link order for MPI libs in uhcaf script
* setting the num_codim field of the dope vector associated with coarray dummy
(patch level now at 3.0.6)
||[CAF] fix bug in copying command-line arguments for gasnet_init
When allocating buffer for command-line arg, it did not allocate the extra
byte for the terminating NULL character.
||support OpenUH build in Linux Mint distro
From Open64 commit log:
Open64 currently does not build from source on Linux Mint 12 due to this
distro using yet another layout for 64-bit libraries and objects.
The following change corrects the issue by adding another case to the
Note: If trying to execute a prebuilt OpenUH in Linux Mint, it may require
manully copying crt1.o, crti.o, and crtn.o from /usr/lib/x86_64-linux-gnu to
/usr/lib (and possibly /usr/lib64).
Contributor: David Coakley (AMD)
||[CAF] Fixes DV for allocatable scalar coarrays
This includes a fix for allocatable scalar coarrays ("coscalars"):
The dope vector for allocatable coscalars was not being initialized correctly
after recent change which did away with using the VAR_TMP_IDX for storing PE
bound information. The routine which generates the dope vector wasn't
correctly recognzing the existence of the cobounds in the declaration.
Also, for intrinsic functions which take in a coarray dope vector (e.g.
this_image), it was creating a temp dope vector for the actual argument. This
temp did not contain the cobounds information for coscalars. I modified this
so that it will instead use the original dope vector created for the coscalar.
When trying to determine the address on a remote image, we add the appropriate
offset only if it falls within the RMA heap. Coarrays that aren't in the heap
(e.g. save coarrays that have not been mapped into static coarray section of
heap) do not need an address adjustment so this check is added. Note,
accessing coarrays currently allocated outside the heap (e.g. save coarrays)
will not work unless using GASNet's everything segment configuration.
||adds macro __OPENUH__ which indicates version of OpenUH that is used.
||[CAF] changing ENABLE_TRACES to ENABLE_LIBCAF_TRACES
||[CAF] correcting uhcaf.in error for GASNET_CONDUITS
||[CAF] fix typo which caused seg fault for strided reads
||Misc. fixes for allocatable components
Allow allocatable components in derived types.
Technically, components with allocatable attribute should be allowed in
derived types even though in the initial Fortran 95 standard it wasn't. This
fixes some issues so that it will work in our compiler.
(1) set alignment to Pointer_size for derived types with allocatable component
(2) fix bug in constructing IR when there is an allocatable array section in a
This commit also fixes some issues with defining and allocating coarray
components of derived types.
- allow allocatable coscalar component in derived type
- support allocation of allocatable coarray components
- remove unnecessary code for storing PE bounds info in temps on allocate
Moreover, this commit fixes parsing of coarray-spec, ensuring that they are
either "explicit shape" or "deferred shape", as per Fortran 2008 standard.
||[CAF] various fixes for coscalars and libfortran bug
coscalar front-end fixes:
- allow local accesses on coscalars of derived type with pointer components
- fix size calculation for coscalar types
Also, in libfortran we were using the wrong function name for allocating data
in non-symmetric, remotely accessibly heap, resulting in a run-time error.
This was fixed.
||[CAF] Fixes file name DST info generated in wgen
If compiling a source code not in the current directory with -g, it couldn't
be stepped through in a debugger. It turns out that the DWARF symbol table
(DST) information for the file name was not appending the relative path. This
prevents the relative path from being stripped by wgen before writing out the
DST information. This fix enables us to build all the runtime libraries (e.g.
libfortran) with debug info.
- adds --keep option for uhcaf script
- increases patch level, now at 3.0.3
||[CAF] fix to allow use of uhcaf in makefiles
The uhcaf script will run the make command to determine the communication libs
from GASNet and ARMCI makefiles. If uhcaf is invoked from within another
makefile, the output of the nested makefile will include a printing of working
directory. To avoid this, we use --no-print-directory command in the script.
Also, there was a bug during coarray prelowering phase (undefined variable
ty1) that was fixed.
||increasing patch level, now at 3.0.1
||[CAF] Misc fixes for CAF and compiling without CAF support
Changes in this commit are:
- Before, it did not allow any coarray components for derived types. In
Fortran 2008, however, it is allowed so long as it is declared as
Also, we add a check in back-end translation that a co-subscripted access of
a coarray will have offset 0 for the base address. This looks to be
generally the case, and it is necessary to correctly handle accesses to
components of derived type coscalars.
- There were some places (in particular, parser handler for end critical) that
were missing ifdef _UH_COARRAYS.
- only install libcaf-extra if configured with --enable-coarrays
||Updating README.openuh text.
||Misc fixes/additions to CAF suppport
Additions in this commit are:
- Adds a C version of the cafrun script (not currently used).
- Support for coarrays of character type
- Support for critical..end critical regions in CAF programs. Support for
critical sections are still "work in progress". Currently it uses a naive
implementation of a single global lock residing on image 1 that must be
acquired/released. Note that the GASNet implementation is based on Active
Messages, and appears to not work correctly when GASNet installation is
configured with the 'everything' segment configuration.
- Fixes support for allocatable coarrays declared in a module.
- Adds support for allocatable coscalar (that is, has codimensions but no
- Adds check that coarray's codimension specifier should never be 'explicit
- Fix for coarray accesses with non-unit stride. E.g.
a(1:N:2, 1:N)[p] = t
- Adds a libcaf-extra library which contains supplementary CAF-based routines
that can be used in CAF applications. Currently provides some basic
implementations for reductions and broadcasts. See caf-extra.caf in
/path/to/installation/include/4.2 for the interface.
Contributor: Deepak, Siddhartha, Tony
||Tweaks to omprun, Dragon support, and other fixes
Changes added with this commit are:
- Initial C version of omprun to avoid shell stripping quotes (not currently
- Adding support for srand and ran in Fortran.
- Use .dgn extension for Dragon project files instead of .d
- Fix memset arguments in CG (2nd and 3rd args were flipped).
- If -pfa option is given, compiler will now link in libopenmp
Contributors: Deepak, Tony, Wei
||Misc. fixes for OpenMP/CAF, setting version to 3.0, and more
This makes a number of changes and fixes:
- We are setting the OpenUH version number to 3.0 for this commit.
- All configure arguments are now saved and will be printed when user uses -v
- Removes inline qualifier for __ompc_barrier_wait since it is now used in an
external file (omp_xbarrier.c)
- Adds LNO_Common_Loop back to ipl_summarize_util.cxx so that
-IPA:array_summary will work (used for Dragon analysis tool)
- Allow explicit lower bound on assumed shape coarray formal declarations
- Allow -g compilation with !DIR$ in .f files to allow building compiler's
runtime libraries with debug (--with-build-lib-optimize=debug)
- Bug fix for generating .rgn files (Dragon tool input) for multi-file
- Adds a clean-be rule to Makefile
- Disables scalar renaming in LNO for OpenMP firstprivate variables. There was
an LNO bug that would erroneously rename scalar variables that are declared
as firstprivate in a parallel or task region within a loop nest. This is a
bug not only in OpenUH but also Open64. The scalar renaming was disabled
before if a variable was shared or reduction, but now we also disable it for
Contributors: Deepak, Wei