Open
Description
Hi,
When loading libopenblas.so with OpenMP support on a low memory host the program hangs in a loop trying to mmap buffers (In blas_memory_alloc)
This can be reproduced by following testcase on a Linux system.
import os
import resource
import multiprocessing
def limitMemory(maxRAM):
bytesLimit = maxRAM * 1024 ** 3
resource.setrlimit(resource.RLIMIT_AS, (bytesLimit, bytesLimit))
def limitCPU(numOfCPUs):
try:
CPUs = list(range(numOfCPUs))
os.sched_setaffinity(0, CPUs)
except AttributeError:
print("Error restricting CPU resources")
limitMemory(2)
print("Memory limit set")
limitCPU(1)
print("CPU limit set")
pid = os.getpid()
print("The PID of the curirent process is: ",pid)
openblas_so = cdll.LoadLibrary("/usr/lib64/libopenblaso.so.0")
#import numpy as np
print(openblas_so)
#print(np)
Metadata
Metadata
Assignees
Labels
No labels