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

ZLIB AVX_512 issue #61

Open
muratmaga opened this issue Oct 18, 2022 · 2 comments
Open

ZLIB AVX_512 issue #61

muratmaga opened this issue Oct 18, 2022 · 2 comments

Comments

@muratmaga
Copy link

I am trying to build ANTsR in a relatively old hardware that doesn't support AVX_512 (the cpu is xeon v2). During R CMD INSTALL ITKR it is failing at this step:

[ 22%] Building C object Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeFiles/zlib.dir/arch/x86/adler32_avx512_vnni.c.o
/scratch/ccBoMSYP.s: Assembler messages:
/scratch/ccBoMSYP.s:45: Error: no such instruction: `vpdpbusd %zmm10,%zmm4,%zmm3'
/scratch/ccBoMSYP.s:69: Error: no such instruction: `vpdpbusd %zmm8,%zmm4,%zmm1'
/scratch/ccBoMSYP.s:73: Error: no such instruction: `vpdpbusd %zmm8,%zmm5,%zmm3'
make[3]: *** [Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeFiles/zlib.dir/arch/x86/adler32_avx512_vnni.c.o] Error 1
make[3]: Leaving directory `/data/home/maga/antsr-install/ITKR/src/itkb'
make[2]: *** [Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeFiles/zlib.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

How can I pass an argument to ZLIB not to use AVX2 or AVX512 during ITKR superbuild?

@muratmaga
Copy link
Author

@stnava this is still continuing to be an issue for our older machines. I think it is a cmake problem specific to the ZLIB. I found this thread, and it appears there is a solution by setting a specific flag. But I am not familiar with cmake system enough to understand where to specify this. ANy input would be much appreciated:
zlib-ng/zlib-ng#553

@cookpa
Copy link
Member

cookpa commented Nov 22, 2024

Late to this but FWIW, I had a look at the flags in ITKR and I don't see anything that specifically turns on AVX512. It should build with -march native. However, zlib is a third party module which has its own setting

https://github.com/InsightSoftwareConsortium/ITK/blob/1fc47c7bec4ee133318c1892b7b745763a17d411/Modules/ThirdParty/ZLIB/src/itkzlib-ng/CMakeLists.txt#L116

Maybe ITK_USE_SYSTEM_ZLIB in the ITK config could help, assuming that's available.

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

2 participants