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

User code on BlueOS machine reports ptxas error when including IntersectionShaper.h #1156

Closed
agcapps opened this issue Aug 10, 2023 · 7 comments · Fixed by #1204 · May be fixed by #1188
Closed

User code on BlueOS machine reports ptxas error when including IntersectionShaper.h #1156

agcapps opened this issue Aug 10, 2023 · 7 comments · Fixed by #1204 · May be fixed by #1188
Assignees
Labels
bug Something isn't working Quest Issues related to Axom's 'quest' component

Comments

@agcapps
Copy link
Member

agcapps commented Aug 10, 2023

Error occurs when the source file ReadStl.cc has #include "axom/quest.hpp":

ptxas ReadStl.ptx, line 5082; error   : Illegal operand type to instruction 'ld'
ptxas ReadStl.ptx, line 5082; error   : Unknown symbol '__unnamed_1_param_0'
ptxas ReadStl.ptx, line 5155; error   : Illegal operand type to instruction 'ld'
ptxas ReadStl.ptx, line 5155; error   : Unknown symbol '__unnamed_2_param_0'
ptxas ReadStl.ptx, line 5186; error   : Illegal operand type to instruction 'ld'
ptxas ReadStl.ptx, line 5186; error   : Unknown symbol '__unnamed_3_param_0'
ptxas fatal   : Ptx assembly aborted due to errors

If I comment out #include "axom/quest/IntersectionShaper.hpp" the errors do not occur.

@agcapps agcapps added bug Something isn't working Quest Issues related to Axom's 'quest' component labels Aug 10, 2023
@agcapps
Copy link
Member Author

agcapps commented Aug 10, 2023

More details to follow.

@agcapps
Copy link
Member Author

agcapps commented Aug 17, 2023

It seems we encountered this in before. #123 appeared to have fixed this very problem. Perhaps the host code isn't properly setting CUDA_SEPARABLE_COMPILATION to ON. I'll give that a try.

Thanks, @kennyweiss , for pointing out that past PR. @bmhan12 , @publixsubfan , your ideas would be welcome.

@agcapps agcapps self-assigned this Sep 7, 2023
@agcapps
Copy link
Member Author

agcapps commented Sep 8, 2023

More vexing clues: the host code had CUDA_SEPARABLE_COMPILATION on, and also tried setting CMAKE_CUDA_SEPARABLE_COMPILATION. Neither seemed to help.

@agcapps
Copy link
Member Author

agcapps commented Sep 8, 2023

Further: this error showed up in a call to axom::primal::intersection_volume() as well. Digging deeper into that function, within clip_impl.hpp, at https://github.com/LLNL/axom/blob/develop/src/axom/primal/operators/detail/clip_impl.hpp#L427, if I comment out the body of that loop, the ptxas error still occurs. If I comment out the iterator over planes, the ptxas error goes away.

Still trying to make a reproducer. Host code build configuration is probably playing a part in this. Many thanks to @adayton1 for his help in digging.

@bmhan12
Copy link
Contributor

bmhan12 commented Sep 11, 2023

Unsure if this could be the solution here, but I have run into a similar error message before.
This was while porting the mesh_tester example over to device.
What ended up "fixing" the issue was changing the default constructor, like in this commit from that PR.
Some problem related to default constructor and/or initializer list.

The error message I recorded before the fix looked like this:

ptxas /var/tmp/han12/tmpxft_0002790c_00000000-5_intersect_impl.ptx, line 374; error   : Illegal operand type to instruction 'ld'
ptxas /var/tmp/han12/tmpxft_0002790c_00000000-5_intersect_impl.ptx, line 374; error   : Unknown symbol '_param_0'
ptxas /var/tmp/han12/tmpxft_0002790c_00000000-5_intersect_impl.ptx, line 423; error   : Illegal operand type to instruction 'ld'
ptxas /var/tmp/han12/tmpxft_0002790c_00000000-5_intersect_impl.ptx, line 423; error   : Unknown symbol '_param_0'
ptxas fatal   : Ptx assembly aborted due to errors

@adayton1
Copy link
Member

Thanks for the suggestion, @bmhan12! I'll give it a try!

@agcapps
Copy link
Member Author

agcapps commented Sep 21, 2023

In the end, the fix was analogous to the one that @bmhan12 linked. The Hexahedron class has an array of eight Point<T, NDIMS>. The change was from this:

PointType m_points[NUM_HEX_VERTS];

to this:

PointType m_points[NUM_HEX_VERTS] {PointType {},
                                     PointType {},
                                     PointType {},
                                     PointType {},
                                     PointType {},
                                     PointType {},
                                     PointType {},
                                     PointType {}};

The fix also required Polyhedron::m_vertices to be initialized with thirty-two of PointType{}.

Another important detail: this failing build is the debug build. The optimized build is not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Quest Issues related to Axom's 'quest' component
Projects
None yet
3 participants