icecube / skymap_scanner

A distributed system that performs a likelihood scan of event directions for IceCube real-time alerts using CPU cluster(s) and queue-based message passing.
5 stars 2 forks source link

healpy import fails with illegal instruction when server is run on machine without avx2 #228

Open tianluyuan opened 8 months ago

tianluyuan commented 8 months ago

With the new environment variable OPENBLAS_CORETYPE=Haswell I am getting

tyuan@cobalt06:~$ singularity exec /cvmfs/icecube.opensciencegrid.org/containers/realtime/skymap_scanner\:3.14.9 python3 -c 'import healpy'
INFO:    /etc/singularity/ exists; cleanup by system administrator is not complete (see https://apptainer.org/docs/admin/latest/singularity_migration.html)
<frozen importlib._bootstrap>:241: RuntimeWarning: During parsing environment variable 'NPY_DISABLE_CPU_FEATURES':
You cannot disable CPU features (AVX512F AVX512_KNL AVX512_KNM AVX512_CLX AVX512_CNL AVX512_ICL AVX512CD AVX512_SKX), since they are not supported by your machine.
Illegal instruction

I can reproduce on cobalt with

tyuan@cobalt06:scan$ OPENBLAS_CORETYPE=Haswell python3 -c 'import healpy'                                                                                                  
Illegal instruction

I think it's because the server is being run on cobalt which does not have avx2. For now calling unset OPENBLAS_CORETYPE before running the server or OPENBLAS_CORETYPE="" python3 -m skymap_scanner.server ... should be fine as it's not affected on the client side.

dsschult commented 8 months ago

This makes sense, as healpy depends on numpy, which uses blas for linear algebra.