-
Notifications
You must be signed in to change notification settings - Fork 194
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
Potentially incorrect hypre_assert
#1096
Comments
@liruipeng, should we update the assertion to test for the actual memory location instead? |
Hi @v-dobrev Thank you for reporting this issue. This is a code design philosophy we have had from the beginning of the GPU work. When hypre is not configured with GPU, we treat HOST to be the "DEVICE", so there is no #ifdef of setting the default memory space to HYPRE_MEMORY_DEVICE, regardless of GPU or not. And the assert (among many others in the same form I guess) basically just say A and G lives in the same "device" space. Apparently, MFEM treat this differently. Does it work in the GPU case? |
When hypre is built for GPU, there's no issue -- MFEM sets the memory location to I guees the question is: do you consider it an error if a user provides to |
When running MFEM tests with HYPRE built with
--enable-debug
and no GPU support the following check fails in a few MFEM examples:hypre/src/parcsr_ls/ame.c
Line 464 in 0dcae3e
In these failures, the memory location on the left is
HYPRE_MEMORY_DEVICE
-- this comes from the standard hypre contructor, e.g. here:hypre/src/seq_mv/csr_matrix.c
Line 42 in 0dcae3e
Note that even when hypre is configured without GPU support,
hypre_HandleMemoryLocation(hypre_handle())
returnsHYPRE_MEMORY_DEVICE
by default, as seen here:hypre/src/utilities/general.c
Line 35 in 0dcae3e
On the other hand, the memory location in the right hand side of the
hypre_assert
inHYPRE_MEMORY_HOST
which comes from the memory location ofams_data->A
:hypre/src/parcsr_ls/ame.c
Line 366 in 0dcae3e
which, in turn, is set by MFEM to
HYPRE_MEMORY_HOST
since the matrix is on the host.What would be the best way to resolve this?
The text was updated successfully, but these errors were encountered: