[Flang-dev] Flang Biweekly Sync - Notes from November 28, 2018 call
gklimowicz at nvidia.com
Thu Nov 29 15:57:23 EST 2018
Here are the notes from the November 28, 2018 Flang biweekly call. Updates are in bold.
lease be sure to let us know if you have any questions.
As always, please let us know specific topics you would like to go over in the next Flang Sync call December 12th, 8:30 AM PDT.
* Supercomputing 2018 wrap-up
* ECP annual meeting January 14-18, 2019
* F18 update
* Flang Dev news and updates
* Supercomputing 2018
* Flang meetup updates: Quite well attended; holding alongside the LLVM in HPC Social was a big success. Steve Scalpone gave an overview of the current Flang and F18 progress and fielded several questions from the audience. Nathan Sircombe gave a brief talk on Arm’s use of and experience with Flang.
* “OpenMP GPU Offload in Flang and LLVM” presented to the LLVM in HPC Workshop. The paper is attached to these meeting minutes.
* F18 update
* Ongoing development: Continued work on expression semantics, name resolution for type kinds, ability to compile to Fortran (floating point representations).
* RFC posted for control flow graphs (CFG). Requesting feedback on this.
* Eric Schweitz has written an RFC on adding debug information to LLVM to support Fortran. http://lists.llvm.org/pipermail/llvm-dev/2018-November/127419.html. He has also posted LLVM Fortran debug enhancements to Phabricator.
* ECP Annual Meeting
* January 14-18, 2019, Royal Sonesta Houston Galleria
* There will be a Flang breakout session and poster
* We continue to push changes from PGI to Flang, especially bug fixes (details below). Infrastructure issues have slowed down the migration of fixes, but this should resume shortly.
* These notes are now being sent to flang-dev at lists.flang-compiler.com<mailto:flang-dev at lists.flang-compiler.com>.
Where we can use your help:
* Topics for the next call, as always.
* Review F18 documentation at flang-compiler/f18/documentation.
* If you would be interested in attending these biweekly calls, please let Gary Klimowicz know and he will send you and invitation to the WebEx meeting.
* Looking for an additional speaker for the Flang breakout session at the ECP Annual Meeting.
* Let us know if you have presentations or meetings relevant to the Flang community. We will publicize them in these notes.
* Feedback on applications being built with Flang would be helpful (whether running or having issues with compiling and running). We haven’t heard lately about several applications (CTH, Miranda, SciPy, SSD) and would like to know if they’re been compiled recently with Flang.
* Feedback on GitHub issue priorities.
1. Flang on GitHub
· There have been 1,197 total commits (1,166 in the last update).
· There are 404 people who have “starred” the flang repo and 54 forks. 70 people are following f18.
1. Flang community
* Website: www.flang-compiler.org<http://www.flang-compiler.org> redirects to http://github.com/flang-compiler/flang.
* Wiki: https://github.com/flang-compiler/flang/wiki is the Flang wiki page where the most up-to-date build instructions and news can be found.
* Issues: Bug reports for Flang can be reported to https://github.com/flang-compiler/flang/issues.
* Mailing lists: There are two mailing lists for Flang: flang-dev and flang-announce at http://lists.flang-compiler.org/. You can reach this community by emailing flang-dev at lists.flang-compiler.org<mailto:flang-dev at lists.flang-compiler.org>. Occasional announcements are sent to flang-announce at lists.flang-compiler.org<mailto:flang-announce at lists.flang-compiler.org>.
* Slack: flang-compiler.slack.com is used for informal real-time communication in the Flang community. Add yourself via the invite <https://join.slack.com/t/flang-compiler/shared_invite/enQtMjExOTEyMzQ3MjIxLTZkMDNlODc2YjgxZDY1NTQ2YWJiZWVhOGU2YWY0NDNiOWY0ZjQzNjYyZTNlZjBlNjgxY2U1ZjFjMmY5NzIwMzA> link.
* Flang Meetup at SC18: We held the Flang meetup/LLVM Social at Supercomputing 2018 in Dallas. The meeting was fairly informal, punctuated by an update from Steve Scalpone on Flang and F18 (with lots of Q&A), and Nathan Sircombe (Arm) giving a talk on “Flang, Fortran and HPC applications on Arm”. Thanks to everyone for their RSVPs.
* ECP Annual Meeting
* January 14-18, 2019, Royal Sonesta Houston Galleria
* Steve Scalpone from NVIDIA will be attending.
* Flang breakout session: Current state of the union (Pat McCormick), Flang, libpgmath and F18 status (Steve Scalpone), Flang application experience with Nyx and Castro (Chris Daley)
* Flang poster
1. What we’re up to
· Recent updates to Flang:
* Many changes to Flang pending internal NVIDIA review
* #253 Intrinsic bit functions return wrong kind for INT8 arguments
* #254 ISHFT returns incorrect result when right shifting
* #367 Surprising interactions within the code: interface nested into subroutine defined into one interface causes previous defined interface to appear undefined
* #374 SIZE, MIN, MAX intrinsics cannot be used to compute array subscript in constant initialization
* #448 libpgmath should be built with -D_GNU_SOURCE
* #463 Error when manually linking LLVM IR with clang
* #606 Regression in debug for automatic arrays
* Several GitHub issues and pull requests closed by the community as fixed:
* #256 Flang seems excessively slow (withdrawn)
* #301 flexi-project: preprocessor 'if' directive didn't manage with C-style comments
* #346 Duplications in semant.h
* #439 surprising interactions: interface function can make enum value invisible (withdrawn)
* #515 [OpenMP] [WRF but not from SPEC2017] segfault when writing to THREADPRIVATE string
* #574 libpgmath: mthdecl.h has two identical copies #589 Fix clang++ build after recent changes (withdrawn)
* Support for COMMON debug metadata support is pending internal review
* Upcoming changes to Flang (in review):
* Improvements for RESHAPE performance
* Improvements for AVX transitions
* Assigned for work:
* #226 Unlimited polymorphic type does not work with transfer intrinsic
* #402 Compiler error on regular code
* #404 Internal compiler error with polymorphic subroutine parameters and nested derived types
* #413 Issues with allocatable/pointer debug metadata
* #426 Failures in #include of OpenMPI's mpif.h
* #461 OpenMP TeaLeaf_ref: local pointer variable not captured into parallel region
* #477 Pull request for module variable import debug test
* #498 Error while compiling libpgmath
* #577 Procedure pointers to internal procedures
* #602 fd_sincos_scalar.cpp: "error: ‘__builtin_complex’ was not declared in this scope"
* #604 Flang errors out on a final subroutine with parameterized derived types
* #607 Use statements not processed for debug metadata generation
* #609 subroutine internal variables
* #610 No debug generated for namelists
* #624 Regression in string concatenation
* Outstanding issues:
o Please refer to the Issues section on GitHub for flang-compiler/flang<https://github.com/flang-compiler/flang/issues> and flang-compiler/flang-driver<https://github.com/flang-compiler/clang/issues>.
* Outstanding pull requests:
o #521 Add OpenBSD as a recognized OS (pending test on new OpenBSD systems internally)
o #529 runtime: PoC: generate call to LLVM intrinsic instead of calling runtime functions when possible; handling NINT for a beginning (proposed expansion of this pull request)
o #530 AArch64: disable test cases invalid on aarch64 (working on)
o #532 runtime: remove duplicate files (need to validate on all compilers)
o #546 Loosen ties to x86 (working on)
o #561 flang2: corrected fix for #424 (believe this was already merged)
o #572 libpgmath: respect LIBPGMATH_WITH_GENERIC setting; fixes #559 (reviewing)
o #573 libpgmath: make it clang friendly; addresses bug #557 (reviewing)
o #592 add support for macOS (awaiting CLA)
o #622 Add explicit braces to avoid dangling else problem (reviewing)
o #623 [CMake][pgmath] Fix for building in lib directory (reviewing)
* Public plan: NVIDIA has published a brief plan for upcoming Flang work on github.io at https://github.com/flang-compiler/flang/wiki/Roadmap.
* Creating pull requests: NVIDIA requires contributor agreements from developers wishing to make pull requests. The Individual CLA is here: https://flang-compiler.github.io/files/Flang-ICLA-v4.pdf. The Corporate CLA is here: https://flang-compiler.github.io/files/Flang-CCLA-v2.pdf. Send completed CLAs to flang-cla at nvidia.com<mailto:flang-cla at nvidia.com>. Assuming the pull request builds and passes “make check-flang”, NVIDIA will take on the internal testing of the pull request using the full test suite available internally and provide feedback to the contributor as appropriate. Once we have the quality of the pull request established, it will be incorporated into Flang.
* LLVM is switching to a new Apache license with LLVM exceptions that we need to incorporate into our CLAs after it is adopted by LLVM community. The LLVM license can be found at http://llvm.org/foundation/relicensing/LICENSE.txt. A web page describing the relicensing effort can be found at http://llvm.org/foundation/relicensing/.
* Johannes Dieterich sent in an ICLA to contribute FreeBSD support to Flang.
* Flang DWARF generation: The version of LLVM with enhanced Fortran debug support has been uploaded to github.com/flang-compiler/llvm. Changes for Fortran debug support have been merged into the release_60 branch of Flang’s LLVM fork. Roadmap of items for debug support has been added to the Flang wiki here<https://github.com/flang-compiler/flang/wiki/Flang-Fortran-Debug-Metadata-Plan>.
o Fixed several issues with debug metadata for Fortran array bounds (in review)
o Working on debug metadata support for allocatables and pointers
o Eric Schweitz has written an RFC on adding debug information to LLVM to support Fortran. http://lists.llvm.org/pipermail/llvm-dev/2018-November/127419.html
o LLVM Debug metadata changes posted to LLVM Phabricator for review; responding to review comments.
* OpenMP 4.5 support:
* OpenMP 4.5 is supported on multicore CPUs, mapping all target regions across all the cores, with the following known limitations:
* We map the directives directly for host==device with very predictable behavior and good performance results.
* Task depend/priority is not supported
* OMP do clauses linear, order(n), and schedule (modifier) are not supported
* SIMD construct, Declare SIMD, and SIMD clause: private/reduction/lastprivate/collapse clauses on SIMD construct are supported, SIMD clause/construct are used as a hint to vectorize through metadata generation
* There is a bug if target construct is enclosed by task construct
* OpenMP 4.5 target offload to Tesla GPUs
* We continue the develop OpenMP target offload.
* We have simple programs running, focusing on generating code for OpenMP pragmas in SPMD/SIMT mode for now.
* Flang’s target offload support is dependent on the Clang/LLVM implementation of OpenMP. The OpenMP runtime functions of the SPMD/SIMT model are limited in terms of the breadth of OpenMP that can be supported. We continue to track LLVM and Clang 7.0. We will track LLVM and Clang 8.0 as they get closer to release.
* Work on SPEC OMP benchmarks remains gated by Clang/LLVM work (no support yet for target teams reductions).
* Currently, Flang supports only the combined constructs of OpenMP by generating code in SPMD/SIMT mode as this is the most common pattern used in OpenMP. LLVM's runtime has a special implementation for combined constructs that perform better than non-combined constructs.
* Validating OpenMP offload by testing against SOLLVE OpenMP test suite.
* We have several validation and documentation steps to do before target offload is available to test in Flang. We hope to have these in place by the end of December.
* Packaging and Binary Releases
* Binary release: We will be posting binary releases at least quarterly. Binary releases of Flang for x86-64 and OpenPOWER (LLVM 6.0.1) have been posted to http://flang-compiler.github.com/flang/releases.
* Spack: Spack packages for Flang have been reviewed by the Spack team and pulled into Spack. This is for the tagged binary release flang_20180612. Work needs to be submitted for flang_20180921. Chris Earl has volunteered to do this, as he already has the patches necessary for the 2018-09-21 release.
* F18 front-end:
* On GitHub: The initial source code for a new Fortran 2018 parser has been released on flang-compiler.github.com/f18<https://github.com/flang-compiler/f18/>. It’s recommended to start in the “documentation” directory.
* Status: We continue development on the new Fortran 2018 front-end. Recent work includes:
· Sync meeting with Flang sponsors at SC 2018 provided guidance for investment for next year; will provide outline for sponsors in early December
· Increasing the number of developers working on F18
· Name resolution for index-names, locality-specs, type kinds
· Resolve construct entity names in data-stmt, forall-stmt
· More work on expressions, formatting for floating-point constant values for all REAL kinds (regenerating Fortran)
· Basics of lowering to CFG in place.
· We posted RFC for control flow graphs (CFG) to the flang-dev mailing list; please provide feedback on this
* Testing updates
* Working to add NCAR Kernels tests to Flang.
* Additional correctness tests are in the review pipeline.
* Application updates: (no updates)
* MPAS: NVIDIA has a copy of MPAS-O and is working to bring it into our nightly test automation. Alexis Perry reports that the new intrinsics library produces about a 7% performance boost in MPAS. 94% of the performance difference is in three routines, with one of them accounting for half of the difference, where Flang is not vectorizing a loop that GNU gfortran does. The loop has conditionals, which may be why LLVM is not vectorizing it. No progress this week; we need to investigate the failures to vectorize.
* Nyx: Chris Daley of LBL gave NVIDIA an example of the application that is exhibiting poor performance with Flang. The good news is that serial performance is competitive with gfortran. NVIDIA has found two issues that account for most of the performance discrepancy. The first is that OpenMP atomics are not currently implemented as native instructions in Flang, which uses a barrier instead. The second issue is that a 4-dimensional array is being zeroed out with array syntax.
· Atomics support added to Flang
· Block zero improvements; need to incorporate assembly routines; turned out this was redundant code and the Nyx team has updated the source to remove it; latest version is not reliant on these block zero/copy improvements
1. Fortran 2008 features
* ERROR STOP work has begun.
* BLOCK construct. Work on BLOCK was prioritized below continued investment in F18 by Flang sponsors.
* Support for the G0 Edit descriptor has been requested by LLNL.
* Pointers to internal procedures, required for an important DOE application is complete.
* SUBMODULE is complete and in Flang. Please let us know of issues with submodules or regressions in code that use MODULE.
* Completed serial implementation of F2018 DO CONCURRENT (no multi-core implementation planned at this time). We are implementing Fortran 2018 locality specifiers and corresponding constraint checking.
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the flang-dev