"Error starting process: Cannot create pty " on macOS high Sierra using nsight cuda 9.0

"Error starting process: Cannot create pty " on macOS high Sierra using nsight cuda 9.0

env:
macOS high Sierra 10.13.1 (17B48)
cuda cuda_9.0.176
Macbook Pro with an NVIDIA GeForce GT 750M GPU

step:
nsight->new Cuda C/C++ Project->import CUDA sample->select any project- >Finish
-> Run as Local C/C++Application

Result:
Error starting process
Cannot create pty
Cannot create pty
Cannot create pty
https://imgur.com/Gh8z2WF

by running compiled binary directly using bash:
1.------
$ ./Debug/b
./b Starting…
Set-up, based upon target device GMEM size…
getTargetDeviceGlobalMemSize
cudaGetDeviceCount
CUDA error at …/src/FDTD3dGPU.cu:29 code=35(cudaErrorInsufficientDriver) “cudaGetDeviceCount(&deviceCount)”
2.-------
sudo ./Debug/b
Password:
./b Starting…

Set-up, based upon target device GMEM size…
getTargetDeviceGlobalMemSize
cudaGetDeviceCount
CUDA error at …/src/FDTD3dGPU.cu:29 code=35(cudaErrorInsufficientDriver) “cudaGetDeviceCount(&deviceCount)”

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
ok.png

Error starting process: Cannot create pty
ref: https://stackoverflow.com/questions/46439257/error-starting-process-cannot-create-pty-eclipse-on-mac
it seems nsight needs to update CDT plugin to higher version

Hi,vicre

It seems you can’t run the application successfully without nsight.
Suppose driver mismatch issue.

@veraj
how will you solve the driver mismatch issue ? i am pretty sure I installed the latest Cuda Dev toolkit and cuda driver.

Hi, vicre

Are you install cuda driver and the toolkit from the same package ?
Have you rebooted after the installation ?
Have you tried other driver ?

Can you try on other SDK like 0_Simple/vectorAdd, 1_Utilities/deviceQuery, 0_Simple/matrixMul first to check if they can run successfully ?

@veraj
++++++++++++++++++++++
Are you install cuda driver and the toolkit from the same package ? yes
++++++++++++++++++++++
Have you rebooted after the installation ? yes
++++++++++++++++++++++
Have you tried other driver ? yes
CUDA Mac Driver
Latest Version: CUDA 9.0.222 driver for MAC
Release Date: 11/02/2017

Previous Releases:
CUDA 9.0.214 driver for MAC
Release Date: 10/18/2017

CUDA 9.0.197 driver for MAC
Release Date: 09/27/2017
++++++++++++++++++++++
execution using bash:
Failed to allocate device vector A (error code CUDA driver version is insufficient for CUDA runtime version)!

execution using nsight:
Error starting process
Cannot create pty
Cannot create pty
Cannot create pty
+++++++++++++++++++++
Can you try on other SDK like 0_Simple/vectorAdd, 1_Utilities/deviceQuery, 0_Simple/matrixMul first to check if they can run successfully ?
tried , failed

Hi, cicre

Where did you get 9.0.214 and 9.0.197?
As far as I know, only 9.0.176 published.

Also this is a set up issue and not nsight eclipse edition issue.

As we do not so familiar with Mac platform use and do not have the env to reproduce, I think it is better to post the problem at https://devtalk.nvidia.com/default/board/58/cuda-setup-and-installation/

Best Regards
VeraJ

i mean cuda driver http://www.nvidia.com/object/mac-driver-archive.html

1.Now cuda error is fixed --> CUDA driver version is insufficient for CUDA runtime version (return code 35 ) by installing CUDA 387.99 driver for MAC ,Release Date: 12/08/2017
2.But Nsight CDT plugin error still exists : “Cannot create pty”, Nsight CDT plugin has no bug fix for this problem for such a long time.
Just don’t understand Why Nvidia provided us with malfunctioned “PRODUCT”!!!

Hi, vicre

Sorry for the trouble you met.

Now you can run cuda sample like 0_Simple/vectorAdd successfully on your Mac without nsight, right ?

Then please launch nsight in a clean env, (you can do this by cleaning the workspace created before)
and click Run->Run Configurations->Right click “C/C++ Application” and choose “new”->Select the built “vectorAdd” as the application->Run

I finally found a fix! The issue arises from two problems: there is a known bug in the Eclipse version that Nsight uses, and a newer and unsupported version of Xcode is installed.

Problem 1 fix:
To fix the issue, we will be installing a newer version of Eclipse, and then installing the Nsight Plugin on top of it.

  1. Install the CUDA Toolkit
  2. Download the latest Eclipse version (I am using the one from: https://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/oxygen2)
  3. Install the Nvidia Nsight Eclipse Plugin by following the guide: http://docs.nvidia.com/cuda/nsightee-plugins-install-guide/index.html
    Please note that the archive is stored at “/Developer/NVIDIA/CUDA-9.1/nsightee_plugins”

Problem 2 fix:
To fix this issue, we will be downloading an older version of the Xcode command line tools, and then setting them as default.

  1. Download Xcode 8.3.3 and Command Line Tool for 8.3.2 from https://developer.apple.com/download/more/
  2. Extracting the downloaded Xcode8.3.3.xip will produce Xcode.app. Rename it to Xcode_8.3.3.app and move it to /Applications
  3. Make the old Xcode the default one by running the following command:
sudo xcode-select -s /Applications/Xcode_8.3.3.app/Contents/Developer
  1. Install the Command line tools
  2. Run ‘sudo xcode-select --switch /Library/Developer/CommandLineTools’
  3. Run ‘clang --version’ in terminal and and compare to the following result:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin