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

USE_ARCH flag work for Heterogenous Galois too #92

Closed
ddn0 opened this issue Apr 7, 2020 · 15 comments
Closed

USE_ARCH flag work for Heterogenous Galois too #92

ddn0 opened this issue Apr 7, 2020 · 15 comments
Assignees
Milestone

Comments

@ddn0
Copy link
Contributor

ddn0 commented Apr 7, 2020

Not a blocker, but we should make the USE_ARCH flag work everywhere. Even for Heterogeneous Galois, we can still set the architecture flag for all the CPU code generated.

Originally posted by @insertinterestingnamehere in #88

@ddn0 ddn0 changed the title USE_ARCH flag work fir USE_ARCH flag work for Heterogenous Galois too Apr 7, 2020
@insertinterestingnamehere insertinterestingnamehere added this to the Release 6.0 milestone Apr 8, 2020
@roshandathathri roshandathathri self-assigned this May 7, 2020
@roshandathathri
Copy link
Member

roshandathathri commented May 7, 2020

I did not understand this. Why do we need this?

@ddn0
Copy link
Contributor Author

ddn0 commented May 7, 2020

It is a little unexpected that USE_ARCH is completely ignored if ENABLE_HETERO_GALOIS=ON since those two options are not related to each other for CPU code.

https://github.com/IntelligentSoftwareSystems/Galois/blob/master/CMakeLists.txt#L69

@insertinterestingnamehere
Copy link
Member

Yah, it's an unexpected behavior issue. I'm not aware of anything that makes this urgent. The current behavior is just weird.

@roshandathathri
Copy link
Member

What is USE_ARCH expected to do?

I will be renaming ENABLE_HETERO_GALOIS to GALOIS_ENABLE_GPU (and merging it with USE_GPU). That flag will enable single/distributed GPU code for lonestar (analytics/mining/scientific).

@insertinterestingnamehere
Copy link
Member

USE_ARCH sets the appropriate -march=... flag for the CPU code.

@roshandathathri
Copy link
Member

I don't see USE_ARCH being used anywhere currently. It was being used for KNL if I remember right. But where is that code in our cmake files?

https://github.com/IntelligentSoftwareSystems/Galois/blob/master/CMakeLists.txt#L69

I will drop those lines. They are not related/required.

@insertinterestingnamehere
Copy link
Member

My best guess is that the if statement at https://github.com/IntelligentSoftwareSystems/Galois/blob/master/CMakeLists.txt#L69 was added to work around some kind of compiler error for the heterogeneous case. @ddn0, you added that, do you remember why it's there?

@roshandathathri
Copy link
Member

Thanks, Ian. This is not related to GALOIS_ENABLE_GPU flag, so waiting for Donald's reply to see if he added those lines.

@ddn0
Copy link
Contributor Author

ddn0 commented May 7, 2020

I added that line to follow the original logic:
68df52e#diff-af3b638bc2a3e6c650974192a53c7291L139

which was added in this commit:
bc691fe

That's where my context ends :D

Unrelated to this issue, I noticed there are still quite a few warnings when compiling gluon (unused parameters) and with gcc 8.4/clang 9, I actually get an internal compiler error:

[ 77%] Building CUDA object lonestar/analytics/gpu/pta/CMakeFiles/pta_gpu.dir/pta.cu.o
...
/home/ddn/w/katana/lonestar/analytics/gpu/pta/andersen.cu(1379): internal error: assertion failed: conv_glvalue_expr_to_prvalue: bad expr (/dvs/p4/build/sw/rel/gpu_drv/r418/TRD418_98/drivers/compiler/edg/EDG_5.0/src/exprutil.c, line 20215)


1 catastrophic error detected in the compilation of "/tmp/tmpxft_00004683_00000000-4_pta.cpp4.ii".
ddn@spork:katana-build$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13a2e9376..91ed1a9e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,9 +66,9 @@ if(NUM_TEST_THREADS LESS_EQUAL 0)
   set(NUM_TEST_THREADS 1)
 endif()
 
-if(ENABLE_HETERO_GALOIS)
-  set(USE_ARCH none)
-endif()
+# if(ENABLE_HETERO_GALOIS)
+#   set(USE_ARCH none)
+# endif()
 
 ###### Configure (users don't need to go beyond here) ######
 
@@ -93,7 +93,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     message(FATAL_ERROR "gcc must be version 7 or higher. Found ${CMAKE_CXX_COMPILER_VERSION}.")
   endif()
 
-  add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wall;-Wextra;-Werror>")
+  add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wall;-Wextra;-Werror;-w>")
 
   if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9)
     # Avoid warnings from openmpi

@roshandathathri
Copy link
Member

which was added in this commit:
bc691fe

Thanks, Donald. This was my commit but those lines were there from a commit before that. It's pretty old. I don't think it's needed.

@roshandathathri
Copy link
Member

Unrelated to this issue, I noticed there are still quite a few warnings when compiling gluon (unused parameters) and with gcc 8.4/clang 9, I actually get an internal compiler error:

Are these errors related to commenting out those lines?
"analytics/gpu" is not gluon code. Please raise an issue and assign it to Vishwesh.
If there are still warning on analytics/distributed related to GPU code, please raise an issue for that and assign it to Vishwesh and me.

@ddn0
Copy link
Contributor Author

ddn0 commented May 7, 2020

Are these errors related to commenting out those lines?
"analytics/gpu" is not gluon code. Please raise an issue and assign it to Vishwesh.
If there are still warning on analytics/distributed related to GPU code, please raise an issue for that and assign it to Vishwesh and me.

There are two issues:

  1. warnings in gluon
  2. ICE in analytics/gpu

I'll file issues for both.

@roshandathathri
Copy link
Member

Thanks!

@ddn0 ddn0 mentioned this issue May 7, 2020
@roshandathathri
Copy link
Member

I made those flags independent in PR 199.

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

No branches or pull requests

3 participants