-
Notifications
You must be signed in to change notification settings - Fork 39
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
Building hipfort applications with CMake #133
Comments
Thanks for bringing that to my attention, Joe. Sorry for the slow response, my GitHub notification settings got a bit scrambled in the transition to the ROCm organization. I think I promised to fill that out and completely forgot about it. That's embarrassing. I'll get that filled in as soon as possible. |
Hey @cgmb - any updates here ? Currently guessing-and-checking on using hipfort with a CMake build system. It would be great if
or something to that effect would be possible.. |
The short version is that if you've installed ROCm 6.0.2, then you can use a search like |
I can upgrade to ROCm 6.0.2 . However, I use other builds of hipfort from source. Since I don't always just use the system compiler for Fortran and Fortran compilers notoriously don't generate .mod files that are compatible with other compilers, do any of the branches of hipfort on this repo come with/create the hipfort-config.cmake on installation? |
This throws errors since we need the correct includes directories for the |
Also, this error is what I was referring to when building with another compiler other than the system compiler
|
Anything from ROCm 6.0.0 or later. The CMake files just weren't getting packaged in official releases until 6.0.2. However, hipfort only generates the CMake files if the underlying math libraries are available at build time, so you'll need to have
Hmmm... I only was testing with a single compiler. Thanks for reporting this issue. |
To summarize, many sites, including ours, want to offer multiple Fortran compilers which would then necessitate multiple installs of hipfort. Right now, this requires installing ROCm from the package manager and manually removing hipfort. From here, hipfort is installed for each compiler and module files are provided to load hipfort. Unfortunately , the hipconfig.cmake files think that it should be searching in a parent directory for hip, hipBLAS, etc. CMake package config files which fails a CMake build. For now, I'm using Alternatively, we could build HIP from source, and all of the accelerated libraries just to accommodate the way the CMake config is written, but building all of the accelerated libraries from source is not documented. |
@cgmb - I'm curious to know how stable it is to build HIP, HIPFort, and the accelerated libraries (ROCblas, etc.) with Spack. |
I quite like Spack. They lag a bit behind the official releases, but it's a great package manager and it has official support from AMD. It's particularly good if you want to reduce the size of your binaries by building everything for a single GPU architecture. With that said, I've never actually used it for hipfort. I was just using it for the math libraries themselves. |
Works great for hipfort.
when building for AMD GPUs. |
@fluidnumerics-joe @cgmb Internal ticket has been created to fix documentation. Thanks! |
Hey all,
A google search on this topic turns up this page with a nice outline, but no content : https://rocm.docs.amd.com/projects/hipfort/en/latest/how_to_guides/getting_started.html
Is there any documentation available on building fortran applications that depend on hipfort with CMake ?
The text was updated successfully, but these errors were encountered: