Skip to content

Documentation: Replace flang-new with flang#171

Open
rouson wants to merge 2 commits intoBerkeleyLab:mainfrom
rouson:doc-no-more-flang-new
Open

Documentation: Replace flang-new with flang#171
rouson wants to merge 2 commits intoBerkeleyLab:mainfrom
rouson:doc-no-more-flang-new

Conversation

@rouson
Copy link
Contributor

@rouson rouson commented Feb 20, 2026

fpm 0.13.0 recognizes flang as LLVM flang, which eliminates the need to use the flang-new alias. This PR replaces flang-new with flang in the Julienne documentation and adds notes recommending the use of flang-new with older fpm versions.

Copy link
Member

@bonachea bonachea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed changes look correct, but while we're updating these docs we might as well also fix all the other outdated information.

```
fpm run scaffold \
--compiler flang-new \
--compiler flang \ # with `fpm` 0.12.0 or older, replace "flang" with "flang-new"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bash comments (as suggested by the # above) don't work like this, you cannot insert them in the middle of a command. If a naive user literally pasted this block into bash the "comment" would cause failure.

Suggest instead putting the comment before or after the command.

Comment on lines 47 to 53
As of this writing, however, the above `install.sh` does not install the
Caffeine library file due to an apparent `fpm` bug. Therefore, the next step is
to find the resulting library. For example, use
```
find build -name libcaffeine.a
```
Then move `libcaffeine.a` to the `<caffeine-install-path>/lib` directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire block above is outdated and should be deleted.

Caffeine now does install libcaffeine.a to $PREFIX/lib.

@@ -38,7 +38,7 @@
```bash
git clone -b 0.6.0 https://github.com/BerkeleyLab/caffeine.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
git clone -b 0.6.0 https://github.com/BerkeleyLab/caffeine.git
git clone -b 0.7.0 https://github.com/BerkeleyLab/caffeine.git

|Vendor | Version(s) Tested | Example shell command |
|-------|-------------------------|--------------------------------------------------|
|LLVM | 20-21 | `fpm test --compiler flang-new --flag "-O3"` |
|LLVM | 20-21 | `fpm test --compiler flang --flag "-O3"` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|LLVM | 20-21 | `fpm test --compiler flang --flag "-O3"` |
|LLVM | 20-22 | `fpm test --compiler flang --flag "-O3"` |

Comment on lines 6 to +8
of a program. As of this writing, "Flang 22" refers to the main branch of
[llvm-project](https://github.com/llvm/llvm-project), which when built from
source, responds to `flang-new --version` with text that includes `22.0.0git`.
source, responds to `flang --version` with text that includes `22.0.0git`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flang 22 is basically released, this final sentence should probably just be deleted.

Comment on lines 25 to 26
git clone -b gcc14.3.0-julienne3.2.0-caffeine0.6.0 \
https://github.com/BerkeleyLab/flang-testing-project.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this recommending building from source using an old snapshot from our fork?

At this point it's probably better to clone from the LLVM upstream.

Better yet, download the LLVM 22 binary release package, or (once Brew packaging is finished) just brew install llvm flang.

where angular brackets denote variables to replace with your chosen value.

### Build Caffeine and GASNet
An `.install.sh` invocation of the form below _should_ install Caffeine and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An `install.sh` invocation of the form below _should_ install Caffeine and

### Build and Test Julienne
With `fpm` versions lower than 0.13.0, replace `flang` with `flang-new` below.
```
git clone -b 3.2.0 https://github.com/BerkeleyLab/julienne.git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
git clone -b 3.2.0 https://github.com/BerkeleyLab/julienne.git
git clone -b 3.6.1 https://github.com/BerkeleyLab/julienne.git

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.

2 participants