OMP: Error

tensorflow报OMP错误,信息如下:

OMP: Error #34: System unable to allocate necessary resources for OMP thread: OMP: System error #11: Resource temporarily unavailable OMP: Hint: Try decreasing the value of OMP_NUM_THREADS.

【OMP: Error】解决办法1:
sess_config = tf.ConfigProto(log_device_placement = False, allow_soft_placement = True)
# 设置线程数
sess_config.inter_op_parallelism_threads = 2

解决办法2:
如果解决办法1不起作用,使用下面方法解决,我遇到的OMP上面是办法确实不起作用,下面办法确实不在报OMP问题了
export OMP_NUM_THREADS=1

    推荐阅读