error in training T matrix - Google Groups:
https://groups.google.com/forum/#!msg/kaldi-help/4eYLI7VxMAA/pSUAZS4BDAAJ
'via Blog this'
Blog Archive
-
▼
2016
(147)
-
▼
July
(19)
- error in training T matrix - Google Groups
- Cuda 8 nnet2 Error With Multiple GPUs - Unable to ...
- kaldi debug: Bug in cumatrix
- nvidia-smi: Control Your GPUs | Microway
- Problem on "train_pnorm_fast.sh" running eun_7a_96...
- 美国奥林匹克国家公园游记(Olympic national Park)--雨林和雪山_Rick_新浪博客
- 10 Screen Command Examples to Manage Linux Terminals
- Stardust theme song - Rule The World
- Amazon.com Help: Pair Your Mobile Device with Echo
- Tesla M40 Deep Learning Training Accelerator | NVIDIA
- Roth IRA 的应用_天道酬勤_新浪博客
- 401k还是Roth 401k | 天下无鸭
- Building an Emotional Artificial Brain — Apple Inc...
- CUDA using notes
- How-To Install VNC Desktop on Ubuntu 14.04
- Does my employer's matching contribution count tow...
- 他死了,但永远留在了游戏里 外国人也向他致敬(图) | www.wenxuecity.com
- 西雅图清凉一夏 · 美食清单 - Seattle GPS 西雅图玩乐攻略Seattle GPS 西雅...
- I-485/756/131 DIY分享, Check list, 有图~~(非140) - 未名空间...
-
▼
July
(19)
Saturday, July 30, 2016
Thursday, July 21, 2016
Cuda 8 nnet2 Error With Multiple GPUs - Unable to Get a GPU - Google Groups
Cuda 8 nnet2 Error With Multiple GPUs - Unable to Get a GPU - Google Groups:
On NVidia 7.5 I noticed that nvidia-smi -c 3 did not work very well for me, but nvidia-smi -c 1 gave a deprecated warning but worked.
Worth a try before downgrading.
'via Blog this'
On NVidia 7.5 I noticed that nvidia-smi -c 3 did not work very well for me, but nvidia-smi -c 1 gave a deprecated warning but worked.
Worth a try before downgrading.
'via Blog this'
kaldi debug: Bug in cumatrix
Bug in cumatrix - Google Groups: "ASSERTION_FAILED (nnet-train-simple:DiffSoftmaxPerRow():cu-matrix.cc:1577) : 'SameDim(value, diff) && SameDim(value, *this)'"
'via Blog this'
'via Blog this'
Problem on "train_pnorm_fast.sh" running eun_7a_960.sh on LIBRISPEECH with 2 NVIDIA tesla K40c CUDA boards - Google Groups
Problem on "train_pnorm_fast.sh" running eun_7a_960.sh on LIBRISPEECH with 2 NVIDIA tesla K40c CUDA boards - Google Groups:
'via Blog this'
'via Blog this'
Wednesday, July 20, 2016
10 Screen Command Examples to Manage Linux Terminals
10 Screen Command Examples to Manage Linux Terminals:
Screen is a full-screen software program that can be used to multiplexes a physical console between several processes (typically interactive shells). It offers a user to open several separate terminal instances inside a one single terminal window manager.
The screen application is very useful, if you are dealing with multiple programs from a command line interface and for separating programs from the terminal shell. It also allows you to share your sessions with others users and detach/attach terminal sessions.
On my Ubuntu 10.04 Server Edition, Screen has been installed by default. But, in Linux Mint does not have screen installed by default, I need to install it first using apt-get command before using it. Please follow your distribution installation procedure to install screen.
# apt-get install screen (On Debian based Systems)
# yum install screen (On RedHat based Systems)
Actually, Screen is a very good command in Linux which is hidden inside hundreds of Linux commands. Let’s start to see the function of Screen.
Start screen for the first time
Just type screen at the command prompt. Then the screen will show with interface exactly as the command prompt.
pungki@mint ~ $ screen
Show screen parameter
When you enter the screen, you can do all your work as you are in the normal CLI environment. But since the screen is an application, so it have command or parameters.
Type “Ctrl-A” and “?” without quotes. Then you will see all commands or parameters on screen.
Screen key bindings, page 1 of 1. Command key: ^A Literal ^A: a break ^B b flow ^F f lockscreen ^X x pow_break B screen ^C c width W clear C focus ^I log H pow_detach D select ' windows ^W w colon : hardcopy h login L prev ^H ^P p ^? silence _ wrap ^R r copy ^[ [ help ? meta a quit \ split S writebuf > detach ^D d history { } monitor M readbuf < suspend ^Z z xoff ^S s digraph ^V info i next ^@ ^N sp n redisplay ^L l time ^T t xon ^Q q displays * kill K k number N remove X title A dumptermcap . lastmsg ^M m only Q removebuf = vbell ^G fit F license , other ^A reset Z version v ^] paste . " windowlist -b - select - 0 select 0 1 select 1 2 select 2 3 select 3 4 select 4 5 select 5 6 select 6 7 select 7 8 select 8 9 select 9 I login on O login off ] paste .
To get out of the help screen, you can press “space-bar” button or “Enter“. (Please note that all shortcuts which use “Ctrl-A” is done without quotes).
Detach the screen
One of the advantages of screen that is you can detach it. Then, you can restore it without losing anything you have done on the screen. Here’s the sample scenario:
You are in the middle of SSH-on your server. Let’s say that you are downloading 400MB patch for your system using wget command.
The download process is estimated to take 2 hours long. If you disconnect the SSH session, or suddenly the connection lost by accident, then the download process will stop. You have to start from the beginning again. To avoid that, we can use screen and detach it.
Take a look at this command. First, you have to enter the screen.
pungki@mint ~ $ screen
Then you can do the download process. For examples on my Linux Mint, I am upgrading my dpkgpackage using apt-get command.
pungki@mint ~ $ sudo apt-get install dpkg
Sample Output
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: dpkg 1 upgraded, 0 newly installed, 0 to remove and 1146 not upgraded. Need to get 2,583 kB of archives. After this operation, 127 kB of additional disk space will be used. Get:1 http://debian.linuxmint.com/latest/ testing/main dpkg i386 1.16.10 [2,583 kB] 47% [1 dpkg 1,625 kB/2,583 kB 47%] 14,7 kB/s
While downloading in progress, you can press “Ctrl-A” and “d“. You will not see anything when you press those buttons. The output will be like this:
[detached from 5561.pts-0.mint] pungki@mint ~ $
Re-attach the screen
After you detach the screen, let say you are disconnecting your SSH session and going home. In your home, you start to SSH again to your server and you want to see the progress of your download process. To do that, you need to restore the screen. You can run this command:
pungki@mint ~ $ screen -r
And you will see that the process you left is still running.
When you have more than 1 screen session, you need to type the screen session ID. Use screen -ls to see how many screen are available.
pungki@mint ~ $ screen -ls
Sample Output
pungki@mint ~ $ screen -ls
There are screens on:
7849.pts-0.mint (10/06/2013 01:50:45 PM) (Detached)
5561.pts-0.mint (10/06/2013 11:12:05 AM) (Detached)
2 Sockets in /var/run/screen/S-pungki
If you want to restore screen 7849.pts-0.mint, then type this command.
pungki@mint ~ $ screen -r 7849
Using Multiple Screen
When you need more than 1 screen to do your job, is it possible? Yes it is. You can run multiple screen window at the same time. There are 2 (two) ways to do it.
First, you can detach the first screen and the run another screen on the real terminal. Second, you do nested screen.
Switching between screens
When you do nested screen, you can switch between screen using command “Ctrl-A” and “n“. It will be move to the next screen. When you need to go to the previous screen, just press “Ctrl-A” and “p“.
To create a new screen window, just press “Ctrl-A” and “c“.
Logging whatever you do
Sometimes it is important to record what you have done while you are in the console. Let say you are aLinux Administrator who manage a lot of Linux servers.
With this screen logging, you don’t need to write down every single command that you have done. To activate screen logging function, just press “Ctrl-A” and “H“. (Please be careful, we use capital ‘H’ letter. Using non capital ‘h’, will only create a screenshot of screen in another file named hardcopy).
At the bottom left of the screen, there will be a notification that tells you like: Creating logfile “screenlog.0“. You will find screenlog.0 file in your home directory.
This feature will append everything you do while you are in the screen window. To close screen to log running activity, press “Ctrl-A” and “H” again.
Another way to activate logging feature, you can add the parameter “-L” when the first time running screen. The command will be like this.
pungki@mint ~ $ screen -L
Lock screen
Screen also have shortcut to lock the screen. You can press “Ctrl-A” and “x” shortcut to lock the screen. This is handy if you want to lock your screen quickly. Here’s a sample output of lock screen after you press the shortcut.
Screen used by Pungki Arianto on mint. Password:
You can use your Linux password to unlock it.
Add password to lock screen
For security reason, you may want to put the password to your screen session. A Password will be asked whenever you want to re-attach the screen. This password is different with Lock Screenmechanism above.
To make your screen password protected, you can edit “$HOME/.screenrc” file. If the file doesn’t exist, you can create it manually. The syntax will be like this.
password crypt_password
To create “crypt_password” above, you can use “mkpasswd” command on Linux. Here’s the command with password “pungki123“.
pungki@mint ~ $ mkpasswd pungki123 l2BIBzvIeQNOs
mkpasswd will generate a hash password as shown above. Once you get the hash password, you can copy it into your “.screenrc” file and save it. So the “.screenrc” file will be like this.
password l2BIBzvIeQNOs
Next time you run screen and detach it, password will be asked when you try to re-attach it, as shown below:
pungki@mint ~ $ screen -r 5741 Screen password:
Type your password, which is “pungki123” and the screen will re-attach again.
After you implement this screen password and you press “Ctrl-A” and “x” , then the output will be like this.
Screen used by Pungki Arianto on mint. Password: Screen password:
A Password will be asked to you twice. First password is your Linux password, and the second password is the password that you put in your .screenrc file.
Leaving Screen
There are 2 (two) ways to leaving the screen. First, we are using “Ctrl-A” and “d” to detach the screen. Second, we can use the exit command to terminating screen. You also can use “Ctrl-A” and “K” to kill the screen.
That’s some of screen usage on daily basis. There are still a lot of features inside the screen command. You may see screen man page for more detail.
Monday, July 11, 2016
Stardust theme song - Rule The World
TAKE THAT LYRICS - Rule The World:
https://www.youtube.com/watch?v=6iOcaiD_zW0&index=3&list=PLhmyl8WYyLq1z-MiCpfGeqJjvbc31l4TJ
"Rule The World"
https://www.youtube.com/watch?v=6iOcaiD_zW0&index=3&list=PLhmyl8WYyLq1z-MiCpfGeqJjvbc31l4TJ
"Rule The World"
You light, the skies up above me
A star, so bright you blind me
Don't close your eyes
Don't fade away
Don't fade away
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
If walls break down, I will comfort you
If angels cry, oh I'll be there for you
You've saved my soul
Don't leave me now
Don't leave me now
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you,
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
'via Blog this'
A star, so bright you blind me
Don't close your eyes
Don't fade away
Don't fade away
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
If walls break down, I will comfort you
If angels cry, oh I'll be there for you
You've saved my soul
Don't leave me now
Don't leave me now
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you,
Yeah you and me we can ride on a star
If you stay with me girl, we can rule the world
Yeah you and me we can light up the sky
If you stay by my side, we can rule the world.
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
All the stars are coming out tonight
They're lighting up the sky tonight
For you
For you
Saturday, July 9, 2016
Amazon.com Help: Pair Your Mobile Device with Echo
Amazon.com Help: Pair Your Mobile Device with Echo:
To connect it with mobile phone is simple, I will skip it.
Now I will talk about to connect it with you laptop.
1) In you "Bluetooth Devices" add "ECHO"
2) Click "Show Bluetooth Devices" -- > Enable "Listen to music"
Pair Your Mobile Device with Echo
Your Echo is Bluetooth-enabled so you can stream popular audio services (like iTunes or Google Play Music) from a mobile device (such as your phone or tablet).
Before you begin
- Set your mobile device to Bluetooth pairing mode.
- Make sure your mobile device is in range of your Echo.
Note: Phone calls, text messages, and other notifications from your mobile device can't be received or read by Echo, and audio from Echo can't be sent to Bluetooth speakers or headphones.
- Say, "Pair." Alexa lets you know that Echo is ready to pair.Note: To exit Bluetooth pairing mode, say, "Cancel."
- Open the Bluetooth settings menu on your mobile device, and select your Echo. Alexa tells you if the connection is successful. You are now ready to stream audio from your mobile device to Echo.
- To disconnect your mobile device from Echo, say, "Disconnect."Note: After you pair your mobile device, you can immediately connect your Echo to your mobile device. Turn on Bluetooth on your mobile device, and then say, "Connect." If your Echo is paired with multiple mobile devices, it connects to the most recently paired device.
To connect it with mobile phone is simple, I will skip it.
Now I will talk about to connect it with you laptop.
1) In you "Bluetooth Devices" add "ECHO"
2) Click "Show Bluetooth Devices" -- > Enable "Listen to music"
Friday, July 8, 2016
Tesla M40 Deep Learning Training Accelerator | NVIDIA
Tesla M40 Deep Learning Training Accelerator | NVIDIA: "NVIDIA TESLA M40"
24 GB of GDDR5 memory
288 GB/sec memory bandwidth
Qualified to deliver maximum uptime in the datacenter
- See more at: http://www.nvidia.com/object/tesla-m40.html#sthash.vdRA1Iym.dpuf
'via Blog this'
TESLA M40 FEATURES AND SPECS:
- NVIDIA Maxwell™ architecture
- Up to 7 Teraflops of single-precision performance with NVIDIA GPU Boost™
- 3072 NVIDIA CUDA® cores
- See more at: http://www.nvidia.com/object/tesla-m40.html#sthash.vdRA1Iym.dpuf
'via Blog this'
Thursday, July 7, 2016
401k还是Roth 401k | 天下无鸭
https://yetian9.wordpress.com/2009/01/13/401k%E8%BF%98%E6%98%AFroth-401k/
天下无鸭
23岁的九局下半转啊转,我把帽子反戴还在期待逆转
401k还是Roth 401k
with 20 comments
入职的时候要选养老金计划,要从401k和Roth 401k里面选,当时也不是很懂,随便选了一个。只是在最近研究完了税表之后,才真正明白了401k和Roth 401k的区别,总结一下请大家批评指正。
401k概述
401k,读作Four One Kay,是一项雇主资助的养老金计划的框架,因发布在the Internal Revenue Code section 401(k)(税法401条k款)而得名。大多数企业都提供基于该条款制定的养老金计划,作为员工福利的一部分,通称401k计划。不同雇主的401k计划不一定完全相同。下文中某些讨论是基于某公司的计划,可能不适用于其他公司,会用星号标出。
401k是IRA的衍生物。与IRA(Individual Retirement Account,或个人养老金计划)的最大区别是,401k对于个人收入没有苛刻的准入限制,于是可以让更多的人受益。
与中国不同,美国的养老金计划(401k和IRA)不是强制性的。那么,如何鼓励个人参与其中呢?联邦政府的鼓励政策主要包括以下两点:
第一,401k(和IRA)的缴纳部分(contribution amount)是推迟收税(tax deferred)的。401k的缴纳部分,不计入个人当年收入,相当于在当年是免税的。税款计算发生在401k(和IRA)的钱被提取出来那一年。
第二,401k(和IRA)的盈利部分是推迟收税的。401k帐户里的钱,拥有者可以在金融市场上自由(*)支配,购买股票债券基金等。投资所得不计入当年收入。税款计算发生在401k(和IRA)的钱被提取出来那一年。
相应的,为了避免401k(和IRA)成为逃税的工具,联邦政府也出台了一些限制,包括:对于年度缴纳额的限制(2008年401k的缴纳上限是15500美元),对于提前支取的罚金(早于59.5岁支取,除税款外,还需额外支付10%的罚金),和对于高层高收入员工的限制(没有仔细研究,反正未来几年我是没有希望的。。)。
大部分企业针对401k计划也有鼓励政策:雇主匹配(employer match)。雇主会缴纳一定的金额(通常与员工缴纳金额成一定比例,通常有上限)到员工的401k帐户。
Roth 401k概述
Roth 401k和Roth IRA分别是401k和IRA的衍生物。与401k和IRA的最大区别是,Roth 401k和Roth IRA的缴纳金额是来自与税后收入的,所以在支取的时候不需要缴税。Roth 401k和Roth IRA的盈利部分(投资所得)也是不需要缴税的,如果符合如下条件:到达退休年龄,并且帐户开通五年以上;否则,需要计入支取当年收入计税,并且缴纳10%罚款。计税的数额按照如下公式计算:计税的数额与支取总额的比例等于Roth帐户的盈利部分与Roth帐户总额的比例。
Roth 401k诞生于2006年,历史并不很久,所以普及率也不很高。国税局(IRS)要求提供Roth 401k计划的雇主必须同时提供401k计划供员工选择。
比较401k和Roth 401k
放到401k帐户里的钱,迟早也要上税,那么,把钱存到401k帐户,而不是普通的银行账户,有什么好处呢?主要有三点:
1.401k的缴纳金额有可能享受到一个更低的税率: 一,依据历史统计,税率是在慢慢降低的,一方面是由于政策的改变,另一方面是由于通货膨胀;二,美国实行累进制税率,收入越高,税率越高,对于大部分人而言,退休之后的收入要明显低于在职期间的收入。
2.投资所得免税。
3.雇主匹配。
那么,把钱存到Roth 401k帐户,而不是401k帐户,有什么好处呢?
Roth 401k的年度缴纳额比401k更高,于是长期的预期收益更高。虽然Roth 401k和401k帐户共享同一个上限(2008年是15500美元),但是由于Roth 401k的上限是基于税后的缴纳额,于是存在退休金账户里的钱更多。
在你到达59岁,可以开始合法支取退休金账户的时候,Roth 401k帐户可以一笔全部支取,而不需要缴纳任何额外费用。而401k帐户则需要合理选择支取时间表分成几年来支取,因为401k的支取是要记入当年收入的,大笔支取会造成税率升高,从而违背了加入401k计划的初衷。
刚刚参加工作的年轻人,如果当前的税率很低,并且预期将来的收入会增加,宜加入Roth 401k。
那么,与Roth 401k相比,401k有什么好处呢?
401k的缴纳部分,不计入当年收入,带来的额外好处是:很多减免税条款是基于当年调整后总收入(AGI)的,参与401k有可能让你享受到额外的减免税条款,或者让你避免额外的税款(此处特指替代最低税,AMT)。Roth 401k没有这项好处。
把钱放到自己的账户里,而不是交给IRS,永远是件好事。也许将来你能找到其他避税的方案呢。
两种计划在其他方面还有什么区别呢?
通常情况下,401k和Roth 401k不可以提前支取,除非是在离开当前雇主之后(*)。
在特定情况下,401k可以申请提前支取,称为困境支取,条件包括:高额医疗费用、教育费用,或者购买主要住所。某公司的规定是,如果申请了困境支取,那么未来半年之内不能缴纳401k,也不能参加ESPP。对于年收入十万的人来说,机会成本是3000元左右(*)。
也可以向自己的401k帐户申请贷款。贷款额不超过总额的一半,上限50000元。借给你钱的人是未来的你,所以利息也还给未来的你,还到你的401k帐户中去。从401k贷款的坏处包括:减缓401k的增长;401k贷款的利息要交两份税(还到401k账户的利息是税后收入,而将来提取的时候还要再次缴税);银行贷款的利息可以用来减税,而401k贷款的利息不能用来减税。
还有什么要注意的呢?
401k和Roth 401k有风险。持续为正的收益率,需要你付出足够的精力来管理。2008年,纽约三大股指跌回了十年前的水平,这意味着,如果在这十年里你没有对自己的投资做任何调整,很有可能颗粒无收。或者血本无归,如果你不幸选择了北电、雷曼兄弟或者华盛顿互惠。
401k的首要好处,未来税率可能会降低,只是若干种未来中的一种。你没有办法预测你在退休时的收入,你也没有办法预测在你退休时的政策,此外,通货膨胀,社会安全福利,你能享受到的或者没有办法继续享受的减税条款,都会影响你在退休时的税率。
参加401k和Roth 401k要尽早。假定投资的年收益率稳定在6.5%,并且每月存进401k(或Roth 401k)的数额是一定的,那么如果路人甲只在二十岁到三十岁这十年间缴纳401k(或Roth 401k),而路人乙在三十岁到六十岁这三十年间缴纳401k(或Roth 401k),你会惊奇的发现,在两个人退休的时候,路人甲有更多的钱可以支配。
下面总结一些典型的场景:
如果希望取得一个近期和远期平衡的退休计划,请考虑401k。
如果对现金有爱,请考虑Roth 401k:在换工作的时候,可以立即变现前雇主匹配;在到达59岁时,可以一次取出全部退休金。
如果对退休后生活的重视程度非常高,请最大化Roth 401k缴纳额,并且开通IRA/Roth IRA。
如果希望尽快买房,那么:如果雇主匹配不超过50%,请不要加入任何计划;否则,可以考虑加入401k。原因是:从401k贷款只能取出一半,如果雇主匹配为50%,那么贷款额度为个人缴纳额的75%,正好相当于不加入养老金计划时手里拿到的现金。与401贷款相比,不加入任何计划是在牺牲退休后利益的同时换取中远期的利益。(记住401k贷款也是要还的。)401k困境提取通常是个更差的选择。
如果在取得绿卡之前永久性离开美国,Roth 401k可以一次性取出,401k则比较麻烦。如果一次性取出,将会面对较高税率和10%罚款。有人认为可以分多年取出,按照非居民(Non-Resident)身份报税,理论上如果每年取出的额度足够低,每年只需缴纳10%罚款,而不需要缴税。听起来不错,不过还未经证实。
免责声明
最后我想说的是,美国的税务制度真是太复杂了,所以请考虑雇一个税务顾问(Tax advisor),并且/或者自己通读一遍所有的相关国税局出版物(IRS Publication),请不要相信你朋友的讲解,或者这篇部落格。。
Tuesday, July 5, 2016
CUDA using notes
How to get the cuda version? nvcc --version
How to measure GPU usage? watch nvidia-smi
How do I find out the model of my graphics card? lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GK110B [GeForce GTX Titan Black] (rev a1)
More:
http://kaldi-asr.org/doc/cudamatrix.html
How to measure GPU usage? watch nvidia-smi
How do I find out the model of my graphics card? lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GK110B [GeForce GTX Titan Black] (rev a1)
More:
http://kaldi-asr.org/doc/cudamatrix.html
The CUDA Matrix library
The CUDA matrix library provides access to GPU-based matrix operations with an interface similar to The Kaldi Matrix library.
The general principle is that if you want to be able to run a particular part of the computation the GPU, you would declare the relevant quantities as typeCuMatrix or CuVector instead of Matrix or Vector. Then, if you have configured Kaldi to use the GPU and if the Kaldi program you are running has initialized access to the GPU, those operations will run on the GPU. Otherwise, they will run on the CPU. CuMatrix and CuVector quantities store their contents in GPU memory space, if you have configured for GPU and your program has initialized the GPU device.
You can't mix CuMatrix and CuVector with Matrix and Vector in matrix operations, because they live in different memory spaces, but you can copy from one to the other. Kaldi does not try to automatically decide which operations are best done on GPU: it is all under the control of the programmer.
If the
If the script doesn't find the location where you installed the CUDA toolkit but you want to use it, you can use an option like
configure
script sees that the NVidia compilation tool nvcc
is on the path when it is run, it assumes you want to compile for GPU, and will define HAVE_CUDA=1
and set other Makefile variables to enable GPU compilation. You can disable this if you don't want it by calling configure
with –use-cuda=no
.If the script doesn't find the location where you installed the CUDA toolkit but you want to use it, you can use an option like
–cudatk-dir=/opt/cuda-4.2
. If you want to tell whether Kaldi has been configured to use CUDA, you can grep for nvcc
in kaldi.mk
; if the string appears, then it has been configured to use CUDA. In scripts, you can check the return status of the program cuda-compiled
: it returns success (0) if you compiled for CUDA.
You can also tell from the logs whether a program is using the GPU. If it is using the GPU, you'll see lines like this near the top of the program's output:
LOG (nnet-train-simple:IsComputeExclusive():cu-device.cc:229) CUDA setup operating under Compute Exclusive Mode. LOG (nnet-train-simple:FinalizeActiveGpu():cu-device.cc:194) The active GPU is [1]: Tesla K10.G2.8GB \ free:3519M, used:64M, total:3583M, free/total:0.982121 version 3.0
In addition to configuring at the Makefile to use CUDA, if any individual program wants to use GPU operations it needs to have code like the following:
#if HAVE_CUDA==1 CuDevice::Instantiate().SelectGpuId(use_gpu); #endif
where
use_gpu
is a string, typically a command-line option, that can take the following values:"yes"
: use the GPU (or crash if one is not available)."no"
don't use the GPU."optional"
use the GPU if the machine it's running on has GPUs attached."wait"
: like"yes"
but if the GPUs are running other processes, the program will wait indefinitely until one becomes free.
If a program doesn't take the
–use-gpu
command line option, that generally means that it hasn't been programmed to support the use of GPU operations, even if the code it runs contains the CuVector and CuMatrix types. Usually we only run specific tasks on the GPU- mainly neural net training.
NVidia GPUs (which is the only kind Kaldi supports) have various "compute modes": "default", "process exclusive", "thread exclusive". This controls whether or not the GPU is configured to run multiple processes at the same time. Kaldi is intended to be run in "exclusive mode"; whether it's process exclusive or thread exclusive doesn't matter. You can find out what mode your GPU is running in as follows:
# nvidia-smi --query | grep 'Compute Mode' Compute Mode : Exclusive_Thread
You can set the correct mode by typing
nvidia-smi -c 1
. You might want to do this in a startup script so it happens each time you reboot.
Rather than calling the malloc and free functions that NVidia provides, Kaldi does caching of previously released memory so that we don't have to incur the overhead of NVidia's malloc. This was done because at one point we were running in Amazon's cloud and found that NVidia's malloc was very slow. This was probably caused by the virtualization, and we're not sure whether that problem still exists. Anyway, the memory caching can cause a problem if for some reason you run using the default (non-exclusive) compute mode, because it can cause allocation failures. You can disable it at the code level by calling
CuDevice::Instantiate().DisableCaching()
, if needed.How-To Install VNC Desktop on Ubuntu 14.04
How-To Install VNC Desktop on Ubuntu 14.04 - Vultr.com:
'via Blog this'
This guide will walk you through installing a VNC desktop on Ubuntu 14.04 with the free VNC software, TightVNC.
Step 1: Install components
We need to install the following components for a proper desktop with VNC.
- xOrg
- A desktop (LXDE)
- An Ubuntu VNC server (TightVNC)
Run the following command to install them.
sudo apt-get install xorg lxde-core tightvncserver
Step 2: Setup VNC
We have to set up a VNC password for our VNC connection. This password is limited to 8 characters in length. Longer passwords will be truncated.
tightvncserver :1
Next, we need to config the xstartup because VNC doesn't know how to launch LXDE.
nano ~/.vnc/xstartup
In this file...
- Remove the
#
before#x-window-manager &
- Add the line
lxterminal &
- Add the line
/usr/bin/lxsession -s LXDE &
Your config should now resemble the following:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
lxterminal &
/usr/bin/lxsession -s LXDE &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
Save the file with Ctrl + O, then exit nano with Ctrl + X.
Step 3: Restart VNC
To restart VNC we have to shut it down with:
tightvncserver -kill :1
... and start it again:
vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
Step 4: Connect to the VNC server
Start your favorite VNC Client and connect to your server's IP with the ending
:1
. For example: 123.123.123.123:1
.Enjoy your new VNC server!
FAQ:
How to change VNC password on Linux
~/.vnc/passwdis the default location where the VNC password is stored. The password is stored at this location when the vncserver starts for a first time. To update or change your VNC password you should use vncpasswd command. vncpasswd will promt you two times to enter your new password:
$ vncpasswd
Password:
Verify:
This can help you when you forget old password'via Blog this'
Subscribe to:
Posts (Atom)