Found the solution for disabling OpenMP: export MKL_THREADING=TBB USE_TBB=1 will use another library which doesn’t throw any issue with gcc 4.8.2

  
      github.com
  
  
    pytorch/pytorch/blob/master/setup.py#L105-L106 7

#   MKL_THREADING
#     MKL threading mode: SEQ, TBB or OMP (default)