Installing pytorch from source is throwing an error stating openmp not found

Executing command python setup.py develop is throwing this error.

sriharsha@B550-AORUS  ~/Desktop/opensource/pytorch   feat  python setup.py develop      
Building wheel torch-1.7.0a0+d80e0c6
-- Building version 1.7.0a0+d80e0c6
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/sriharsha/Desktop/opensource/pytorch/torch -DCMAKE_PREFIX_PATH=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages -DNUMPY_INCLUDE_DIR=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages/numpy/core/include -DPYTHON_EXECUTABLE=/home/sriharsha/miniconda3/envs/dev_pytorch/bin/python -DPYTHON_INCLUDE_DIR=/home/sriharsha/miniconda3/envs/dev_pytorch/include/python3.7m -DPYTHON_LIBRARY=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/libpython3.7m.so.1.0 -DTORCH_BUILD_VERSION=1.7.0a0+d80e0c6 -DUSE_NUMPY=True /home/sriharsha/Desktop/opensource/pytorch
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Not forcing any particular BLAS to be found
-- Performing Test COMPILER_WORKS
-- Performing Test COMPILER_WORKS - Success
-- Performing Test SUPPORT_GLIBCXX_USE_C99
-- Performing Test SUPPORT_GLIBCXX_USE_C99 - Success
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED
-- Performing Test CAFFE2_EXCEPTION_PTR_SUPPORTED - Success
-- std::exception_ptr is supported.
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX2_EXTENSIONS - Success
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
-- 
-- 3.11.4.0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS
-- Performing Test protobuf_HAVE_BUILTIN_ATOMICS - Success
-- Caffe2 protobuf include directory: $<BUILD_INTERFACE:/home/sriharsha/Desktop/opensource/pytorch/third_party/protobuf/src>$<INSTALL_INTERFACE:include>
-- Trying to find preferred BLAS backend of choice: MKL
-- MKL_THREADING = OMP
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Modules/FindMKL.cmake:213 (FIND_PACKAGE)
  cmake/Modules/FindMKL.cmake:307 (CHECK_ALL_LIBRARIES)
  cmake/Dependencies.cmake:136 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for cblas_sgemm
-- Looking for cblas_sgemm - found
-- MKL libraries: /home/sriharsha/miniconda3/envs/dev_pytorch/lib/libmkl_intel_lp64.so;/home/sriharsha/miniconda3/envs/dev_pytorch/lib/libmkl_gnu_thread.so;/home/sriharsha/miniconda3/envs/dev_pytorch/lib/libmkl_core.so;/home/sriharsha/miniconda3/envs/dev_pytorch/lib/libiomp5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/libdl.so
-- MKL include directory: /home/sriharsha/miniconda3/envs/dev_pytorch/include
-- MKL OpenMP type: Intel
-- MKL OpenMP library: /home/sriharsha/miniconda3/envs/dev_pytorch/lib/libiomp5.so
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Brace yourself, we are building NNPACK
-- Performing Test NNPACK_ARCH_IS_X86_32
-- Performing Test NNPACK_ARCH_IS_X86_32 - Failed
-- Found PythonInterp: /home/sriharsha/miniconda3/envs/dev_pytorch/bin/python (found version "3.7.7") 
-- NNPACK backend is x86-64
-- Failed to find LLVM FileCheck
-- Found Git: /usr/bin/git (found version "2.25.1") 
-- git Version: v1.4.0-505be96a
-- Version: 1.4.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Failed
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Performing Test COMPILER_SUPPORTS_AVX512
-- Performing Test COMPILER_SUPPORTS_AVX512 - Success
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  third_party/fbgemm/CMakeLists.txt:59 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  third_party/fbgemm/CMakeLists.txt:59 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
CMake Warning at third_party/fbgemm/CMakeLists.txt:67 (message):
  OpenMP is not supported by the compiler


CMake Warning at third_party/fbgemm/CMakeLists.txt:130 (message):
  ==========


CMake Warning at third_party/fbgemm/CMakeLists.txt:131 (message):
  CMAKE_BUILD_TYPE = Release


CMake Warning at third_party/fbgemm/CMakeLists.txt:132 (message):
  CMAKE_CXX_FLAGS_DEBUG is -g


CMake Warning at third_party/fbgemm/CMakeLists.txt:133 (message):
  CMAKE_CXX_FLAGS_RELEASE is -O3 -DNDEBUG


CMake Warning at third_party/fbgemm/CMakeLists.txt:134 (message):
  ==========


-- Performing Test __CxxFlag__fno_threadsafe_statics
-- Performing Test __CxxFlag__fno_threadsafe_statics - Success
-- Performing Test __CxxFlag__fno_semantic_interposition
-- Performing Test __CxxFlag__fno_semantic_interposition - Success
-- Performing Test __CxxFlag__fmerge_all_constants
-- Performing Test __CxxFlag__fmerge_all_constants - Success
** AsmJit Summary **
   ASMJIT_DIR=/home/sriharsha/Desktop/opensource/pytorch/third_party/fbgemm/third_party/asmjit
   ASMJIT_TEST=FALSE
   ASMJIT_TARGET_TYPE=STATIC
   ASMJIT_DEPS=pthread;rt
   ASMJIT_LIBS=asmjit;pthread;rt
   ASMJIT_CFLAGS=-DASMJIT_STATIC
   ASMJIT_PRIVATE_CFLAGS=-Wall;-Wextra;-fno-math-errno;-fno-threadsafe-statics;-fno-semantic-interposition;-DASMJIT_STATIC
   ASMJIT_PRIVATE_CFLAGS_DBG=
   ASMJIT_PRIVATE_CFLAGS_REL=-O2;-fmerge-all-constants
-- Could NOT find Numa (missing: Numa_INCLUDE_DIR Numa_LIBRARIES) 
CMake Warning at cmake/Dependencies.cmake:748 (message):
  Not compiling with NUMA.  Suppress this warning with -DUSE_NUMA=OFF
Call Stack (most recent call first):
  CMakeLists.txt:472 (include)


-- Using third party subdirectory Eigen.
-- Found PythonInterp: /home/sriharsha/miniconda3/envs/dev_pytorch/bin/python (found suitable version "3.7.7", minimum required is "3.0") 
-- Found PythonLibs: /home/sriharsha/miniconda3/envs/dev_pytorch/lib/libpython3.7m.so.1.0 (found suitable version "3.7.7", minimum required is "3.0") 
-- Using third_party/pybind11.
-- pybind11 include dirs: /home/sriharsha/Desktop/opensource/pytorch/cmake/../third_party/pybind11/include
-- Could NOT find MPI_C (missing: MPI_C_LIB_NAMES MPI_C_HEADER_DIR MPI_C_WORKS) 
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) 
-- Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND) 
    Reason given by package: MPI component 'Fortran' was requested, but language Fortran is not enabled.  

CMake Warning at cmake/Dependencies.cmake:1006 (message):
  Not compiling with MPI.  Suppress this warning with -DUSE_MPI=OFF
Call Stack (most recent call first):
  CMakeLists.txt:472 (include)


CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Dependencies.cmake:1061 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  cmake/Dependencies.cmake:1061 (find_package)
  CMakeLists.txt:472 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning at cmake/Dependencies.cmake:1079 (message):
  Not compiling with OpenMP.  Suppress this warning with -DUSE_OPENMP=OFF
Call Stack (most recent call first):
  CMakeLists.txt:472 (include)


-- Found CUDA: /usr (found version "10.1") 
-- Caffe2: CUDA detected: 10.1
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 10.1
-- Found CUDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so  
-- Found cuDNN: v7.6.5  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.5;5.0;5.2;6.0;6.1;7.0;7.5;7.5+PTX
-- Added CUDA NVCC flags for: -gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_75,code=compute_75
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.5;5.0;5.2;6.0;6.1;7.0;7.5;7.5+PTX
CMake Warning at cmake/External/nccl.cmake:65 (message):
  Objcopy version is too old to support NCCL library slimming
Call Stack (most recent call first):
  cmake/Dependencies.cmake:1233 (include)
  CMakeLists.txt:472 (include)


-- Could NOT find CUB (missing: CUB_INCLUDE_DIR) 
CMake Warning (dev) at third_party/gloo/CMakeLists.txt:21 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_BENCHMARK'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found CUDA: /usr (found suitable version "10.1", minimum required is "7.0") 
-- CUDA detected: 10.1
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (NCCL) does
  not match the name of the calling package (nccl).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  third_party/gloo/cmake/Modules/Findnccl.cmake:45 (find_package_handle_standard_args)
  third_party/gloo/cmake/Dependencies.cmake:91 (find_package)
  third_party/gloo/CMakeLists.txt:75 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find NCCL (missing: NCCL_INCLUDE_DIR NCCL_LIBRARY) 
CMake Warning at third_party/gloo/cmake/Dependencies.cmake:96 (message):
  Not compiling with NCCL support.  Suppress this warning with
  -DUSE_NCCL=OFF.
Call Stack (most recent call first):
  third_party/gloo/CMakeLists.txt:75 (include)


CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/CTest.cmake:50 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'BUILD_TESTING'.
Call Stack (most recent call first):
  third_party/tensorpipe/third_party/libuv/CMakeLists.txt:13 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Performing Test UV_LINT_W4
