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

nvcc_wrapper Does Not Support -Xcompiler <compiler option> #198

Closed
nmhamster opened this issue Mar 1, 2016 · 7 comments
Closed

nvcc_wrapper Does Not Support -Xcompiler <compiler option> #198

nmhamster opened this issue Mar 1, 2016 · 7 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@nmhamster
Copy link
Contributor

Would like to be able to provide arguments as:

OMPI_CXX=$PWD/nvcc_wrapper mpicxx .. -Xcompiler <compiler option>

This is slightly messy because of C++11 pass through on POWER.

@nmhamster nmhamster added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Mar 1, 2016
@nmhamster nmhamster added this to the GTC 2016 milestone Mar 1, 2016
@crtrott
Copy link
Member

crtrott commented Mar 1, 2016

We can change that, and it would work for the method:
-Xcompiler arg1,arg2,arg3
There would be no spaces allowed in any of those things. Would that fit your need?

@nmhamster
Copy link
Contributor Author

Yeah, I need this for the POWER8 work because the C++11 pass through is turning into a bit of a mess.

@crtrott
Copy link
Member

crtrott commented Mar 1, 2016

Does this patch work for you:

diff --git a/config/nvcc_wrapper b/config/nvcc_wrapper
index 0589119..ce82f2b 100755
--- a/config/nvcc_wrapper
+++ b/config/nvcc_wrapper
@@ -127,6 +127,8 @@ do
     ;;
   #strip -Xcompiler because we add it
   -Xcompiler)
+    xcompiler_args="$xcompiler_args,$2"
+    shift
     ;;
   #strip of "-x cu" because we add that
   -x)

This doesn't work ....

@crtrott
Copy link
Member

crtrott commented Mar 2, 2016

New try:

diff --git a/config/nvcc_wrapper b/config/nvcc_wrapper
index 0589119..5b56832 100755
--- a/config/nvcc_wrapper
+++ b/config/nvcc_wrapper
@@ -127,6 +127,13 @@ do
     ;;
   #strip -Xcompiler because we add it
   -Xcompiler)
+    if [ $first_xcompiler_arg -eq 1 ]; then
+      xcompiler_args="$2"
+      first_xcompiler_arg=0
+    else
+      xcompiler_args="$xcompiler_args,$2"
+    fi
+    shift
     ;;
   #strip of "-x cu" because we add that
   -x)

@crtrott crtrott self-assigned this Mar 2, 2016
@nmhamster
Copy link
Contributor Author

Its still not working correctly with XL and NVCC but I don't think this is because of the nvcc_wrapper script. Its something to do with nvcc.

@nmhamster
Copy link
Contributor Author

It looks like this is a bug in CUDA 7.5 toolkit when using IBM XL series

nvcc warning : The -c++11 flag is not supported with the configured host compiler. Flag will be ignored.

Even though the IBM compiler does support C++11. I am raising a bug to see if we can get this fixed.

@crtrott
Copy link
Member

crtrott commented Mar 2, 2016

Merged into Master

@crtrott crtrott closed this as completed Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

2 participants