Skip to content

Commit

Permalink
passL: dynamic link to libquda and rpath for quda and qmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy committed Aug 16, 2024
1 parent bc7ac93 commit 26465ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/comms/qmp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ when existsEnv("QMPDIR"):
else:
const qmpDir {.strDefine.} = getHomeDir() & "lqcd/install/qmp"
const qmpPassC = "-I" & qmpDir & "/include"
const qmpPassL* = "-L" & qmpDir & "/lib -lqmp"
const qmpPassL* = "-L" & qmpDir & "/lib -lqmp -Wl,-rpath=" & qmpDir & "/lib"
static:
echo "Using QMP: ", qmpDir
echo "QMP compile flags: ", qmpPassC
Expand Down
3 changes: 2 additions & 1 deletion src/quda/qudaWrapperImpl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ when nvhpcDir != "":
{.passL: "-Wl,-rpath," & qudaDir & "/lib".}

when cudaLibDir=="" and nvhpcDir=="":
{.passL: qudaDir & "/lib/libquda.a -lstdc++ ".}
{.passL: "-L" & qudaDir & "/lib -lquda -lstdc++ ".}
{.passL: "-Wl,-rpath," & qudaDir & "/lib".}

const qmpDir {.strdefine.} = getEnv("QMPDIR")
const qioDir {.strdefine.} = getEnv("QIODIR")
Expand Down

0 comments on commit 26465ee

Please sign in to comment.