Skip to content

Instantly share code, notes, and snippets.

@ashander
Last active June 6, 2023 01:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashander/47f39eca7c13969fcc71a82d6bd21497 to your computer and use it in GitHub Desktop.
Save ashander/47f39eca7c13969fcc71a82d6bd21497 to your computer and use it in GitHub Desktop.
Error attempting to use numpy via conda on SDSC's Comet resource --- due to default number of threads requested by OpenMP

The error below can be avoided by export OMP_NUM_THREADS=2 (or possibly a higher number). To see this run:

env OMP_NUM_THREADS=2 python -c 'import numpy'

environment

system

(test) [ashander@comet-ln2 ~]$ python --version
Python 3.6.2 :: Continuum Analytics, Inc.
(test) [ashander@comet-ln2 ~]$ conda --version
conda 4.3.11
(test) [ashander@comet-ln2 ~]$ module list
Currently Loaded Modulefiles:
  1) gnutools/2.69      2) gnu/4.9.2          3) openmpi_ib/1.8.4   4) gsl/2.1            5) hdf5/1.8.14

packages

(test) [ashander@comet-ln2 ~]$ conda list
# packages in environment at /home/ashander/.miniconda/envs/test:
#
blas                      1.1                    openblas    conda-forge
libgfortran               3.0.0                         1  
numpy                     1.13.1          py36_blas_openblas_201  [blas_openblas]  conda-forge
openblas                  0.2.20                        1    conda-forge
openssl                   1.0.2l                        0  
pip                       9.0.1                    py36_1  
python                    3.6.2                         0  
readline                  6.2                           2  
setuptools                27.2.0                   py36_0  
sqlite                    3.13.0                        0  
tk                        8.5.18                        0  
wheel                     0.29.0                   py36_0  
xz                        5.2.2                         1  
zlib                      1.2.8                         3  

error

(test) [ashander@comet-ln2 ~]$ python -c 'import numpy'
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
OpenBLAS blas_thread_init: pthread_create: Resource temporarily unavailable
OpenBLAS blas_thread_init: RLIMIT_NPROC 1024 current, 2048 max
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ashander/.miniconda/envs/test/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/home/ashander/.miniconda/envs/test/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/home/ashander/.miniconda/envs/test/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/home/ashander/.miniconda/envs/test/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/home/ashander/.miniconda/envs/test/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
SystemError: initialization of multiarray raised unreported exception
Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment