I had this all working about a month ago and am trying to run everything again. I upgraded all the moving parts and am at the point where I am trying to run the tensorflow examples found here: tensorflow git models.
Setup:
Ubuntu 16.04
CUDA version: release 8.0, V8.0.61 (able to run deviceQuery etc.)
CUDNN_MAJOR 5 (It doesnt matter if this is 5.1 or 6)
Tensorflow backend version: 1.4.0 (not able to run examples )
keras version: 2.1.1
This is the error I get:
2017-11-20 15:18:00.209182: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating
TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX
1070, pci bus id: 0000:01:00.0, compute capability: 6.1) 2017-11-20
15:18:07.457924: E tensorflow/stream_executor/cuda/cuda_blas.cc:366]
failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
2017-11-20 15:18:07.474515: E
tensorflow/stream_executor/cuda/cuda_blas.cc:366] failed to create
cublas handle: CUBLAS_STATUS_NOT_INITIALIZED 2017-11-20
15:18:07.558178: E tensorflow/stream_executor/cuda/cuda_blas.cc:366]
failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
2017-11-20 15:18:07.575864: E
tensorflow/stream_executor/cuda/cuda_blas.cc:366] failed to create
cublas handle: CUBLAS_STATUS_NOT_INITIALIZED 2017-11-20
15:18:07.593372: E tensorflow/stream_executor/cuda/cuda_blas.cc:366]
failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
2017-11-20 15:18:07.610621: E
tensorflow/stream_executor/cuda/cuda_blas.cc:366] failed to create
cublas handle: CUBLAS_STATUS_NOT_INITIALIZED 2017-11-20
15:18:08.431784: E tensorflow/stream_executor/cuda/cuda_dnn.cc:385]
could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR 2017-11-20
15:18:08.431816: E tensorflow/stream_executor/cuda/cuda_dnn.cc:352]
could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM 2017-11-20
15:18:08.431838: F tensorflow/core/kernels/conv_ops.cc:667] Check
failed: stream->parent()->GetConvolveAlgorithms(
conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms)
Aborted (core dumped)
Any advice would be much appreciated.
EDIT: This question: tensorflow running error with cublas is similar - but the answer did not work for me.
This is not much of a solution - but its the only one that worked:
CUDNN 6 doesn’t play nicely with TF. So if you have the library anywhere it crashes. Basically it’s version control not memory or paths. Had to make sure CUDNN v6 was no where to be found and TF was version 1.2 not 1.4.
Final set up: Ubuntu 16.04. CUDA 8, CUDNN 5.1, TF 1.2.
Installing tf version can be done with:
$ sudo apt install tensorflow-gpu==1.2
This helped me through the dark times: TensorFlow Framework and listed a couple tests along the way for sanity checking.
Related
I was trying to deploy an R Shiny app that works perfectly when I run it locally. But when I deploy the app, it shows an error message in some of the outputs: "Error: An error has occurred. Check your logs or contact the app author for clarification.".
After reading a few threads, I think it has to do with the loading of the packages.
I am using the following packages:
library(shiny)
library(magrittr)
library(shinyjs)
library(DT)
library(ggthemes)
library(shinythemes)
library(r2symbols)
library(caret)
# install.packages("PresenceAbsence")
library(glmnet)
library(tidyverse)
# install.packages("devtools")
I got the following warnings while deploying the app from a fresh new session. I'm not particularly clear about what is going wrong (since the app works on my R session). Could you please suggest to me things I should try to get the app work on the server too?
Loading required package: shiny
Warning: package ‘shiny’ was built under R version 3.6.3
Warning: package ‘shinyjs’ was built under R version 3.6.3
You can use shinyjs to call your own JavaScript functions:
https://deanattali.com/shinyjs/extend
Attaching package: ‘shinyjs’
The following object is masked from ‘package:shiny’:
runExample
The following objects are masked from ‘package:methods’:
removeClass, show
Warning: package ‘DT’ was built under R version 3.6.3
Attaching package: ‘DT’
The following objects are masked from ‘package:shiny’:
dataTableOutput, renderDataTable
Warning: replacing previous import ‘vctrs::data_frame’ by ‘tibble::data_frame’ when loading ‘dplyr’
Warning: package ‘ggthemes’ was built under R version 3.6.3
Warning: package ‘shinythemes’ was built under R version 3.6.3
Warning: package ‘r2symbols’ was built under R version 3.6.3
Attaching package: ‘r2symbols’
The following object is masked from ‘package:ggplot2’:
sym
Warning: package ‘caret’ was built under R version 3.6.3
Loading required package: lattice
Warning: package ‘lattice’ was built under R version 3.6.3
Attaching package: ‘PresenceAbsence’
The following objects are masked from ‘package:caret’:
sensitivity, specificity
Warning: package ‘glmnet’ was built under R version 3.6.3
Loading required package: Matrix
Loaded glmnet 4.0-2
Warning: package ‘tidyverse’ was built under R version 3.6.3
-- Attaching packages -------------------------------------------------------------------------- tidyverse 1.3.0 --
v tibble 3.0.4 v dplyr 1.0.0
v tidyr 1.0.2 v stringr 1.4.0
v readr 1.3.1 v forcats 0.4.0
v purrr 0.3.3
Warning: package ‘tibble’ was built under R version 3.6.3
Warning: package ‘dplyr’ was built under R version 3.6.3
-- Conflicts ----------------------------------------------------------------------------- tidyverse_conflicts() --
x tidyr::expand() masks Matrix::expand()
x tidyr::extract() masks magrittr::extract()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x purrr::lift() masks caret::lift()
x tidyr::pack() masks Matrix::pack()
x purrr::set_names() masks magrittr::set_names()
x dplyr::sym() masks r2symbols::sym(), ggplot2::sym()
x tidyr::unpack() masks Matrix::unpack()
Listening on http://127.0.0.1:6757
More details:
I also mention my output in the server section that does not show up when deployed to the Shiny server but works when run from the local PC. The pred_prob_func() uses a random forest from caret package and gets a predicted probability using a random forest model (ranger). I'm not even sure that package loading is a problem but I guess so. However, I don't know why it would work on my PC and not on the Shiny server. Problems in versions?
Outputs:
# Heatmap predicted probabilities
output$Heatmap_predicted_probabilities <- renderPlot({
plot(x=seq(0,1,0.01), y=rep(0,101), main="Heatmap of predicted probabilities", xlab="The square cross symbol represents the predicted probability based on input values on the dashboard", ylab="", xlim=c(0,1), ylim=c(-0.1,0.1), yaxt="n", bty="n", pch=15, cex=20, col=hsv(0.05, seq(0,1,length.out = 101), 0.80))
points(x=pred_prob_func(input_list())$pred_prob, y=0, lwd=2, pch=7, cex=4)
})
I found the solution and I thought I'd post it here for others who may face the same problem in the future. Apparently, it wasn't a problem of versions. When I ran the app with only calling the 'caret' package it worked fine on my local PC. But it didn't work when uploaded to the Shiny server. I realized it's not enough to call only the 'caret' package but I also need to call the 'ranger' library because I was doing a random forest using 'caret' that used 'ranger'. Although it works without calling 'ranger' separately on my local PC, the app only runs smoothly on the server when I add both these lines:
library(ranger)
library(caret)
I am using a module called pymatgen (http://pymatgen.org). There is a function within pymatgen
which displayed a graphical representation of an structure object. pymatgen requires VTK and
the VTK python bindings. I have installed both on my CentOS 7 system. Yum reports
%yum list installed |grep -i vtk vtk.x86_64
6.1.0-5.el7 #epel vtk-python.x86_64
6.1.0-5.el7 #epel vtk-qt.x86_64
6.1.0-5.el7#epel vtk-qt-python.x86_64#epel
in ipython (4.2.1)
In [1]: import pymatgen as mg
In [2]: from pymatgen.vis.structure_vtk import StructureVis
In [3]: struct = mg.Structure.from_file('POSCAR')
In [4]: StructureVis(struct)
libGL error: No matching fbConfigs or visuals found libGL error:
failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 150 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 44
Current serial number in output stream: 45
I am confused by this error as VTK is installed. I am using the CentOS 7 machine via a
remote X11 client (on a Macintosh using Mac OS X 10.11.5).
Does anyone have a suggestion as to how to resolve this problem as it is preventing me from using the visualization environment.
I'm using AWS EC2 Ubuntu 14.04 to test my OpenGL + SDL2 application. I am using SDL version 2.0.2. Because AWS EC2 is headless, I am using xvfb and use this script in /etc/init.d/xvfb:
XVFB=/usr/bin/Xvfb
XVFBARGS=":99 -ac -screen 0 1024x768x24"
PIDFILE=/tmp/cucumber_xvfb_99.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)
echo -n "Stopping virtual X frame buffer: Xvfb"
/sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE
rm -f $PIDFILE
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
exit 1
esac
exit 0
These are the linux command before i run the app :
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sleep 3
But I got "Failed to connect to the Mir Server" error from calling SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)
I am actually doing this because I follow instruction from https://docs.travis-ci.com/user/gui-and-headless-browsers/ and want to do the same in my AWS machine. I tried it also with travis, and The xvfb script is also taken from travis ci setup.
Not sure if this is gonna help but these are the output from glxinfo | grep OpenGL :
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
So, I guess essentially my question is : how to setup OpenGL (preferably version 3) + SDL2 in headless Ubuntu 14.04 ?
Thanks in advance
You have two options.
Use a real X11 server. Headless OpenGL is not supported by most OpenGL implementations. This will allow you to use hardware acceleration. You will need to choose an EC2 instance with the right hardware support.
Use OSMesa. This will give you a software-only implementation that does not require X11 or any other window server at all.
It is normal / expected to get Gallium + llvmpipe as the implementation when hardware acceleration is not available. This is fine. If you need a newer version of OpenGL, you will want to install a newer version of Mesa. Mesa 10.1.3 is more than two years old at this point (it's from May 2014). Getting a newer version of Mesa either means using an alternate repo, installing a different version of Ubuntu, or compiling Mesa yourself.
If you compile Mesa yourself, you can configure it for OSMesa ("off-screen Mesa") which means it will have no dependencies on X11. See Off-screen Rendering for more details.
So, It turns out I need to put this into ~/.bashrc :
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb stop
sh -e /etc/init.d/xvfb start
sleep 3
so that the above script will be run everytime I connect to the machine.
But then, I got a different error saying that the SDL_GL_CreateContext failed. Like #dietrich-app said, I need to update my mesa. The oibaf's graphic drivers ppa are no longer working (every google searches seem to suggest to use that) because it does not support ubuntu 14.04 anymore. I tried to compile mesa on my own but compiling dependencies are very time consuming and cumbersome. Finally, after hours of searching, I found this https://wiki.ubuntu.com/Kernel/LTSEnablementStack and copy paste the following command from that link :
sudo apt-get install --install-recommends linux-generic-lts-wily xserver-xorg-core-lts-wily xserver-xorg-lts-wily xserver-xorg-video-all-lts-wily xserver-xorg-input-all-lts-wily libwayland-egl1-mesa-lts-wily
And I got my mesa updated, and can now run OpenGL + SDL2 on AWS EC2 headless
Thank you for all the helpo
When running an app that uses Qt 4.7 on my Fedora 19 box I am getting the following errors from the application:
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/Matthew.Hoggan/.drirc: No such file or directory.
libGL error: failed to load driver: swrast ERROR: Error failed to create progam.
I do not see these errors in a stock X11 application where the context is configured using glx. I am assuming this is because Qt uses egl underneath. The same thing happens when using the EGL 3 emulator from http://malideveloper.arm.com/develop-for-mali/tools/opengl-es-3-0-emulator/ while running their cube example.
I have already verified that both xorg-x11-drv-nvidia-libs.i686 and yum install xorg-x11-drv-nvidia-libs.x86_64 rpms are installed.
My system information is:
Linux localhost.localdomain 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20 21:22:24 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
And glxinfo is:
[Matthew.Hoggan#localhost QtTest]$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
Any suggestions here or is more information needed?
We were able to get rid of the same error messages for octave-4.0.0-rc1 which also use Qt. The bug hunting history can be found here.
It turned out to be an incorrect runpath in a shared library (.so). The runpath contained /usr/lib64. Hence at runtime the /usr/lib64/libGL.so was loaded, instead of the right nvidia /usr/X11R6/lib64/libGL.so.
Workaround
Find the lib or executable which has the incorrect runpath with ldd <app or lib> and chrpath -l <app or lib>
Replace the wrong path with the correct one (without the offending /usr/lib64) using chrpath -r <correct path> <app or lib>
The following one-liner did this for liboctgui.so. Just replace "liboctgui.so" by your value.
chrpath -r $(chrpath -l liboctgui.so | cut -d '=' -f '2' | awk '{gsub(/\/usr\/lib64/, "")}; 1') liboctgui.so
Origin
The incorrect runpath was picked up at compilation time from an irrelevant
-L/usr/lib64 in libQt*.la files located in /usr/lib64.
The comment #18 explains why it is wrong.
And indeed, lib*.la files should not be packaged, according to OpenSUSE own recommendations
Avoid packaging libtool config files (.la files). If you do not
package a static library, and if you are also placing the shared
library in a standard search directory (i.e. %_lib, /usr/%_lib), they
will not be needed.
Removing lib*.la from /usr/lib64 and rebuilding fixed the problem for good.
I have trouble on updating tizen-2.1 on my test device
I follow manual step by step, but some errors when I use lthor tool.
Can you give me some insight?
my environment
current tizen version on test device => 2.0
ubuntu 13.04 (on vmware 9)
modemmanager off
Error Message:
line 345: failed to read signature bytes
line 629: handshake failed
line 958: failed to open port (null)
Unfortunatelly, sometimes it's needed to uninstall modemmanger at all:
sudo apt-get purge modemmanager
Also VMWare may be at the bottom of your problem.
please follow these steps
I updated my device by following these steps.
https://wiki.tizen.org/wiki/Flash_Tizen_2.1_Image_to_Reference_Device