Skip to content
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

Recommendations for building applications with CMake and hipfort #39

Open
fluidnumerics-joe opened this issue Nov 24, 2020 · 3 comments

Comments

@fluidnumerics-joe
Copy link
Collaborator

I’m looking to understand how we want to support the use of hipfort in the CMake build system. Currently, I’m finding that I have to set FC, CC, and CXX all equal to hipfc in order to build an application that depends on hipfort.

Further, when building distributions for multiple hardware vendors, it’s not clear how to specify the target hardware (—offload-arch does not work to build for nvidia hardware when nvidia hardware is not present).

I’m looking for some guidance on how we should be incorporating hipfc into CMake build systems and how to specify target architectures, even when the target architecture is not present on the build platform.

@drtpotter
Copy link

A set of hipfort CMAKE library targets would certainly be nice! Something that would do hipfc's job of linking to either CUDA or AMD libaries so we aren't forced to use hipfc.

@drtpotter
Copy link

It is not great to have to pass --offload-arch to hipfc in order for it to compile for a CUDA backend. The environment variable $HIP_PLATFORM should be all that is requried.

@fluidnumerics-joe
Copy link
Collaborator Author

Giving this one a bump. The hipfort documentation is quite sparse (https://rocm.docs.amd.com/projects/hipfort/en/latest/) , only providing details on how to install (with only the system compilers) and a few examples of source code with zero explanation of what they do.

Would the hipfort team be open to PR's to help flesh this out a bit more ?
Given that there are other issues open on this repository asking how to compile hipfort with other compilers than GNU compilers, it would be worth adding that to the docs (and making sure hipfort can be built with them).

Since .mod files are not necessarily portable from one compiler to another, ensuring HIPfort can compile with multiple compilers (GNU, Cray, LLVM, Intel, and NVHPC) is important for reaching as broad a userbase a possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants