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

Undeclared bool type in magma header file #38

Open
aradi opened this issue Feb 4, 2025 · 0 comments
Open

Undeclared bool type in magma header file #38

aradi opened this issue Feb 4, 2025 · 0 comments

Comments

@aradi
Copy link

aradi commented Feb 4, 2025

Description

Compilation of a code including the MAGMA header file (v1 or v2) fails with the oneAPI compiler (version 2024.2) due to missing declaration of the bool type.

To reproduce

Compile test.c with following content

#include <magma_v2.h>

void dummy() {
}

with

icx -c test.c

Obtained result

In file included from test.c:1:
In file included from /opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_v2.h:31:
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_z.h:63:1: error: unknown type name 'bool'
   63 | bool magma_zgetrf_gpu_recommend_cpu(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_z.h:64:1: error: unknown type name 'bool'
   64 | bool magma_zgetrf_native_recommend_notrans(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
In file included from test.c:1:
In file included from /opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_v2.h:32:
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_c.h:63:1: error: unknown type name 'bool'
   63 | bool magma_cgetrf_gpu_recommend_cpu(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_c.h:64:1: error: unknown type name 'bool'
   64 | bool magma_cgetrf_native_recommend_notrans(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
In file included from test.c:1:
In file included from /opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_v2.h:33:
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_d.h:63:1: error: unknown type name 'bool'
   63 | bool magma_dgetrf_gpu_recommend_cpu(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_d.h:64:1: error: unknown type name 'bool'
   64 | bool magma_dgetrf_native_recommend_notrans(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
In file included from test.c:1:
In file included from /opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_v2.h:34:
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_s.h:63:1: error: unknown type name 'bool'
   63 | bool magma_sgetrf_gpu_recommend_cpu(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
/opt/packager/manual/opt/magma/2.9_intel-2024.2_cuda-12.4/include/magma_s.h:64:1: error: unknown type name 'bool'
   64 | bool magma_sgetrf_native_recommend_notrans(magma_int_t m, magma_int_t n, magma_int_t nb);
      | ^
8 errors generated.

Expected result

Code should compile without error message

Workaround

Including <stdbool.h> before the inclusion of magma_v2.h on the user side works around the problem, but I think this should happen on MAGMA's side.

@aradi aradi changed the title Undeclared bool type in magma_v2.h Undeclared bool type in magma header file Feb 4, 2025
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

1 participant