madgraph5 / madgraph4gpu

GPU development for the Madgraph5_aMC@NLO event generator software package
29 stars 33 forks source link

Problems with std filesystem support in LUMI compilers #803

Closed valassi closed 6 months ago

valassi commented 6 months ago

I am having several issues with the filesystem headers on LUMI, while working on PR #801 to add Jorgen's HIP support.

For the hipcc compilation of GPU objects, I replaced filesystem by experimental/filesystem (using HIPCC as a macro to decide in hipcc compilation) https://github.com/madgraph5/madgraph4gpu/pull/801/commits/9809728ede533bb675cf18804dca891cc7af9f53# And then I had to manuallly add the stdc++-fs library https://github.com/madgraph5/madgraph4gpu/pull/801/commits/0b2060a30b623367bd4361594748cda6603b5157 This was using gfortran, gcc and hipcc.

However, because of the linking issues when mixing fortran, hip and c++ as described in #802, I am now thinking of trying flang, clang and hipcc, which are all compatible. The problem is that then the same filesystem issue descrobed above for hipcc also appears in the LUMI rocm clang14: I should use experimental/filesystem instead of filesystem. However, there is no way it seems to distinguish the rocm clang from the default clang, i.e. I have no way to distinguish whether filesystem or experimental filesystem should be used (I tried the usual $CXX -x c++ -E -dM - < /dev/null).

I checked and filesystem is only used in three source code files. I will try to just get rid of that instead. My impression is that the c++17 support in rocm clang is incomplete (or maybe this depends also on LUMI hardware, not sure...).

valassi commented 6 months ago

By the way I could not find any doc for that. The only vague mention of this is here https://rocm.docs.amd.com/en/docs-5.4.3/CHANGELOG.html#id79

valassi commented 6 months ago

This is fixed in PR #801.

I completely got rid of filesystem headers (I commented them out but left them there foir reference) https://github.com/madgraph5/madgraph4gpu/pull/801/commits/5c27ed64ed7bd9ed37e439aac23284082c06e759

This can be closed