Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LLVM Flang #19

Closed
wants to merge 1 commit into from

Conversation

banach-space
Copy link

LLVM Flang is the new Fortran frontend from LLVM. It is still
work-in-progress, but there is enough support for Fortran 95/03 and
OpenMP to compile and run SNAP. To enable this, a new target is defined
in Makefile (fsnap) that corresponds to SNAP being built with LLVM
Flang.

LLVM Flang is under active development and it is assumed that you will
be building it from sources in order to compile SNAP. For this reason,
no assumptions are being made with respect to where to locate it (this
is in contrast to regular system compilers which are usually available
through $PATH). Instead, you will have point Makefile to it through the
LLVM_FLANG_DIR variable.

You will also have to specify where to find PGMATH, which LLVM Flang
currently depends on for Math routines. You will specify this with
PGM_DIR.

Last, but not least, the LLVM Flang compiler driver is currently called
flang-new. This is likely to change in the near future at which point
the build script will have to be updated accordingly.

Co-authored-by: Mats Petersson [email protected]

@banach-space
Copy link
Author

Hello! 👋🏻

Given the "maturity" of LLVM Flang, this might be a bit too early for this change. I wasn't sure, so have created this PR hoping for some early feedback. What do you think?

Btw, all the steps for building SNAP with LLVM Flang are summarised here: flang-compiler/f18-llvm-project#1341

Thank you!
-Andrzej

LLVM Flang is the new Fortran frontend from LLVM. It is still
work-in-progress, but there is enough support for Fortran 95/03 and
OpenMP to compile and run SNAP. To enable this, a new target is defined
in Makefile (`fsnap`) that corresponds to SNAP being built with LLVM
Flang.

LLVM Flang is under active development and it is assumed that you will
be building it from sources in order to compile SNAP. For this reason,
no assumptions are being made with respect to where to locate it (this
is in contrast to regular system compilers which are usually available
through $PATH). Instead, you will have point Makefile to it through the
`LLVM_FLANG_DIR` variable.

You will also have to specify where to find PGMATH, which LLVM Flang
currently depends on for Math routines. You will specify this with
`PGM_DIR`.

Last, but not least, the LLVM Flang compiler driver is currently called
`flang-new`. This is likely to change in the near future at which point
the build script will have to be updated accordingly.

Co-authored-by: Mats Petersson <[email protected]>
@banach-space
Copy link
Author

There's been no review for over a year, so closing. Please feel free to re-use this if you need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant