edit: solved. I was not using the proper version of
cudnn. After downloading and copying over cuDNN v5.1 Library for Windows 10, everything works fine so far. I should have followed tensorflow windows guidelines more
closely.
I just spent some time to set up a windows system to run
r-tensorflow with keras and tensorflow as a backend.
I followed these blog instructions, and I am able to get the hello world example to work. However, when I continue to some R keras examples
, several will just crash and exit RGui during running the training phase,
e.g. mnist_cnn fails at the training model block.
# train and evaluate
model %>% fit(
x_train, y_train,
batch_size = batch_size,
epochs = epochs,
verbose = 1,
validation_data = list(x_test, y_test)
)
A Visual Studio JIT popup shows "An unhandled win32 exception occured in Rgui.exe[10456]." And VS editor shows, "Unhandled exception at 0x00007FFFEA2734BE (ucrtbase.dll) in Rgui.exe: Fatal program exit requested."
There is very little load on CPU and or GPU during runtime
(less than 30%). Any ideas on how to further debug are appreciated.
Hardware/Software/Setup:
windows 10 Pro 64 bit OS x64 cpu
intel i7-7700 #3.60GHz
64G ram
R 64 bit 3.4.1
Anaconda 3/Python 3.5.4
Nvidia 1060 6G
CUDA 8.0 V8.0.60
Visual Studio 2015 community edition
using
library(tensorflow)
use_condaenv("r-tensorflow")
library(keras)
I also just ran in Rstudio w/ rdesktop log diagnostics on the file and got the following log after crash (I see it cannot find file, but not certain what file).
20 Aug 2017 01:29:32 [rdesktop] ERROR system error 2 (The system cannot find the file specified);
OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84;
LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288
20 Aug 2017 01:29:42 [rdesktop] ERROR system error 2 (The system cannot find the file specified);
OCCURRED AT: virtual void rstudio::core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:/Users/Administrator/rstudio/src/cpp/core/include/core/http/NamedPipeAsyncClient.hpp:84;
LOGGED FROM: void rstudio::desktop::NetworkReply::onError(const rstudio::core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:288
edit: stepping through several more exampes, several seem to work fine -- it could just be specific to the particular code and my setup. I don't know enough right now to troubleshoot the code ideosyncracies. Those that crash also seem to do so at the model fitting stage. I'll update a list on crash/no-crash as I test. pass = no-crash, fail = crash and exit
mnist_hierarchical_rnn # pass
mnist_transfer_cnn # fail
variational_autoencoder_deconv # fail
stateful_lstm # pass
variational_autoencoder # pass
reuters_mlp # pass
mnist_mlp # pass
mnist_irnn # pass
mnist_cnn # fail
mnist_antirectifier # fail
Related
I just tried running a code on my webcam to be fed into a CNN for predictions in Jupyter Notebook and it killed the kernel when running. I looked into the CMD and it returned this error:
Could not load library cudnn_cnn_infer64_8.dll. Error code 193
I have seen similar errors online but I'm not sure how they relate.
I can provide my code if that is useful but I would like to see if there is anything I can do first.
I am using an Acer Nitro 5 laptop if that is relevant (I saw similar errors in relation to Nvidia but I am unsure). I am doing this through Windows 11.
I was following the steps given at Gluon Documentation to run JavaFX on Raspberry Pi 4 via DRM. I downloaded the JavaFX EA 16 builds from here.
javafx.properties file :
javafx.version=16-internal
javafx.runtime.version=16-internal+28-2020-11-10-180413
javafx.runtime.build=28
After cloning the samples repository containing hellofx, I compiled it via javac (according to the steps) and then ran this command to run it using DRM:
sudo -E java -Dmonocle.platform=EGL -Djava.library.path=/opt/arm32hfb-sdk/lib -Dmonocle.egl.lib=/opt/arm32fb-sdk/lib/libgluon_drm.so --module-path /opt/arm32fb-sdk/lib --add-modules javafx.controls -cp dist/. hellofx.HelloFX
However, this caused the following error :
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x9c3314dc, pid=734, tid=746
#
# JRE version: OpenJDK Runtime Environment (11.0.9+11) (build 11.0.9+11-post-Raspbian-1deb10u1)
# Java VM: OpenJDK Server VM (11.0.9+11-post-Raspbian-1deb10u1, mixed mode, serial gc, linux-)
# Problematic frame:
# C [libgluon_drm.so+0x14dc] getNativeWindowHandle+0x54
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/pi/samples/CommandLine/Modular/CLI/hellofx/hs_err_pid734.log
#
# If you would like to submit a bug report, please visit:
# Unknown
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted
It seems that while loading libgluon_drm.so in JavaFXSDK/lib/ fails at getNativeWindowHandle
What's weird is that after I ran sudo apt install libegl* mesa* libgl*, it actually succeeded but was asking me to set variable ENABLE_GLUON_COMMERCIAL_EXTENSIONS as true, which I had already done.
However, after rebooting, it started showing the same error.
I am using a Raspberry Pi 4 Model B with 2GB RAM. It is running on Raspberry Pi OS 32-Bit with desktop.
I had performed all of this on a clean installation.
Pi4 has both vc4 for render, and v3d for 3D. You can probe the devices for their capabilities - only one should acknowledge that it has DRIVER_RENDER or DRIVER_MODESET capabilities.
Pi4 DRM questions
The card which JavaFX selects by default is /dev/dri/card1. In my case, /dev/dri/card0 was the one to be used for render, and not card1. I solved the issue by using the following runtime argument :
-Degl.displayid=/dev/dri/card0
The JavaFX Version I used was 16-ea+5.
I am able to run a number of GUI applications successfully on windows subsystem for linux (WSL), Ubuntu 14.04.4 LTS, using X-forwarding (via MobaXterm).
I recently tried to run an application that uses OpenGL. Although the GUI opens, there are a number of errors and some aspects of the GUI don't work properly. The errors are:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f88e21d9ba8>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
libGL error: failed to load driver: swrast
I can get rid of the swrast error by setting export LIBGL_ALWAYS_INDIRECT=1 but the other errors remain:
QT error: 1
QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7fed3689e828>
QT error: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
A typical error when attempting to use part of the GUI is:
WARNING: QT error: 1 (Gui.qtMessageHandler:51)
WARNING: QT error: <PyQt5.QtCore.QMessageLogContext object at 0x7f9b35e7b6d8> (Gui.qtMessageHandler:51)
WARNING: QT error: QOpenGLWidget: Failed to make context current (Gui.qtMessageHandler:51)
I can run glxgears, but I realise this only checks a fraction of OpenGLs functions. If I run glmark2 I get the following:
glmark2
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
Error: Glmark2 needs OpenGL(ES) version >= 2.0 to run (but version string is: '1.4 (4.0.0 - Build 10.18.10.4358)')!
Error: main: Could not initialize canvas
If I run find /usr -iname "*libGL.so*" -exec ls -l -- {} + suggested on this link https://askubuntu.com/questions/541343/problems-with-libgl-fbconfigs-swrast-through-each-update I get the following output but I'm not sure if this indicates an error or not?
lrwxrwxrwx 1 root root 14 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
-rw-r--r-- 1 root root 413968 Jan 12 2016 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
Running glxinfo seems to indicate the on-chip graphics card is used (there is a separate AMD graphics card but I don't think it's necessary to use that).
glxinfo | grep render
direct rendering: No (LIBGL_ALWAYS_INDIRECT set)
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
OpenGL renderer string: Intel(R) HD Graphics 4000
How can I successfully run OpenGL applications via WSL?
I installed R version 3.5.1 (on Windows 7 x64 desktop PC) following by Rtools 3.5 and rstan (via install.packages())
Rstan is failing with multi-core support like so:
library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = 3) # or any number above 2
fit <- stan(file = '8schools.stan', data = schools_dat,
iter = 3, chains = 4)
with error:
Error in checkForRemoteErrors(val) :
4 nodes produced errors; first error: unable to load shared object 'C:/Users/ubashir/AppData/Local/Temp/RtmpIHGdm6/file194833bbb82.dll':
LoadLibrary failure: Access is denied.
However if i change the options line to:
options(mc.cores = 1) # or any other number up to 8
The code works. Anyone know a solution besides using only 1 core?
Thanks
There exist two relevant issues on the rstan GitHub project site: Issue #491 and Issue #492.
This issue seems to be related to an empty /etc/hosts file. I don't own a Windows machine, but this file seems to reside in c:\Windows\System32\Drivers\etc\hosts.
You need to make sure that the file contains a line:
127.0.0.1 localhost
If necessary edit and save the file, and try again. (You potentially might have to do the whole restart Windows shenanigans...)
We have referred the steps provided in the following link to build the r studio source code
click here
We have build the source code using QT Creator, while running the r studio project we got the
Output like below screen shot. How to get the entire output
And also we have face some error while running the projects. Please find the error information below
Project Name: consoleio
Starting C:\rstudio-master\src\qtcreator-build\session\consoleio\consoleio.exe...
Error: Not enough arguments
Usage: consoleio.exe <program> [program-arguments]
C:\rstudio-master\src\qtcreator-build\session\consoleio\consoleio.exe exited with code 1
Project Name :diagnostic
Starting C:\rstudio-master\src\qtcreator-build\diagnostics\diagnostics.exe...
Log file: rdesktop.log
--------------------------------------------------
04 Aug 2014 08:29:43 [rdesktop] ERROR system error 2 (The system cannot find the file specified); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279
07 Aug 2014 11:21:10 [rdesktop] ERROR system error 231 (All pipe instances are busy); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279
07 Aug 2014 11:21:11 [rdesktop] ERROR system error 231 (All pipe instances are busy); OCCURRED AT: virtual void core::http::NamedPipeAsyncClient::connectAndWriteRequest() C:\Users\Administrator\rstudio\src\cpp\core\include/core/http/NamedPipeAsyncClient.hpp:83; LOGGED FROM: void desktop::NetworkReply::onError(const core::Error&) C:\Users\Administrator\rstudio\src\cpp\desktop\DesktopNetworkReply.cpp:279…………..
ProjectName: rsession
ProjectName :urlopener
Starting C:\rstudio-master\src\qtcreator-build\desktop\urlopener\urlopener.exe...
SHIMVIEW: ShimInfo(Complete)
Error: Not enough arguments
C:\rstudio-master\src\qtcreator-build\desktop\urlopener\urlopener.exe exited with code 1
How to resolve this error and debug the r studio source in QT creator
It looks like you're trying to run against the 64 bit version of R. Here's how to switch to 32 bit:
Open a new command prompt in your qtcreator-build directory
Run desktop\rstudio.exe
Immediately after pressing Enter, hold down Ctrl (or just use Ctrl+Enter to run the command), and keep it held down while RStudio launches
When the "Choose R Version" dialog pops up, select a 32 bit version of R.
See this page for more details (scroll to the bottom for Windows-specific build help).