RStudio Crashing with Tensorflow

Hi everyone,

I'm attempting to get Tensorflow up and running on my computer. After following all of the installation instructions, I then decided to try the following sample program provided:


sess = tf$Session()

hello <- tf$constant('Hello, TensorFlow!')

a <- tf$constant(10)
b <- tf$constant(32)
sess$run(a + b)

However, whenever I run this, RStudio crashes with a fatal error.

I'm not sure how to find out what this error is (so that would be a great first step).

I'm currently using Tensorflow 2.0.0 and have tried installing both Tensorflow 1.4 and 1.5 as it was suggested that an older version may work to avoid this problem however this was unsuccessful.

The only message that I'm getting in the console is that the Dynamic Library cudart64_100.dll is opened successfully.

Any guidance would be greatly appreciated! Thanks all.

Can you try saving this code to an .R file say test.R and then run in the console like:

Rscript path/to/test.R

With this, you will be able to see the traceback and may post more information so we can debug what's wrong in your installation.

1 Like

When I run that in the RStudio Console, I get:

Error: unexpected string constant in "Rscript "C:/path/test.R"

Oh sorry, I meant the Terminal tab

1 Like

Thanks! I'll have to give that a try. I need admin privileges for the terminal so I have to wait till tomorrow to try!

So for some reason, the terminal wouldn't load at all and none of the suggestions I found were able to help. We decided to uninstall everything and start over from scratch. Thanks for your help!

So I tried reinstalling everything and while tensorflow is still causing RStudio to crash at least I can use the terminal now. I ran the test script in the terminal and got this error:

F tensorflow/stream_executor/cuda/] Check failed: err == cudaSuccess || err == cudaErrorInvalidValue Unexpected CUDA error: invalid argument