-- Performing Test UV_LINT_W4 - Failed
-- Performing Test UV_LINT_WALL
-- Performing Test UV_LINT_WALL - Success
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER
-- Performing Test UV_LINT_NO_UNUSED_PARAMETER - Success
-- Performing Test UV_LINT_STRICT_PROTOTYPES
-- Performing Test UV_LINT_STRICT_PROTOTYPES - Success
-- Performing Test UV_LINT_EXTRA
-- Performing Test UV_LINT_EXTRA - Success
-- Found uv: 1.37.0 (found version "1.37.0") 
CMake Warning at cmake/Dependencies.cmake:1351 (message):
  Metal is only used in ios builds.
Call Stack (most recent call first):
  CMakeLists.txt:472 (include)


Generated: /home/sriharsha/Desktop/opensource/pytorch/build/third_party/onnx/onnx/onnx_onnx_torch-ml.proto
Generated: /home/sriharsha/Desktop/opensource/pytorch/build/third_party/onnx/onnx/onnx-operators_onnx_torch-ml.proto
-- 
-- ******** Summary ********
--   CMake version         : 3.18.0
--   CMake command         : /home/sriharsha/miniconda3/envs/dev_pytorch/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 9.3.0
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL;ONNX_ML=1;ONNXIFI_ENABLE_EXT=1
--   CMAKE_PREFIX_PATH     : /home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages;/usr
--   CMAKE_INSTALL_PREFIX  : /home/sriharsha/Desktop/opensource/pytorch/torch
--   CMAKE_MODULE_PATH     : /home/sriharsha/Desktop/opensource/pytorch/cmake/Modules;/home/sriharsha/Desktop/opensource/pytorch/cmake/public/../Modules_CUDA_fix
-- 
--   ONNX version          : 1.7.0
--   ONNX NAMESPACE        : onnx_torch
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
--   ONNXIFI_ENABLE_EXT    : OFF
-- 
--   Protobuf compiler     : 
--   Protobuf includes     : 
--   Protobuf libraries    : 
--   BUILD_ONNX_PYTHON     : OFF
-- 
-- ******** Summary ********
--   CMake version         : 3.18.0
--   CMake command         : /home/sriharsha/miniconda3/envs/dev_pytorch/bin/cmake
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 9.3.0
--   CXX flags             :  -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -Wnon-virtual-dtor
--   Build type            : Release
--   Compile definitions   : TH_BLAS_MKL;ONNX_ML=1;ONNXIFI_ENABLE_EXT=1
--   CMAKE_PREFIX_PATH     : /home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages;/usr
--   CMAKE_INSTALL_PREFIX  : /home/sriharsha/Desktop/opensource/pytorch/torch
--   CMAKE_MODULE_PATH     : /home/sriharsha/Desktop/opensource/pytorch/cmake/Modules;/home/sriharsha/Desktop/opensource/pytorch/cmake/public/../Modules_CUDA_fix
-- 
--   ONNX version          : 1.4.1
--   ONNX NAMESPACE        : onnx_torch
--   ONNX_BUILD_TESTS      : OFF
--   ONNX_BUILD_BENCHMARKS : OFF
--   ONNX_USE_LITE_PROTO   : OFF
--   ONNXIFI_DUMMY_BACKEND : OFF
-- 
--   Protobuf compiler     : 
--   Protobuf includes     : 
--   Protobuf libraries    : 
--   BUILD_ONNX_PYTHON     : OFF
-- Found CUDA with FP16 support, compiling with torch.cuda.HalfTensor
-- Adding -DNDEBUG to compile flags
-- Checking prototype magma_get_sgeqrf_nb for MAGMA_V2
-- Checking prototype magma_get_sgeqrf_nb for MAGMA_V2 - True
-- Compiling with MAGMA support
-- MAGMA INCLUDE DIRECTORIES: /home/sriharsha/miniconda3/envs/dev_pytorch/include
-- MAGMA LIBRARIES: /home/sriharsha/miniconda3/envs/dev_pytorch/lib/libmagma.a
-- MAGMA V2 check: 1
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Looking for cpuid.h
-- Looking for cpuid.h - found
-- Performing Test HAVE_GCC_GET_CPUID
-- Performing Test HAVE_GCC_GET_CPUID - Success
-- Performing Test NO_GCC_EBX_FPIC_BUG
-- Performing Test NO_GCC_EBX_FPIC_BUG - Success
-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success
-- Performing Test CXX_HAS_AVX_1
-- Performing Test CXX_HAS_AVX_1 - Failed
-- Performing Test CXX_HAS_AVX_2
-- Performing Test CXX_HAS_AVX_2 - Success
-- Performing Test CXX_HAS_AVX2_1
-- Performing Test CXX_HAS_AVX2_1 - Failed
-- Performing Test CXX_HAS_AVX2_2
-- Performing Test CXX_HAS_AVX2_2 - Success
-- AVX compiler support found
-- AVX2 compiler support found
-- Performing Test BLAS_F2C_DOUBLE_WORKS
-- Performing Test BLAS_F2C_DOUBLE_WORKS - Failed
-- Performing Test BLAS_F2C_FLOAT_WORKS
-- Performing Test BLAS_F2C_FLOAT_WORKS - Success
-- Performing Test BLAS_USE_CBLAS_DOT
-- Performing Test BLAS_USE_CBLAS_DOT - Success
-- Found a library with BLAS API (mkl).
-- Found a library with LAPACK API (mkl).
disabling ROCM because NOT USE_ROCM is set
-- MIOpen not found. Compiling without MIOpen support
-- MKLDNN_CPU_RUNTIME = OMP
-- Intel MKL-DNN compat: set DNNL_ENABLE_CONCURRENT_EXEC to MKLDNN_ENABLE_CONCURRENT_EXEC with value `ON`
-- Intel MKL-DNN compat: set DNNL_BUILD_EXAMPLES to MKLDNN_BUILD_EXAMPLES with value `FALSE`
-- Intel MKL-DNN compat: set DNNL_BUILD_TESTS to MKLDNN_BUILD_TESTS with value `FALSE`
-- Intel MKL-DNN compat: set DNNL_LIBRARY_TYPE to MKLDNN_LIBRARY_TYPE with value `STATIC`
-- Intel MKL-DNN compat: set DNNL_CPU_RUNTIME to MKLDNN_CPU_RUNTIME with value `OMP`
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_C)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  third_party/ideep/mkl-dnn/cmake/OpenMP.cmake:61 (find_package)
  third_party/ideep/mkl-dnn/CMakeLists.txt:114 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) 
