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

Fix GPU build with MATRIX library #118

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ghbrown
Copy link

@ghbrown ghbrown commented Apr 12, 2022

This PR adds necessary changes to fix failing GPU builds with the companion MATRIX library. The post fix version makes GNU builds on Illinois's campus cluster and my personal *nix machine. I suspect builds on other machines (Summit, etc.) are also going to be fixed by these changes, but I have yet to confirm on Summit.

Specifically, it adds the missing mmlatte_ Fortran interface for the CUDA matrix multiply routine, replacing the unused MATRIX/F_mmtest.cu. Without this addition one gets compile time errors like

/usr/bin/ld: pulay.o: in function `pulay_':
pulay.F90:(.text+0x1d52): undefined reference to `mmlatte_'
/usr/bin/ld: pulay.F90:(.text+0x1d81): undefined reference to `mmlatte_'
/usr/bin/ld: pulay.F90:(.text+0x1e11): undefined reference to `mmlatte_'
/usr/bin/ld: pulay.F90:(.text+0x1e3c): undefined reference to `mmlatte_'
/usr/bin/ld: pulay.F90:(.text+0x1e6b): undefined reference to `mmlatte_'
/usr/bin/ld: pulay.o:pulay.F90:(.text+0x1e92): more undefined references to `mmlatte_' follow
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:88: latte] Error 1

Further, it replaces the CUDA library path with a more generic version that probably better represents *nix systems (but will nevertheless have to be changed for most production machines), and links against the OpenMP library in the GPU options. Without the OpenMP link, one gets errors like

/usr/bin/ld: sparsemath.o: undefined reference to symbol 'GOMP_atomic_start@@GOMP_1.0'
/usr/bin/ld: /usr/lib/libgomp.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:88: latte] Error 1

@ghbrown
Copy link
Author

ghbrown commented Apr 19, 2022

After looking over outstanding issues, this PR addresses issue #107 .

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

Successfully merging this pull request may close these issues.

1 participant