Bug#1136346: llvm-toolchain-22: Please enable PRIF (coarray) support
Alastair McKinstry
mckinstry at debian.org
Tue May 12 07:33:14 BST 2026
Source: llvm-toolchain-22
Version: 1:22.1.5-1
Severity: normal
Tags: patch
Please enable PRIF support in flang-22+ for coarrays.
Flang since 22+ has experimental support for co-arrays:
```
alastair at sid:~/deb-packages/llvm$ cat hello.f90
program main
implicit none
write (*,*) "Hello from image", this_image(), "of", num_images()
end program main
$ flang-22 -o hello hello.f90 -fcoarray -lcaffeine-smp -lgasnet-smp-seq -L/usr/lib/aarch64-linux-gnu/fortran/flang/ -lassert
warning: Support for multi image Fortran features is still experimental and in development.
$ alastair at sid:~/deb-packages/llvm$ gasnetrun_smp -n 2 ./hello
Hello from image 1 of 2
Hello from image 2 of 2
```
currently static libraries, so multiple needed for linking.
Try building caffeine with shared libs.
llvm-22, patch debian/rules:
```
ifneq (,$(filter $(DEB_HOST_ARCH), $(FLANG_ARCHS)))
PROJECTS += ;flang
RUNTIMES += ;flang-rt
+ STAGE_ALL_CMAKE_EXTRA += -DFLANG_ENABLE_PRIF=ON
endif
```
(I am the maintainer of fortran-caffeine and gasnet, the libraries that supply PRIF for flang.
coarray support is under active development)
Thanks
Alastair
-- System Information:
Debian Release: 13.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.73+deb13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_IE.UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the Pkg-llvm-team
mailing list