CMake Warning (dev) at /home/sriharsha/miniconda3/envs/dev_pytorch/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:273 (message):
  The package name passed to `find_package_handle_standard_args` (OpenMP_CXX)
  does not match the name of the calling package (OpenMP).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  cmake/Modules/FindOpenMP.cmake:565 (find_package_handle_standard_args)
  third_party/ideep/mkl-dnn/cmake/OpenMP.cmake:61 (find_package)
  third_party/ideep/mkl-dnn/CMakeLists.txt:114 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) 
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) 
CMake Error at third_party/ideep/mkl-dnn/cmake/OpenMP.cmake:95 (message):
  OpenMP library could not be found.  Proceeding might lead to highly
  sub-optimal performance.
Call Stack (most recent call first):
  third_party/ideep/mkl-dnn/CMakeLists.txt:114 (include)


-- Configuring incomplete, errors occurred!
See also "/home/sriharsha/Desktop/opensource/pytorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/sriharsha/Desktop/opensource/pytorch/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "setup.py", line 734, in <module>
    build_deps()
  File "setup.py", line 318, in build_deps
    cmake=cmake)
  File "/home/sriharsha/Desktop/opensource/pytorch/tools/build_pytorch_libs.py", line 59, in build_caffe2
    rerun_cmake)
  File "/home/sriharsha/Desktop/opensource/pytorch/tools/setup_helpers/cmake.py", line 329, in generate
    self.run(args, env=my_env)
  File "/home/sriharsha/Desktop/opensource/pytorch/tools/setup_helpers/cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_PYTHON=True', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_INSTALL_PREFIX=/home/sriharsha/Desktop/opensource/pytorch/torch', '-DCMAKE_PREFIX_PATH=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages', '-DNUMPY_INCLUDE_DIR=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/python3.7/site-packages/numpy/core/include', '-DPYTHON_EXECUTABLE=/home/sriharsha/miniconda3/envs/dev_pytorch/bin/python', '-DPYTHON_INCLUDE_DIR=/home/sriharsha/miniconda3/envs/dev_pytorch/include/python3.7m', '-DPYTHON_LIBRARY=/home/sriharsha/miniconda3/envs/dev_pytorch/lib/libpython3.7m.so.1.0', '-DTORCH_BUILD_VERSION=1.7.0a0+d80e0c6', '-DUSE_NUMPY=True', '/home/sriharsha/Desktop/opensource/pytorch']' returned non-zero exit status 1

I guess there seems to some issue with cmake taking the env path. Not able to get exactly what the problem is , if anyone has faced this let me know thanks.

hey, did you figure this out?

@Sriharsha-hatwar Were you able to find the solution to this problem? I am also getting the same error.

facing the same issue here…

The stacktrace seems to point to MKL so did you try to disable it for your source build or do you need it? In the latter case you might need to reinstall OpenMP and potentially other dependencies.

1 Like