Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
On 11/2/22 13:03, Florian Weimer wrote: * Demi Marie Obenour: On 11/2/22 02:56, Florian Weimer wrote: * Benson Muite: On 11/1/22 06:35, Orion Poplawski wrote: While poking at building openmpi with clang, I started wondering about flang and some things: * Should %set_build_flags set FC? I think it should since it sets FCFLAGS. * Is flang-new even worth bothering with? See the following configure check: Yes, this will be helpful. Significant work has gone into optimizing this for A64FX Fedora does not run well on A64FX because we enable PAC+BTI, adding significant overhead to most function calls. How is this specific to A64FX? It just is? I'm not aware of any other AArch64 CPUs that are impacted in the same way. It is not specific to A64-FX, but flang has been optimized for aarch64 as a result of this. Thus, use of flang likely to grow in use for applications that use MPI. My expectation is that Fedora is mostly used for testing MPI applications, though with increasing core counts, production use on workstations will likely grow. Maybe I don't understand the question. Thanks, Florian ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
* Demi Marie Obenour: > On 11/2/22 02:56, Florian Weimer wrote: >> * Benson Muite: >> >>> On 11/1/22 06:35, Orion Poplawski wrote: While poking at building openmpi with clang, I started wondering about flang and some things: * Should %set_build_flags set FC? I think it should since it sets FCFLAGS. * Is flang-new even worth bothering with? See the following configure check: >> >>> Yes, this will be helpful. Significant work has gone into optimizing >>> this for A64FX >> >> Fedora does not run well on A64FX because we enable PAC+BTI, adding >> significant overhead to most function calls. > > How is this specific to A64FX? It just is? I'm not aware of any other AArch64 CPUs that are impacted in the same way. Maybe I don't understand the question. Thanks, Florian ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
On 11/2/22 02:56, Florian Weimer wrote: > * Benson Muite: > >> On 11/1/22 06:35, Orion Poplawski wrote: >>> While poking at building openmpi with clang, I started wondering >>> about flang and some things: >>> * Should %set_build_flags set FC? I think it should since it sets >>> FCFLAGS. >>> * Is flang-new even worth bothering with? See the following >>> configure check: > >> Yes, this will be helpful. Significant work has gone into optimizing >> this for A64FX > > Fedora does not run well on A64FX because we enable PAC+BTI, adding > significant overhead to most function calls. How is this specific to A64FX? -- Sincerely, Demi Marie Obenour (she/her/hers) ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
* Benson Muite: > On 11/1/22 06:35, Orion Poplawski wrote: >> While poking at building openmpi with clang, I started wondering >> about flang and some things: >> * Should %set_build_flags set FC? I think it should since it sets >> FCFLAGS. >> * Is flang-new even worth bothering with? See the following >> configure check: > Yes, this will be helpful. Significant work has gone into optimizing > this for A64FX Fedora does not run well on A64FX because we enable PAC+BTI, adding significant overhead to most function calls. Thanks, Florian ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
* Orion Poplawski: > While poking at building openmpi with clang, I started wondering about > flang and some things: > > * Should %set_build_flags set FC? I think it should since it sets FCFLAGS. I see that FC is actually documented for GNU Make, so it makes sense if we want to go in that direction. > * Is flang-new even worth bothering with? See the following configure > check: > > configure:32655: flang-new -c -O2 -flto -fexceptions -g > -grecord-gcc-switches -pipe -Wall -Werror=format-security > -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config > /usr/lib/rpm/redhat/redhat-hardened-clang.cfg > -fstack-protector-strong -m64 -mtune=generic > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection > -I/usr/lib64/gfortran/modules conftest.F >&5 > flang-new: warning: argument unused during compilation: '-fexceptions' > flang-new: warning: argument unused during compilation: '-g' > flang-new: warning: argument unused during compilation: > '-grecord-command-line' > flang-new: warning: argument unused during compilation: '-Wall' > flang-new: warning: argument unused during compilation: > '-Wp,-D_FORTIFY_SOURCE=2' > flang-new: warning: argument unused during compilation: > '-Wp,-D_GLIBCXX_ASSERTIONS' > flang-new: warning: argument unused during compilation: > '-fstack-protector-strong' > flang-new: warning: argument unused during compilation: '-mtune=generic' > flang-new: warning: argument unused during compilation: > '-fasynchronous-unwind-tables' > flang-new: warning: argument unused during compilation: > '-fstack-clash-protection' > flang-new: warning: argument unused during compilation: > '-fcf-protection=full' > error: Only `-Werror` is supported currently. > > Of particular note is ignoring the '-g' option. I can't find documentation on the supported options, and --help is not particularly illuminating. Maybe flang-new follows the option syntax of some other Fortran compiler and not gfortran? > I started poking at implementing this in redhat-rpm-config, but it > seems pretty tricky as for the most part we seem to assume that every > compiler can accept the same set of flags. > > This also bites us if we try to use gfortran with clang as I end up > with it trying to use the clang config. Yes, if we enable flang, gfortran will not be able to use those flags. Alternatively we can treat Fortran like Go and not control the compiler by toolchain settings. Thanks, Florian ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
On 10/31/22 20:35, Orion Poplawski wrote: While poking at building openmpi with clang, I started wondering about flang and some things: * Should %set_build_flags set FC? I think it should since it sets FCFLAGS. * Is flang-new even worth bothering with? See the following configure check: configure:32655: flang-new -c -O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules conftest.F >&5 flang-new: warning: argument unused during compilation: '-fexceptions' flang-new: warning: argument unused during compilation: '-g' flang-new: warning: argument unused during compilation: '-grecord-command-line' flang-new: warning: argument unused during compilation: '-Wall' flang-new: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2' flang-new: warning: argument unused during compilation: '-Wp,-D_GLIBCXX_ASSERTIONS' flang-new: warning: argument unused during compilation: '-fstack-protector-strong' flang-new: warning: argument unused during compilation: '-mtune=generic' flang-new: warning: argument unused during compilation: '-fasynchronous-unwind-tables' flang-new: warning: argument unused during compilation: '-fstack-clash-protection' flang-new: warning: argument unused during compilation: '-fcf-protection=full' error: Only `-Werror` is supported currently. Of particular note is ignoring the '-g' option. * If we do, it looks like we need a different set of FCFLAGS for flang-new - in particular dropping the -Werror=format-security option as seen above, as well as LTO options per: configure:33152: flang-new -o conftest -O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -flto -fno-openmp-implicit-rpath -Wl,--build-id=sha1 conftest.f >&5 flang-new: warning: argument unused during compilation: '-fexceptions' flang-new: warning: argument unused during compilation: '-grecord-command-line' flang-new: warning: argument unused during compilation: '-Wall' flang-new: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2' flang-new: warning: argument unused during compilation: '-Wp,-D_GLIBCXX_ASSERTIONS' flang-new: warning: argument unused during compilation: '-fstack-protector-strong' flang-new: warning: argument unused during compilation: '-mtune=generic' flang-new: warning: argument unused during compilation: '-fasynchronous-unwind-tables' flang-new: warning: argument unused during compilation: '-fstack-clash-protection' flang-new: warning: argument unused during compilation: '-fcf-protection=full' /usr/bin/ld: error: LLVM gold plugin has failed to create LTO module: input module has no datalayout flang-new: error: linker command failed with exit code 1 (use -v to see invocation) I started poking at implementing this in redhat-rpm-config, but it seems pretty tricky as for the most part we seem to assume that every compiler can accept the same set of flags. This also bites us if we try to use gfortran with clang as I end up with it trying to use the clang config. configure:33152: gfortran -o conftest -O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -flto -fno-openmp-implicit-rpath -Wl,--build-id=sha1 conftest.f >&5 gfortran: error: unrecognized command-line option '--config'; did you mean '-mpconfig'? gfortran: error: unrecognized command-line option '-fno-openmp-implicit-rpath' Thoughts? I have been working on separating the fortran flags from the c and cxx flags, to make it possible to use clang and gfortran in the same spec file. The first patch in the series is here: https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/178 -Tom ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: %set_build_flags, clang/flang-new and FC/FCFLAGS
On 11/1/22 06:35, Orion Poplawski wrote: While poking at building openmpi with clang, I started wondering about flang and some things: * Should %set_build_flags set FC? I think it should since it sets FCFLAGS. * Is flang-new even worth bothering with? See the following configure check: Yes, this will be helpful. Significant work has gone into optimizing this for A64FX ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue