tag:blogger.com,1999:blog-26059436121708470822024-03-05T14:13:06.842+05:30Through my Memory Lane..!Rajesh's Tinkering around with TechnologiesRajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.comBlogger48125tag:blogger.com,1999:blog-2605943612170847082.post-71300232439632400592020-12-16T14:51:00.002+05:302020-12-23T14:40:20.990+05:30Last Post !! Moved to new site<div dir="ltr" style="text-align: left;" trbidi="on">As I am getting old 😋, it seem like I can not remember many of my earlier tech encounters. This is the place I was logging so that I refer back later in time. 😂 Among several reasons</div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">- I had two sites: <a href="http://mrprajesh.blogspot.com/">Tech blog</a> and <a href="https://jeshthink.blogspot.com/">Personal blog</a> to maintain on blogger.</div><div dir="ltr" style="text-align: left;" trbidi="on">- It seem very difficult to post here. Rich text format. Yack.</div><div dir="ltr" style="text-align: left;" trbidi="on">- Searching is difficult. Now, I can <a href="https://mrprajesh.co.in/blog/search">search</a> with few key stokes. <br /></div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">So, I have decided to do move/log my tech counters+personal items from now on to my personal site. </div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on"><span style="font-size: medium;"><a href="https://mrprajesh.co.in/blog">mrprajesh.co.in/blog</a> //Simple blog with search!<br /></span></div><div dir="ltr" style="text-align: left;" trbidi="on"><span style="font-size: medium;"><a href="https://mrprajesh.co.in/rajzdocs">mrprajesh.co.in/rajzdocs</a> //Quick Cheat sheet</span></div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">Happy that Pandemic Year (2020) is finally coming to a end. Hope for a better year, next year 2021!</div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">Good bye blogger!</div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-45104210066029372892020-11-21T14:42:00.000+05:302020-12-23T14:43:44.607+05:30Climate and weather monitoring sites<div dir="ltr" style="text-align: left;" trbidi="on">Some links are outdated.</div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">
//TODO<br />
<br />
- rainfall in all substations in TN<br />
- Various Prediction Models<br />
<br />
There is a private weather blogger TN weatherman<br />
<a href="https://www.facebook.com/tamilnaduweatherman/posts">https://www.facebook.com/tamilnaduweatherman/posts</a><br />
<br />
I have seen weatherman using many different tools of IMD, and other things on the internet. This list heavily influences from him and my our finding on the internet. Thanks to Google.<br />
<br />
Doppler Radars (this has an accuracy of 30 mins)<br />
IMD Main - <a href="http://imd.gov.in/pages/radar_main.php?adta=chn">http://imd.gov.in/pages/radar_main.php?adta=chn</a><br />
IMD Dop - <a href="http://www.imd.gov.in/section/dwr/dynamic/dwr.htm">http://www.imd.gov.in/section/dwr/dynamic/dwr.htm</a><br />
IMD Anim - <a href="http://www.imd.gov.in/section/dwr/img/Animation/dop_ani_main.htm">http://www.imd.gov.in/section/dwr/img/Animation/dop_ani_main.htm</a><br />
<br />
<br />
<br />
Thunder Storm Nowcast<br />
<a href="http://nwp.imd.gov.in/ts/nowcast_new.php">http://nwp.imd.gov.in/ts/nowcast_new.php</a><br />
<br />
<br />
Chennai Live weather (down at times)<br />
<a href="http://59.90.28.39:8085/liveweather/index.php">http://59.90.28.39:8085/liveweather/index.php</a><br />
<br />
Chennai Lake levels<br />
<a href="https://chennaimetrowater.tn.gov.in/public/lake.html">https://chennaimetrowater.tn.gov.in/public/lake.html</a><br />
<br />
Customized Rainfall information System CRIS<br />
<a href="http://hydro.imd.gov.in/hydrometweb/(S(shcjnzfpnpbe0qedaom40lrj))/landing.aspx">http://hydro.imd.gov.in/hydrometweb/(S(shcjnzfpnpbe0qedaom40lrj))/landing.aspx</a><br />
Spatial>Daily <br />
<br />
Any City Forcast past 24 hours.<br />
<a href="http://imd.gov.in/pages/city_weather_show.php">http://imd.gov.in/pages/city_weather_show.php</a><br />
<br />
Automatic Weather Station (AWS) and Automatic Rain Gauge(ARG) Stations <br />
<a href="http://aws.imd.gov.in/">http://aws.imd.gov.in/</a><br />
> ARG DATA<br />
> Daily rainfall<br />
<br />
PDF of Rainfall by IMD daily(5PM) and past days<br />
<a href="http://www.imdchennai.gov.in/rsum.htm">http://www.imdchennai.gov.in/rsum.htm</a><br />
<br />
<br />
Ground Water Level - Chennai<br />
<a href="https://www.facebook.com/pg/CMWSSB/posts">https://www.facebook.com/pg/CMWSSB/posts</a><br />
<div>
<br />
Acronoyms<br />
<a href="http://www.rsmcnewdelhi.imd.gov.in/index.php?option=com_content&view=article&id=27&Itemid=173&lang=en">http://www.rsmcnewdelhi.imd.gov.in/index.php?option=com_content&view=article&id=27&Itemid=173&lang=en</a><br />
<br />
Non official site visualization sites<br />
Wind pattern - <a href="https://www.windy.com/?13.086,80.275,5">https://www.windy.com/?13.086,80.275,5</a><br />
Current Rain - <a href="https://www.rainviewer.com/">https://www.rainviewer.com</a><br />
Clouds pattern - <a href="https://meteologix.com/in/satellite/top-alert-15min.html">https://meteologix.com/in/satellite/top-alert-15min.html</a><br />
<br /></div>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-80886668959400673902020-02-27T17:40:00.000+05:302020-02-27T17:40:20.098+05:30[Resolved] - Cannot launch Nvidia Visual Profiler on Ubuntu / Mint<div dir="ltr" style="text-align: left;" trbidi="on">
My Linux Mint / Ubuntu 18.04 had openjdk 11.0.2 installed by default but it showed the below error. nvvp or Nvidia Visual Profiler (or even with nSight) <a href="https://docs.nvidia.com/cuda/profiler-users-guide/index.html#visual">requires jre-8 as a MUST</a>. <br />
<br />
$ nvvp <br />
WARNING: An illegal reflective access operation has occurred<br />WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/local/cuda-10.0/libnvvp/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar) to method java.net.URLClassLoader.addURL(java.net.URL)<br />WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller<br />WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations<br />WARNING: All illegal access operations will be denied in a future release<br />
<br />
<br />
<u><b><span style="font-size: large;">Work around measures</span></b></u><br />
<br />
<b>Step 1.</b> sudo apt install openjdk-8-jdk<br />
<b>Step 2. </b>nvvp -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java<br />
<br />
That's it! tata</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com1tag:blogger.com,1999:blog-2605943612170847082.post-39263560740322614632019-12-16T12:40:00.000+05:302020-03-28T11:46:37.513+05:30Building Gunrock on redhat/centOs<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<span style="font-size: x-large;">How to build the latest version of Gunrock (a popular GPU Graph analytic library) on Redhat/Centos based systems</span></h3>
<br />
Prerequisites:<br />
- cmake 3.10+<br />
- GCC 4.8+<br />
<br />
Although building gunrock is easy on Ubuntu 18.04, it is not easy for other OSs. <br />
In most of the RedHat rpms, cmake is not the latest. Sometimes we do not have root/admin rights to install. In such scenarios, below steps to build cmake/gunrock.<br />
<br />
<u><b>Build/Download cmake - 4 steps</b></u><br />
1. Download cmake*.tar.gz from <a href="https://cmake.org/download/">https://cmake.org/download/<b> </b></a><br />
download either src or binary <b> </b><br />
<br />
2. Extract<br />
<br />
3) // do either a or b<br />
<br />
a. if src, cd to cmake directory and do make<br />
b. if binary, do nothing <br />
<br />
<b></b><br />
4. To verify<br />
<span style="font-family: "courier new" , "courier" , monospace;">./cmake-3.14.7/bin/cmake --version</span><br />
<i>displays as below</i> <br />
cmake version 3.14.7<br />
<br />
CMake suite maintained and supported by Kitware (kitware.com/cmake).<br />
<br />
<b></b><br />
<br />
<u><b>Build Gunrock - 6 steps</b></u><br />
1.) Set and export CUDA Bin path to your cuda. Mine is 9.1. Note a non-default location!<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">CUDA_BIN_PATH=/usr/local/cuda-9.1</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">export CUDA_BIN_PATH</span><br />
<br />
2)<br />
<pre><span style="font-family: "courier new" , "courier" , monospace;">git clone --recursive https://github.com/gunrock/gunrock/
<span class="pl-c1">cd</span> gunrock</span></pre>
<pre></pre>
<br />
3) <br />
<pre></pre>
In gunrock folder, edit <i>CMakeLists.txt</i>
at the following lines as per your GPU card. Ours is Nvidia P100. So, I
have changed that corresponding flag from OFF to ON. Find your card name using <span style="font-family: "courier new" , "courier" , monospace;">nvidia-smi</span> command. <br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">if (CUDA_VERSION VERSION_EQUAL "8.0" OR CUDA_VERSION VERSION_GREATER "8.0")<br /> option(GUNROCK_GENCODE_SM60<br /> "ON to generate code for Compute Capability 6.0 devices <b>(e.g. Tesla P100)</b>"<br /> <b>ON)</b></span><br />
<br />
Note: This Step may not be needed due to this <a href="https://github.com/gunrock/gunrock/pull/665">#665 pull request </a><br />
<pre></pre>
<br />
4)<span style="font-family: "courier new" , "courier" , monospace;"> </span><br />
<pre><span style="font-family: "courier new" , "courier" , monospace;">mkdir build && cd build</span><span style="font-family: "courier new" , "courier" , monospace;"> </span></pre>
<pre><span style="font-family: "courier new" , "courier" , monospace;">~/install/cmake-3.14.7/bin/cmake ..</span></pre>
<br />
we are using the cmake which we downloaded/build previously.<br />
<b></b>
Note: Always make sure your build folder is empty before cmake. If you end up with
some errors due to cmake; make sure to delete all files and folders from
build before performing cmake again.<br />
<b></b><br />
<br />
<i>
Upon success. Should display the following:</i><br />
..<br />
-- Project Added: bc<br />
-- Project Added: bfs<br />
-- Project Added: color<br />
-- Project Added: geo<br />
-- Project Added: hits<br />
-- Project Added: knn<br />
-- Project Added: louvain<br />
-- Project Added: pr<br />
-- Project Added: pr_nibble<br />
-- Project Added: proj<br />
-- Project Added: rw<br />
-- Project Added: sage<br />
-- Project Added: sm<br />
-- Project Added: ss<br />
-- Project Added: sssp<br />
-- Project Added: tc<br />
-- Project Added: vn<br />
-- Configuring done<br />
-- Generating done<br />
-- Build files have been written to: /home/rajesh/tmp/gunrock/build2<br />
<br />
<br />
5) <span style="font-family: "courier new" , "courier" , monospace;">make</span><br />
<br />
Takes up to an hour or so as. If no error, then that's all. If you need only a specific algorithm (say SSSP), then read <b>A1</b> below. <br />
<br />
6) To test, cd to bin inside build dir<br />
<span style="font-family: "courier new" , "courier" , monospace;">./sssp market ../dataset/small/test_mst.mtx</span><br />
<br />
<i>...sample output..</i><br />
Distance Validity: PASS<br />
First 40 distances of the GPU result:<br />
[0:0 1:2 2:4 3:19 4:14 5:2147483647 6:2147483647 7:2147483647 8:2147483647 ]<br />
First 40 distances of the reference CPU result.<br />
[0:0 1:2 2:4 3:19 4:14 5:2147483647 6:2147483647 7:2147483647 8:2147483647 ]<br />
<br />
[sssp] finished.<br />
avg. elapsed: 0.551939 ms<br />
iterations: 4<br />
min. elapsed: 0.551939 ms<br />
max. elapsed: 0.551939 ms<br />
rate: 0.016306 MiEdges/s<br />
src: 0<br />
nodes_visited: 5<br />
edges_visited: 9<br />
load time: 7.15208 ms<br />
preprocess time: 943.713000 ms<br />
postprocess time: 0.494003 ms<br />
total time: 945.014000 ms<br />
<br />
YAY :-)<br />
<br />
<b>Appendix</b><br />
<b>A1)</b> You could build only a specific algorithm by setting an appropriate flag during your cmake as said here in<a href="https://gunrock.github.io/docs/#compilation"> advanced compilation</a>.<br />
e.g. Suppose if I want SSSP alone then<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">/cmake-3.14.7/bin/cmake -DGUNROCK_BUILD_APPLICATIONS=OFF -DGUNROCK_APP_SSSP=ON ..</span><br />
//This step builds SSSP alone when you do a make. <br />
<br />
<b></b>
<b>Errors in the past that lead to the above working steps: </b><br />
<br />
<b>E1)</b> CMake 3.10 or higher is required. You are running version 2.8.12.2<br />
<br />
<b>E2)</b> CMake Error at /home/rajesh/install/cmake-3.16.1-Linux-x86_64/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):<br />
Could NOT find CUDA: Found unsuitable version "8.0", but required is at<br />
least "9.0" (found /usr)<br />
Call Stack (most recent call first):<br />
/home/rajesh/install/cmake-3.16.1-Linux-x86_64/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:391 (_FPHSA_FAILURE_MESSAGE)<br />
/home/rajesh/install/cmake-3.16.1-Linux-x86_64/share/cmake-3.16/Modules/FindCUDA.cmake:1104 (find_package_handle_standard_args)<br />
CMakeLists.txt:41 (FIND_PACKAGE)<br />
<br />
<b> </b><br />
<b></b><br />
END- gunrock-cmd.txt</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-17879550824073330762019-09-14T22:56:00.000+05:302019-09-14T22:57:48.098+05:30Awesomeness of ffmpeg<div dir="ltr" style="text-align: left;" trbidi="on">
ffmpeg is a powerfuly CLI tool. It has helped me many times. Assuming that it is installed. <br />
<br />
<b>Question:</b> <u>How to covert a video file to an audio file using ffmpeg in Linux</u><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">$ ffmpeg -i input-video.mp4 output-audio.mp3</span><br />
<span style="font-family: "Courier New", Courier, monospace;">$ ffmpeg -i input-video.mp4 output-audio.wav </span><br />
<br />
<u><span style="background-color: yellow;"><b>Note:</b></span> </u><i>Supports most of the audio formats.</i><br />
<br />
<b>Question:</b> <u>How to increase the audio quality or amplfying the audio in a video using ffmpeg.</u><br />
<span style="font-family: "Courier New", Courier, monospace;"><br /></span>
<span style="font-family: "Courier New", Courier, monospace;">$ ffmpeg -i 'input-video.mp4' -vcodec copy -af "volume=30dB" 'output-video-30db.mp4' </span><br />
<br />
set <b>volume</b> appropriately as 10/20/30/40 DB depeding on how much audio you need to amplify in your input-video file. This works amazing well. You would not believe it. <br />
<br />
Tata, See you.</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-71120086787277601482019-09-14T22:36:00.003+05:302020-07-09T13:04:33.326+05:30MKV - dual or multi audio in a singe video file<div dir="ltr" style="text-align: left;" trbidi="on">
MKV is one the famous video format for the movie watchers/collectors online.<br />
WIKI says The Matroska Multimedia Container is a free, open-standard container format, a file format that can hold an<span style="background-color: yellow;"> <u>unlimited number of video, audio</u>,</span> picture, or subtitle tracks in one file.<br />
<br />
I am fan of the following feature. You can choose the audio language during play back. It work cools on vlc player. This would avoid creating or downloading multiple times say if we want a movie in Tamil as well as English.<br />
<br />
I was really surprised why YouTube or vimeo did not adopt to such kind of player. That can play multiple audios/language. Maybe it will come in future some day. Currently we have only different language subtitles for one video with single audio track. The future is <b>single video with multiple audio tracks</b>. This could be a boon for video creators.<br />
<br />
It would be nice to have a player like this below. In this below player click the <b>headphone</b> icon -- you can change the lang of video ENGLISH or SPANISH.<br />
<br />
<a href="https://paellaplayer.upv.es/demos/multi-audio-tracks/">https://paellaplayer.upv.es/demos/multi-audio-tracks/</a><br />
<br />
You could create a such a video. But we need a player(as above) to play such video on the web or our website. I still have not figured out how to add paella player to my site.<br />
<br />
On a side note. How do we create a such a video. It is easy. There is a tool called <a href="https://mkvtoolnix.download/downloads.html#ubuntu">MKVToolNix</a> GUI.<br />
</div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">Sooner or later YouTube will have this feature. <br /></div><div dir="ltr" style="text-align: left;" trbidi="on"><br /></div><div dir="ltr" style="text-align: left;" trbidi="on">
Okay. more later. Tata.</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-43042524934003930852019-09-14T21:32:00.001+05:302019-09-14T21:33:33.842+05:30Using GNU Parallel on Linux<div dir="ltr" style="text-align: left;" trbidi="on">
Sometime ago I had created a C/C++ program to<a href="https://mrprajesh.blogspot.com/2016/03/check-lan-machines-up-or-not.html"> find the LAN machine/IP that is powered ON or OFF</a> in our Departmental Computing Facility[DCF]. The local IPs have changed now. <br />
<br />
The important thing was that program pings each machines/IP address one after another. It would take a lot of time. Recently, I have seen a cmd/package called <b>parallel</b> that does it in one line linux command. Cool. I can add this to my bashrc which would need only 3 key stokes to find what I wanted. <br />
<br />
If it is not installed already, do it<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ sudo apt-get install parallel</span><br />
<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ parallel --halt now,success=1 ping -c1 10.21.225.{1}{2} ::: 0 1 2 ::: 1 2 3 4 5 6 7 8 9 0</span><br />
<br />
This is the one line cmd. Lets break it down and see what it says.<br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">$ parallel echo {1}{2} ::: 0 1 2 ::: 1 2 3 4 5 6 7 8 9 0</span><br />
<br />
what does the above command do. Prints all the numbers from 00 to 29. i.e echo 30 times.<br />
<br />
echo 00<br />
echo 01<br />
...<br />
echo 29<br />
<br />
<b>parallel</b> does the same, but the order is immaterial.<br />
<br />
But, to my purpose I used to check <b>$? whether 0 or 1</b> or something in my old script. This is done smarter here.<br />
<br />
<b>--halt now,success=1 </b>means stop running jobs even if one job is succeeded. WOW!<br />
<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ parallel --halt now,success=1 ping -c1 10.21.225.{1}{2} ::: 0 1 2 ::: 1 2 3 4 5 6 7 8 9 0 > /dev/null</span><br />
<br />
<span style="font-family: inherit;">I use the above line which prints only the IP I wanted. YAY!</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: inherit;"><span style="font-family: inherit;">Tata. See you.</span> </span> </span></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-59323157247708933922019-08-18T22:05:00.000+05:302019-09-14T22:09:07.233+05:30Search your own old tweets<div dir="ltr" style="text-align: left;" trbidi="on">
Most often I would want to refer some of my old tweets. By old I meant 2-4 years back. I was unsure until someday, I learnt about this twitter advanced search.<br />
<br />
<a href="https://twitter.com/search-advanced">https://twitter.com/search-advanced</a><br />
<br />
The Search window<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyGhG6S8u9L-_RNnpK0D8OzWFuBMYGvsqhjUl10IaAzxRmsF-xyzSMYQteY2abpwplv5bPN_FpT84YZyW09ZlkH9nat4DtHobFK0YY1VQf3HXUDvbE-7HB1SyE2jKUzw2F024XHf7cm-Wb/s1600/Screenshot+from+2019-09-14+22-01-51.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyGhG6S8u9L-_RNnpK0D8OzWFuBMYGvsqhjUl10IaAzxRmsF-xyzSMYQteY2abpwplv5bPN_FpT84YZyW09ZlkH9nat4DtHobFK0YY1VQf3HXUDvbE-7HB1SyE2jKUzw2F024XHf7cm-Wb/s400/Screenshot+from+2019-09-14+22-01-51.png" width="400" /></a></div>
<br />
<br />
<br />
In here I can user my handle <span style="background-color: #15202b; color: white; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif; font-size: 14px;">From these accounts: mrprajesh</span><br />
<div>
Then search for one or two word. This very handy. This what happen when tried to find blog keyword from my old tweets.</div>
<div>
<br /></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMSkacW9kvxvzbgnsuq5AUElEXu8B-WdpTksWY7txKl_jDJR9MRGEAF4X-rRNs_rdMRVppjVWXPvNnbrZrKJeILzCvlv_FOCmP0bjh_A0X6oavaVTcWlhdrZ6neSs9m0_OyZQuZ89lGG4/s1600/Screenshot+from+2019-09-14+22-00-08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPMSkacW9kvxvzbgnsuq5AUElEXu8B-WdpTksWY7txKl_jDJR9MRGEAF4X-rRNs_rdMRVppjVWXPvNnbrZrKJeILzCvlv_FOCmP0bjh_A0X6oavaVTcWlhdrZ6neSs9m0_OyZQuZ89lGG4/s400/Screenshot+from+2019-09-14+22-00-08.png" width="400" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
Yay!!</div>
<div>
See you, tata.</div>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-49933230645009315882019-07-15T10:56:00.003+05:302019-07-15T10:56:33.641+05:30How to build Green-Marl on Ubuntu 18.04 or later / Linux Mint 19<div dir="ltr" style="text-align: left;" trbidi="on">
The offcial <a href="https://github.com/stanford-ppl/Green-Marl">Green-Marl</a> from Stanford is old at least 5 years(as on date). The master branch is not able to build/make sucessully. There were some errors and build got failed. Fortunately, I saw a pullrequest #132 by Reto Achermann @achreto and it works like charm.<br />
<br />
$ mkdir achretoGreenMarl && cd achretoGreenMarl<br />
$ git clone https://github.com/achreto/Green-Marl.git .<br />
$ cd achretoGreenMarl<br />
$ make<br />
<br />
That's it. It works fine. You could check.<br />
<br />
$ cd achretoGreenMarl/bin <br />
$ ./gm_comp -v<br />lib this = 0x5653e0f5dde0<br />version 0.3.0<br />
<br />
TaTa bye. <br />
<br />
what is green-marl? see <a href="https://github.com/stanford-ppl/Green-Marl#1-introduction">this</a><br />
<br />
The below was the error when building from https://github.com/stanford-ppl/Green-Marl<br />
<br />
collect2: error: ld returned 1 exit status<br />Makefile:196: recipe for target '../bin/gm_comp' failed<br />make[1]: *** [../bin/gm_comp] Error 1<br />make[1]: Leaving directory '/home/rajz/d7/Green-Marl/src'<br />Makefile:49: recipe for target 'compiler' failed<br />make: *** [compiler] Error 2<br /></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-6907488230437103252019-04-25T10:50:00.000+05:302019-09-14T22:15:54.781+05:30LaTeX Tips for writing good research article.<div dir="ltr" style="text-align: left;" trbidi="on">
// Purely out of my experience(learnt from friends and experts) of using LaTeX<br />
// for writing a good research article collaboratively; good -- In my view!<br />
// good - easy for others to edit;<br />
<br />
<br />
- use multiple src files and input in the main tex.<br />
- - do not write the everything in a single file.<br />
- - Prior to Overleaf this is modular. But even after this. it is a good practice.<br />
e.g<br />
<br />
\input{0ABS.tex}<br />
\input{1INT.tex}<br />
\input{3ALG.tex}<br />
<br />
or keep everything in a folder as well<br />
\input{src/0ABS.tex}<br />
..<br />
<br />
<br />
- Use Overleaf is plain, simple and speeds up writing .<br />
- - Good for collab; two persons can edit the same file simultaneously.<br />
- - Enough of messing around with errors in texmaker[TM]/texstudio[TS]; bored of it!<br />
- - Double click the pdf it will take you to the line or para(most of the time)!<br />
- - Auto spell check // Never worked well TM<br />
<div>
<br /></div>
<br />
- User labels at a appropriate place(section, figure, subsection) with some standard form; prefix code<br />
\label{<code> intro}</code><br />
e.g<br />
\label{fig description figure}<br />
I use codes ={sec, ssec, fig, table, alg, line, etc}<br />
<br />
- Using ref and cite<br />
- - Use it ~\ref{} or ~\cite{} so that it stays together with previous word.<br />
- - \cite{r1,r2,r3...} can hold more than one args<br />
<br />
- Use separate folder for fig and plot you generate.<br />
- - Include all the source for creating image in case you wanted edit later.<br />
- - I use Latex draw and export as pdf+cropped and include it in figure.<br />
- - I use <a href="http://pgfplots.sourceforge.net/gallery.html">pgPlot</a> and Libre office calc for generating plots.<br />
<br />
- Use BibTeX; User STD form in<br />
- - use \bibliography{GlobalBibtex} for file name GlobalBibtex.bib<br />
- - can add mutiple bib file \bibliography{file1,file2}<br />
- - Last name of first author and initials of rest(if any)<br />
- - User _ write the name of paper you will calls as or would like remember as<br />
- - overleaf can match it when citing with the name(after _) as well<br />
- - It is always good to have your own global bibtex file<br />
- - You ca cumulatively add(and maintain!) it as you write more.<br />
- - Aid sin searching for bib entry in the bib file of you previously written papers.<br />
- - Use only Conference verion of the bib rather than a arviv if you have both.<br />
- - Use DBLB for collection because it is nice search. You coul use others as well - but be uniform.<br />
- - It will be nice if the bib entry has a doi/url<br />
- - So the reader can quickly go to the ref paper in single click from the ref section.<br />
- - Saves a lot of time in googling and find the right version(if multiple (re)versions exist), etc, etc,<br />
<div>
- - Sometimes the CAPS may not rendered properly either in title/author name. You would have enclose those inside braces {} to force the capitalization in tact.<br />
<br /></div>
// I am updating these over the course of time.<br />
Last Update: 14-Sep-2019<br />
<br /></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-62497158913946986142019-03-18T19:36:00.001+05:302019-03-18T19:37:45.455+05:30How to make your commits signed or verified in Github<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
DIY Steps<br />
======== <br />
1. Create a GPG key (public and private key) and add it into passwords and keys (seahorse).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-597qPNGCJ8o/XI-fQeaRiYI/AAAAAAAAbiY/-6aCYSK_JfoyIsn7SAGw2RcxMYlrXvjmwCLcBGAs/s1600/Screenshot%2Bfrom%2B2019-03-18%2B19-05-41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="737" height="283" src="https://3.bp.blogspot.com/-597qPNGCJ8o/XI-fQeaRiYI/AAAAAAAAbiY/-6aCYSK_JfoyIsn7SAGw2RcxMYlrXvjmwCLcBGAs/s400/Screenshot%2Bfrom%2B2019-03-18%2B19-05-41.png" width="400" /></a></div>
2. Add your GPG keys into Github<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVh-bXnPq4Qj_lDmYPAvHxvC7t9_dbBGFwkfb3SI2Dn70-eHo7VD0W4fLo5qz7nLZn5BeBoGy3KNjYDCA7Zy_lUYL2Pqky5TwYmV2RPZg8oBZ22jsFM9wbzrOOKTbJqIdU5yO8MOLl-Kz-/s1600/Screenshot+from+2019-03-18+19-09-54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="1366" height="215" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVh-bXnPq4Qj_lDmYPAvHxvC7t9_dbBGFwkfb3SI2Dn70-eHo7VD0W4fLo5qz7nLZn5BeBoGy3KNjYDCA7Zy_lUYL2Pqky5TwYmV2RPZg8oBZ22jsFM9wbzrOOKTbJqIdU5yO8MOLl-Kz-/s400/Screenshot+from+2019-03-18+19-09-54.png" width="400" /></a></div>
3. Create your SSH keys<br />
ssh-keygen -t rsa -b 4096 -C "YOUR EMAIL@GMAIL.com"<br />
// Remember the passphrase it is essential to verified/sign<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
4. make sure that it is visible on your "passwords and keys"<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1AWDoaM_8pxlThjtj5vPjwBRFfwgdgnDHcEwybTtq3w_wHKLLdicOV1G8Y0a5RVaCAVp6521DqGOwXywKyTcfgU5CJs-KHX2qNbi-Pglo6oIfAVI2Mjeh5clHrh9hoAidqZ93OOF_IfJ6/s1600/Screenshot+from+2019-03-18+19-19-08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="523" data-original-width="737" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1AWDoaM_8pxlThjtj5vPjwBRFfwgdgnDHcEwybTtq3w_wHKLLdicOV1G8Y0a5RVaCAVp6521DqGOwXywKyTcfgU5CJs-KHX2qNbi-Pglo6oIfAVI2Mjeh5clHrh9hoAidqZ93OOF_IfJ6/s400/Screenshot+from+2019-03-18+19-19-08.png" width="400" /></a></div>
5. Then On your terminal<br />
cat ~/.ssh/id_rsa.pub<br />
<br />
copy paste its content to Github <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdpgnAkEqc1lZ_b01Mp77Ww0kooefn5HVrXL-aG2wuVYk0Kl4TPFmaST18r3ES4osYar8oK4IWtfBMJBqiTNl7DGZEk1B7oh06US8vysRST8y5_UusOiPSAgs6tCdsrHc_rLEisCV3WZuG/s1600/Screenshot+from+2019-03-18+19-15-16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="1366" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdpgnAkEqc1lZ_b01Mp77Ww0kooefn5HVrXL-aG2wuVYk0Kl4TPFmaST18r3ES4osYar8oK4IWtfBMJBqiTNl7DGZEk1B7oh06US8vysRST8y5_UusOiPSAgs6tCdsrHc_rLEisCV3WZuG/s400/Screenshot+from+2019-03-18+19-15-16.png" width="400" /></a></div>
6. Set some git config if yor have not done earlier<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgexxxsxxs4K5s-yTqT0jq616w6JD53rxShjg1d9LjJHtShHPCtZcWNqaRvzKo5vM76OPCvWi4O3ECNRFU1uH9XOg6W1DB_F9794XRVzcC_ZfxhLR4YCYovkUkwRAUnWdlkm1bIavKdDzLZ/s1600/Screenshot+from+2019-03-18+19-23-10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="655" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgexxxsxxs4K5s-yTqT0jq616w6JD53rxShjg1d9LjJHtShHPCtZcWNqaRvzKo5vM76OPCvWi4O3ECNRFU1uH9XOg6W1DB_F9794XRVzcC_ZfxhLR4YCYovkUkwRAUnWdlkm1bIavKdDzLZ/s400/Screenshot+from+2019-03-18+19-23-10.png" width="400" /></a></div>
<br />
<br />
7. That's it. Whenever you make a commit and push you will get a promt asking for pass phares (in step 3) and github credentials as usual respectively.<br />
<br />
TADA<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-HLPglhOoyDM/XI-lUzZxnlI/AAAAAAAAbjc/zblDTR0ChEEuOe_cOzeUV65mLf_QPUyTQCLcBGAs/s1600/Screenshot%2Bfrom%2B2019-03-18%2B19-32-42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="222" src="https://2.bp.blogspot.com/-HLPglhOoyDM/XI-lUzZxnlI/AAAAAAAAbjc/zblDTR0ChEEuOe_cOzeUV65mLf_QPUyTQCLcBGAs/s400/Screenshot%2Bfrom%2B2019-03-18%2B19-32-42.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
YOUR commits are now verified !!</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0Chennai, Tamil Nadu, India13.0826802 80.27071840000007812.5876862 79.625271400000074 13.5776742 80.916165400000082tag:blogger.com,1999:blog-2605943612170847082.post-51282975977981779942019-02-23T11:44:00.000+05:302019-02-23T11:44:10.501+05:30Installing Bika LIMS on Linux<div dir="ltr" style="text-align: left;" trbidi="on">
My brother wanted this for work. I am documenting for <br />
<span style="background-color: red;">WARNING This procedure is incomplete and it DID NOT WORK</span>!<br />
<br />
1. download and extract the latest zip https://github.com/bikalims/bika.lims/releases<br /> seems like bika is dead as per their github page. I got version 3.2.1rc2<br />
2. run in terminal // probably needed dependicies for plone<br />
<br />
sudo apt-get install python-setuptools python-dev build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-dev libz-dev<br /><br />
sudo apt-get install libreadline-dev wv poppler-utils <br /><br />
<br />
3. download latest stabe version of plone<br />
<br />
https://plone.org/download<br />
<br />
download the unified installer (<strike>current v 5.1</strike> did not work; try 4.3.11)<br />
<br />
<strike>4. extract and run insall.sh</strike><br />
<strike>select the isntall location and give a good admin pwd</strike><br />
<br />
<strike>You should see this once complete'</strike><br />
<strike> </strike><br />
<strike>###################### Installation Complete ######################</strike><br />
<strike><br />5.edit file buildout.cfg</strike><br />
<pre><code>eggs =
Plone
Pillow
<span style="background-color: yellow;"> bika.lims</span></code></pre>
<pre><code><span style="background-color: yellow;"> </span></code></pre>
<br /><strike>6: run bin/buildout</strike><br />
<strike>Ended with errors</strike><br />
<strike>7. ./bin/plonectl start </strike><br />
<strike>Ended with errors</strike><br />
<strike><br /></strike>4. Run this cmd after extracting it<br />
<br />
sudo ./install.sh --target=/home/rajz/install/Plone43 --password=proot standalone<br />
<br /> <br /> 5. Go to install location to edit the buildout.cfg config file /home/rajz/install/Plone43/zinstance ; add the hightligted<span style="background-color: yellow;"><span></span></span> line and save! (you may use sudo nano buildout.cfg)<br />
...<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;">need-sudo = yes<br /><span style="background-color: yellow;">index=https://pypi.python.org/simple/</span></span></span><br />--<br />
<br />
<pre><code>eggs =
Plone
Pillow
<span style="background-color: yellow;"> bika.lims</span></code></pre>
<pre><code><span style="background-color: yellow;"> </span></code></pre>
6.run sudo -u plone_buildout bin/buildout<br />
//ignore dep erros<br />
<br />
7. sudo bin/plonectl start<br />
// errors<br />
<br />
<pre><code><span style="background-color: yellow;">
</span></code></pre>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-32451439963717750632019-01-16T15:17:00.001+05:302019-01-18T10:14:01.665+05:30Installing LonestarGPU v3.0 on Linux Mint / Ubuntu & Errors faced during installation<div dir="ltr" style="text-align: left;" trbidi="on">
These are the steps for installing.<br />
1. Clone the release 3 repo.<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">git clone -b release-3.0 https://github.com/IntelligentSoftwareSystems/GaloisGPU</span></span></blockquote>
2. Next <br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">cd GloisGPU</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">make</span></span></blockquote>
../../rt/include/cutil_subset.h:10:10: fatal error: cub/cub.cuh: No such file or directory<br />
#include "cub/cub.cuh"<br />
compilation terminated<br />
<br />
This errors are due to as we have not the linked the dependencies. cub and moderngpu<br />
<br />
3. I am using moderngpu v1.1 and cub v1.4.1 and you can download from the <a href="https://github.com/NVlabs/cub">cub</a> and <a href="https://github.com/moderngpu/moderngpu">moderngpu</a> from the release tab.<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@LordOfWarriors:~/d6$ </span></span>cd GaloisGPU</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@LordOfWarriors:~/d6/GaloisGPU$ ls -l<br />total 36<br />drwxr-xr-x 9 rajz rajz 4096 Jan 16 12:15 apps<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 13:37 bin<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 12:15 include<br />-rw-r--r-- 1 rajz rajz 1504 Jan 16 12:15 LICENSE.txt<br />-rw-r--r-- 1 rajz rajz 919 Jan 16 12:15 Makefile<br />-rw-r--r-- 1 rajz rajz 1967 Jan 16 12:15 README.md<br />drwxr-xr-x 5 rajz rajz 4096 Jan 16 12:15 rt<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 12:15 skelapp<br />drwxr-xr-x 3 rajz rajz 4096 Jan 16 12:15 tuning</span></span><br />
<br />
// unlink the dep if present<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">unlink cub</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">unlink mgpu</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> </span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">ln -s /home/rajz/install/cub-1.4.1/ cub</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">ln -s /home/rajz/install/</span></span><br />
<br />
// unlink the dep if present<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">unlink cub</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">unlink mgpu</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">cd rt/include/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">ln -s /home/rajz/install/cub-1.4.1/cub/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">ln -s /home/rajz/install/moderngpu-1.1/ mgpu</span></span><br />
<br />
After linking, it should look like this.<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">rajz@LordOfWarriors:~/d6/GaloisGPU$ ls -l<br />total 40<br />drwxr-xr-x 9 rajz rajz 4096 Jan 16 12:15 apps<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 14:52 bin<br />lrwxrwxrwx 1 rajz rajz 29 Jan 16 14:37 cub -> /home/rajz/install/cub-1.4.1/<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 12:15 include<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 14:27 inputs<br />-rw-r--r-- 1 rajz rajz 1504 Jan 16 12:15 LICENSE.txt<br />-rw-r--r-- 1 rajz rajz 919 Jan 16 12:15 Makefile<br />lrwxrwxrwx 1 rajz rajz 33 Jan 16 14:38 mgpu -> /home/rajz/install/moderngpu-1.1/<br />-rw-r--r-- 1 rajz rajz 1967 Jan 16 12:15 README.md<br />drwxr-xr-x 5 rajz rajz 4096 Jan 16 12:15 rt<br />drwxr-xr-x 2 rajz rajz 4096 Jan 16 12:15 skelapp<br />drwxr-xr-x 3 rajz rajz 4096 Jan 16 12:15 tuning</span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">rajz@LordOfWarriors:~/d6/GaloisGPU/rt/include$ ls -l<br />total 148<br />-rw-r--r-- 1 rajz rajz 2831 Jan 16 12:15 abitset.h<br />-rw-r--r-- 1 rajz rajz 4929 Jan 16 12:15 aolist.h<br />-rw-r--r-- 1 rajz rajz 219 Jan 16 12:15 bmk2.h<br />-rw-r--r-- 1 rajz rajz 6057 Jan 16 12:15 component.h<br />-rw-r--r-- 1 rajz rajz 4274 Jan 16 12:15 counter.h<br />-rw-r--r-- 1 rajz rajz 4167 Jan 16 12:15 csr_graph.h<br />lrwxrwxrwx 1 rajz rajz 33 Jan 16 14:43 cub -> /home/rajz/install/cub-1.4.1/cub/<br />-rw-r--r-- 1 rajz rajz 14929 Jan 16 12:15 cuda_launch_config.hpp<br />-rw-r--r-- 1 rajz rajz 2138 Jan 16 12:15 cutil_subset.h<br />-rw-r--r-- 1 rajz rajz 2092 Jan 16 12:15 exclusive.h<br />-rw-r--r-- 1 rajz rajz 633 Jan 16 12:15 failfast.h<br />-rw-r--r-- 1 rajz rajz 5145 Jan 16 12:15 gbar.cuh<br />-rw-r--r-- 1 rajz rajz 144 Jan 16 12:15 ggc_rt.h<br />-rw-r--r-- 1 rajz rajz 365 Jan 16 12:15 ggcuda.h<br />-rw-r--r-- 1 rajz rajz 1793 Jan 16 12:15 gg.h<br />-rw-r--r-- 1 rajz rajz 2621 Jan 16 12:15 instr.h<br />-rw-r--r-- 1 rajz rajz 3510 Jan 16 12:15 internal.h<br />-rw-r--r-- 1 rajz rajz 2114 Jan 16 12:15 lockarray.h<br />lrwxrwxrwx 1 rajz rajz 33 Jan 16 14:43 mgpu -> /home/rajz/install/moderngpu-1.1/<br />-rw-r--r-- 1 rajz rajz 4630 Jan 16 12:15 pipe.h<br />-rw-r--r-- 1 rajz rajz 1116 Jan 16 12:15 rv.h<br />-rw-r--r-- 1 rajz rajz 4139 Jan 16 12:15 sharedptr.h<br />-rw-r--r-- 1 rajz rajz 359 Jan 16 12:15 snfile.h<br />-rw-r--r-- 1 rajz rajz 2999 Jan 16 12:15 Timer.h<br />-rw-r--r-- 1 rajz rajz 18012 Jan 16 12:15 worklist.h</span></span><br />
<br />
4. Now do a make from GloisGPU folder.<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">rajz@LordOfWarriors:~/install/GaloisGPU$ make</span></span><br />
<br />
5. Now, the error is different<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">../../rt/include/cub/block/specializations/../../block/../util_ptx.cuh(694): warning: function "__all"<br />/usr/local/cuda-9.2/bin/..//include/device_atomic_functions.h(181): here was declared deprecated ("__all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/cub/block/specializations/../../block/../util_ptx.cuh(720): warning: function "__any"<br />/usr/local/cuda-9.2/bin/..//include/device_atomic_functions.h(180): here was declared deprecated ("__any() is deprecated in favor of __any_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/cutil_subset.h(44): warning: function "__ballot"<br />/usr/local/cuda-9.2/bin/..//include/sm_20_intrinsics.h(407): here was declared deprecated ("__ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/cutil_subset.h(52): warning: function "__ballot"<br />/usr/local/cuda-9.2/bin/..//include/sm_20_intrinsics.h(407): here was declared deprecated ("__ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/mgpu/include/kernels/../device/../device/intrinsics.cuh(112): warning: function "__shfl_up(float, unsigned int, int)"<br />/usr/local/cuda-9.2/bin/..//include/sm_30_intrinsics.hpp(260): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/mgpu/include/kernels/../device/../device/intrinsics.cuh(122): warning: function "__shfl_up(int, unsigned int, int)"<br />/usr/local/cuda-9.2/bin/..//include/sm_30_intrinsics.hpp(174): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br /><br />../../rt/include/mgpu/include/kernels/../device/../device/intrinsics.cuh(123): warning: function "__shfl_up(int, unsigned int, int)"<br />/usr/local/cuda-9.2/bin/..//include/sm_30_intrinsics.hpp(174): here was declared deprecated ("__shfl_up() is deprecated in favor of __shfl_up_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")<br />/usr/bin/ld: ../../rt/lib/libggrt.a(ggc_rt.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; <span style="background-color: yellow;">recompile with -fPIC</span><br />/usr/bin/ld: ../../rt/lib/libggrt.a(ggc_rt.link.o): relocation R_X86_64_32S against `__nv_module_id' can not be used when making a PIE object; recompile with -fPIC<br />/usr/bin/ld: ../../rt/lib/libggrt.a(instr.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC<br />/usr/bin/ld: ../../rt/lib/libggrt.a(bmk2.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC<br />/usr/bin/ld: final link failed: Nonrepresentable section on output<br />collect2: error: ld returned 1 exit status<br />Makefile:18: recipe for target 'dmr' failed<br />make[1]: *** [dmr] Error 1<br />make[1]: Leaving directory '/home/rajz/install/GaloisGPU/apps/dmr'<br />Makefile:12: recipe for target 'all' failed<br />make: *** [all] Error 2</span></span><br />
<br />
<br /></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-2444546455051655412018-12-10T15:26:00.001+05:302019-01-17T09:31:07.788+05:30Time synchronization issues in Dual boot Linux Mint/Ubuntu and Windows<div dir="ltr" style="text-align: left;" trbidi="on">
I have always used to have the network time in my Linux Mint 19 or Windows 8. However when I switch between Linux and Windows[or vice versa] the time gets modified and wrong time would show up. This Time synchronization issues in Linux Mint/Ubuntu which can be solved by the following simple task.<br />
<br />
<b>Steps.</b><br />
1. Use your favorite editor to edit the file as root [If file not found create a new one]. I am using xed here.<br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace;">sudo xed /etc/adjtime </span><br />
<br />
2. Make the file looks as below. For me, I had only the first line. I created the next two line and saved it.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">0.0 0 0.0<br />0<br />LOCAL</span><br />
<br />
3. Reboot!<br />
<br />
The issues exactly what is happening in the background is very well explained in this reference article. <br />
<br />
<b>References</b>: https://www.techgainer.com/fix-windows-showing-wrong-time-in-linux-windows-dual-boot-system/</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-76163390182406198382018-12-10T13:09:00.001+05:302020-02-27T17:46:52.171+05:30Install Latex Texmaker on Linux mint 19 / Ubuntu 18.04<div dir="ltr" style="text-align: left;" trbidi="on">
Installing latex is pretty straight forward. We could get it from the official packages /repos througth command line. I wish to install a "full" latex support as I don't want to install any other packages to install later on. So, the Download size is ~2.5GB and installation space need is 4.5GB roughly. Texmaker is just 5-50MB where as the rest is fully occupied by LaTeX or TeX or TeXLive.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install texlive-full texmaker</span></blockquote>
Next things is that spell check<br />
When do a check spelling you will get an "Error can't open dictionary"<br />
Go to Options>Configure>Editor tab<br />
Change myspell to hunspell dictionary. I wanted British English so I selected the below: <br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">/usr/share/hunspell/en_GB.dic</span></blockquote>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNsW9oJVU2ELWqW3uyMAv2UqcWg8PB1jC246L7mHiCGFDUDxmvMPe_zGGeAofzhQzb8tJrxgaEnVnnQJxRcSieTmAwVQAnUzTorBHw5pshXivKdmsMIo5fM0z2aUagdBrY-rMUZB7IY_cB/s1600/Screenshot+from+2018-12-10+17-55-43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="636" data-original-width="852" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNsW9oJVU2ELWqW3uyMAv2UqcWg8PB1jC246L7mHiCGFDUDxmvMPe_zGGeAofzhQzb8tJrxgaEnVnnQJxRcSieTmAwVQAnUzTorBHw5pshXivKdmsMIo5fM0z2aUagdBrY-rMUZB7IY_cB/s320/Screenshot+from+2018-12-10+17-55-43.png" width="320" /></a></div>
Thanks to vijay!<br />
<br />
Next thing is you may have to install Latexdraw for drawing pictures. It need Java SE/JDK. I installed JDK from official oracle site <a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">here</a>. Click JDK download(I would need for java programming etc). I used deb file. Clicking/opening it will install it automatically or based on deb file<br />
<br />
"sudo dpkg -i jdk-<span style="background-color: yellow;">11.0.1</span>_linux-x64_bin.deb"<br />
<br />
As oracle Jdk didn't registered in update-java-alternative or update-alternative --config java. I went to fix it manually. I was able to locate my installation at "/usr/lib/jvm" called "jdk-11.0.1" folder. <br />
<br />
Extract the downloaded LaTeXDraw-<span style="background-color: yellow;">3.x.x.</span>-bin.zip from https://sourceforge.net/projects/latexdraw/. After extracting run the following. <br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo /usr/lib/jvm/<span style="background-color: yellow;">jdk-11.0.1</span>/bin/java -jar installer.jar</span></blockquote>
That's it. Bye for now.<br />
I have disabled trigger email from comment. Contact me on twitter instead for any questions.</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com2tag:blogger.com,1999:blog-2605943612170847082.post-74890488282078804932018-11-25T00:29:00.002+05:302018-11-25T00:32:26.706+05:30Install CUDA 10 on Linux mint 19 or Ubuntu 18.04<div dir="ltr" style="text-align: left;" trbidi="on">
Assuming that you have nvidia GPU with cuda compatibility.<br />
<br />
These are the steps for installing CUDA 10 on Linux mint 19 or Ubuntu 18.04<br />
<ul style="text-align: left;">
<li>Install Linux mint 19/Ubuntu 18.04 fresh</li>
<li>Use the ppa nvidia drivers repo from <a href="https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa">lauchpad here</a></li>
<ul>
<li><pre class="command subordinate" id="yui_3_10_3_1_1543084189743_70">sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update</pre>
<pre class="command subordinate" id="yui_3_10_3_1_1543084189743_70"></pre>
</li>
</ul>
<li>The version 410 is the current long term version as on date</li>
<li>From "Driver Manager" install the current stable version</li>
<li><br /><div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1kLnKEiRx0zUIFWmTrlX2a1Y5ZB5Ht6Lm1VG-V0CfD-dTDWTYGOrbxEf9JxCHNzyvFWhlkWsM40gyGLIltr1D_2gy5aLa_u9ePuppRnFK-P2szAzgKJanRZP0KSM4_bvZogTa-Zg6GKEe/s1600/Screenshot+from+2018-11-25+00-02-23.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="507" data-original-width="642" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1kLnKEiRx0zUIFWmTrlX2a1Y5ZB5Ht6Lm1VG-V0CfD-dTDWTYGOrbxEf9JxCHNzyvFWhlkWsM40gyGLIltr1D_2gy5aLa_u9ePuppRnFK-P2szAzgKJanRZP0KSM4_bvZogTa-Zg6GKEe/s400/Screenshot+from+2018-11-25+00-02-23.png" width="400" /> </a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<ul>
<li>Reboot; verify the driver installed from terminal using "nvidia-smi" command</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJjUMurZPVvTj63ydIgpsxsRTfRWKF7J7KlPKmuP5I4xlszpy6rMI659U0dyDPZ9GXX3HTM0sK60exuzOWptIniy18Zc9HrjKkP32g-UT9nK8QG9Jclw9m9CXzLukZ1ERu0H5y9GuPYfko/s1600/Screenshot+from+2018-11-25+00-25-37.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="371" data-original-width="683" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJjUMurZPVvTj63ydIgpsxsRTfRWKF7J7KlPKmuP5I4xlszpy6rMI659U0dyDPZ9GXX3HTM0sK60exuzOWptIniy18Zc9HrjKkP32g-UT9nK8QG9Jclw9m9CXzLukZ1ERu0H5y9GuPYfko/s400/Screenshot+from+2018-11-25+00-25-37.png" width="400" /></a></div>
<br />
<ul>
<li style="text-align: justify;">Install these packages</li>
<ul>
<li style="text-align: justify;"><code>sudo apt-get install build-essential dkms
</code><pre class="language-" data-info="" data-role="codeBlock"><code>sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev
</code></pre>
</li>
</ul>
<li style="text-align: justify;">Download the deb file and follow the below steps<br /> </li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTSLQ05EtP1vSzMZJLkIajXc1PVmkv6uLJrw3Etc_JW_rPCWjRsqRyRzpAPJLr26H8iWdxeKve9DfT8OiFP_TGl58Y5kURxDUFjkq29KcHTYKwe-N_REA2F1seEzA8edKD96ZPR8n_NKSd/s1600/Screenshot+from+2018-11-25+00-04-34.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTSLQ05EtP1vSzMZJLkIajXc1PVmkv6uLJrw3Etc_JW_rPCWjRsqRyRzpAPJLr26H8iWdxeKve9DfT8OiFP_TGl58Y5kURxDUFjkq29KcHTYKwe-N_REA2F1seEzA8edKD96ZPR8n_NKSd/s400/Screenshot+from+2018-11-25+00-04-34.png" width="400" /></a></div>
<br />
<br />
<ul>
<li><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb<br />sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub<br />sudo apt-get update<br />sudo apt-get install cuda</span></span></li>
</ul>
<br />
<ul>
<li>That's it.</li>
<li>Default location of installation is /usr/local/cuda</li>
<li>"cuda-install-samples-10.0.sh ~/install" installs sample files</li>
<li>cd into the folder "NVIDIA_CUDA-10.0_Samples"</li>
<li>make -j2</li>
<li>Add the "PATH=$PATH:/usr/local/cuda/bin" to your "~/.bashrc" as a last line. <br />(or) <br />PATH=$PATH:/usr/local/cuda/bin:/home/rajz/install/NVIDIA_CUDA-9.2_Samples/bin/x86_64/linux/release</li>
<li>run "deviceQuery" to verify the cuda installation. And do the post installation formalities</li>
<li><pre class="pre screen">sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \
libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev</pre>
<pre class="pre screen"> </pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8lzL1KvrlZvL9p3AiNTc7lAhCZA4mSfMn5X-5axrpe4S3hgq_Tr2iprmcj2-dwV_32F-5HRJlO7aICMIjDaldqfUs4Vls9DP0VyIPecMWzR5OQ4Aepvl0PKwnCAbqGxj2eRnvP7MfAoe/s1600/Screenshot+from+2018-11-25+00-27-05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="1366" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc8lzL1KvrlZvL9p3AiNTc7lAhCZA4mSfMn5X-5axrpe4S3hgq_Tr2iprmcj2-dwV_32F-5HRJlO7aICMIjDaldqfUs4Vls9DP0VyIPecMWzR5OQ4Aepvl0PKwnCAbqGxj2eRnvP7MfAoe/s400/Screenshot+from+2018-11-25+00-27-05.png" width="400" /></a></div>
<pre class="pre screen"> </pre>
<pre class="pre screen"> </pre>
<div style="text-align: left;">
<div class="pre screen">
<span style="font-size: small;"><span style="font-family: inherit;">Refe</span></span>rences</div>
<div class="pre screen">
1. https://www.pugetsystems.com/labs/hpc/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184/</div>
<div class="pre screen">
2. https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-together-with-9-2-on-Ubuntu-18-04-with-support-for-NVIDIA-20XX-Turing-GPUs-1236/</div>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com2Chennai, Tamil Nadu, India13.0826802 80.27071840000007812.5876862 79.625271400000074 13.5776742 80.916165400000082tag:blogger.com,1999:blog-2605943612170847082.post-16722991349352497732018-11-24T01:11:00.002+05:302018-11-28T16:18:37.898+05:30Challenges in installing Linux Mint 19 to dual boot along side windows<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
WARNING: There is an updated Install notes. Check out <a href="https://mrprajesh.blogspot.com/2018/11/install-cuda-10-on-linux-mint-19-or.html">the recent post</a><br />
Had a tough time setting/installing up Linux mint 19 on my existing dual boot machine to solve these 2 problems:<br />
1. grub-efi-amd64-signed' package failed to install into /target<br />
2. Hash Sum mismatch.<br />
3. shim-signed and grub-efi-amd64-signed failure to configure.<br />
Huh. Nearly 6 hours trying to figure out. <a class="twitter-hashtag pretty-link js-nav" data-query-source="hashtag_click" dir="ltr" href="https://twitter.com/hashtag/Linuxmint?src=hash"><s>#</s><b>Linuxmint</b></a><br />
<br />
<b>As it happened:</b><br />
<br />
I had a Linux mint 18 and a rusted windows. So I wanted to refresh my machine. So I reset factory/recovery settings on windows. And wished to install Linux mint afresh. So, I have downloaded the ISO file named linuxmint-19-cinnamon-64bit-v2.iso from the official website and verified. I have made necessary partitions while installing and installation went smooth. However, right after installing and just before grub installation, this error came up.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhemXW49C1GOcR-3AFl3UUyVG8MCoLmxrnT3CdJVqjv7AVfD-erDczbdLba-GXY7cgp_S5F-Ql2S6W9Shn_lpiSkhmML1nuESXCFNIay6shA4eqKoq9CPx9K9EIGXB0dzXoFXAejrVWAzyw/s1600/Screenshot+from+2018-11-23+22-05-24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhemXW49C1GOcR-3AFl3UUyVG8MCoLmxrnT3CdJVqjv7AVfD-erDczbdLba-GXY7cgp_S5F-Ql2S6W9Shn_lpiSkhmML1nuESXCFNIay6shA4eqKoq9CPx9K9EIGXB0dzXoFXAejrVWAzyw/s320/Screenshot+from+2018-11-23+22-05-24.png" width="320" /></a></div>
<br />
<br />
"GRUB Installation Failed.<br />
The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot".<br />
<br />
<br />
To rectify this.<br />
1. install boot-repair<br />
<pre>sudo add-apt-repository ppa:yannubuntu/boot-repair
<span class="anchor" id="line-2"></span>sudo apt-get update</pre>
<pre>sudo apt-get install boot-repair </pre>
<pre></pre>
Open boot repair and run the recommended things. [it took 20mins; be patient] It will FAIL badly. Never mind go ahead and restart it. It worked. Because it has successfully reinstalled grub.<br />
<br />
2. apt-get update would not completed it will show error like "Hash Sum mismatch"<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc__GzslRW_pqHkuFTeOw8Jv7f27W8YVLcoe-OXAFm5zzZx2j3A8mM0yg3Y-q9ILlCwBP6vELpGnRTfHaWeF3sAAhRd_rBRGtdhIjVBp4J2MpOeRJs8OT6PsUXYFW4yLY_h4Rv7TqSbkZ0/s1600/Screenshot+from+2018-11-24+01-06-12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgc__GzslRW_pqHkuFTeOw8Jv7f27W8YVLcoe-OXAFm5zzZx2j3A8mM0yg3Y-q9ILlCwBP6vELpGnRTfHaWeF3sAAhRd_rBRGtdhIjVBp4J2MpOeRJs8OT6PsUXYFW4yLY_h4Rv7TqSbkZ0/s320/Screenshot+from+2018-11-24+01-06-12.png" width="320" /></a></div>
<br />
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-i386/by-hash/SHA256/a70a891ed73362c0a3966c9c6c790096f5aba663389ab578a6b991b698ae43c6 Hash Sum mismatch<br />
Hashes of expected file:<br />
- Filesize:393124 [weak]<br />
- SHA256:a70a891ed73362c0a3966c9c6c790096f5aba663389ab578a6b991b698ae43c6<br />
- SHA1:4e0cfabaaf47b0cbf6ecc284e5281430bbe530d2 [weak]<br />
- MD5Sum:94742010fa630d152bbff1445f6369b4 [weak]<br />
Hashes of received file:<br />
- SHA256:ea9bf28ed7d57e5bd739fc63485459130475026c35a84f25e57d2f5ca0521ec7<br />
- SHA1:af7bad4e086d5e768c450c77032ee520d58afeda [weak]<br />
- MD5Sum:aa28e356c8a66b4838a83ab18e10e2d5 [weak]<br />
- Filesize:393124 [weak]<br />
Last modification reported: Fri, 23 Nov 2018 12:50:34 +0000<br />
Release file created at: Fri, 23 Nov 2018 13:51:10 +0000<br />
<br />
To resolve this:<br />
<br />
<pre>sudo apt-get clean</pre>
<pre>sudo rm -rf /var/lib/apt/lists/partial</pre>
<pre>sudo apt-get update -o Acquire::CompressionTypes::Order::=gz</pre>
<pre>sudo apt-get update</pre>
<pre> </pre>
<pre></pre>
<pre></pre>
<pre></pre>
<div style="text-align: left;">
Resolve steps 2:<br />
I am not sure above steps did resolve it completely. because I was still getting. Hash sum mismatch even after doing that.<br />
<br />
Changing the main mirrors to different URL in Software source actually fixed in.<br />
<br />
<b>3. New problems:</b> <br />
Everytime I installed some pkg<br />
It would try install some failed installed packages such as<br />
shim-signed<br />
grub-efi-amd64-signed<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVVs6ZDXS5X2_GZZV51bKND1NBT8Jm6Oq7bXGkekKDE_VbKn-xVIVakOrbOR3HgP0PgBIPjOfwTMbyoYwguCCeyix7RZurDdj7eH-O4HQEHSFBzGuF2t6zh6VIEz3-DDrKUjiwtFNOOPQt/s1600/Screenshot+from+2018-11-24+10-53-57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="465" data-original-width="653" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVVs6ZDXS5X2_GZZV51bKND1NBT8Jm6Oq7bXGkekKDE_VbKn-xVIVakOrbOR3HgP0PgBIPjOfwTMbyoYwguCCeyix7RZurDdj7eH-O4HQEHSFBzGuF2t6zh6VIEz3-DDrKUjiwtFNOOPQt/s320/Screenshot+from+2018-11-24+10-53-57.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7O_t1NEYNmt0uPhGBWjHwGEyzSJtR5aoyaDB4yZOJ1XFNLRZXuTpoKSDTzXApYKOTsyDNovNrZdCqSa5QE5JlFw9tnhb6w9wZz5r2sk1CvwRqBFUdck5kF4dks839T7d88XZ0nkO2kwP5/s1600/Screenshot+from+2018-11-24+10-53-43.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7O_t1NEYNmt0uPhGBWjHwGEyzSJtR5aoyaDB4yZOJ1XFNLRZXuTpoKSDTzXApYKOTsyDNovNrZdCqSa5QE5JlFw9tnhb6w9wZz5r2sk1CvwRqBFUdck5kF4dks839T7d88XZ0nkO2kwP5/s320/Screenshot+from+2018-11-24+10-53-43.png" width="320" /></a></div>
<br />
Resolve steps<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">sudo rm /sys/firmware/efi/efivars/dump-*<br />sudo update-grub<br />sudo apt-get -f install</span></span><br />
References</div>
<div style="text-align: left;">
Linux mint and askubuntu forums.</div>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-68091744063280781812017-11-09T00:59:00.001+05:302017-11-09T00:59:11.188+05:30sed, awk and bash it<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Edit the files in folder</h2>
<div style="text-align: left;">
1. Chop off few words from the 1st line</div>
<div style="text-align: left;">
2. Reads a particular word from the 1st line and then replaces that with some other word.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
More particularly </div>
<div style="text-align: left;">
1. Removes "p tw" from the 1st line.</div>
<div style="text-align: left;">
2. Replace the 3rd word(in line 1) with "0" in all the lines except line 1.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
$cat sample</div>
<div style="text-align: left;">
p tw 5 4</div>
<div style="text-align: left;">
1 2</div>
<div style="text-align: left;">
5 2</div>
<div style="text-align: left;">
3 4 </div>
<div style="text-align: left;">
1 5</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
$cat required-sample</div>
<div style="text-align: left;">
5 4</div>
<div style="text-align: left;">
1 2</div>
<div style="text-align: left;">
<span style="background-color: yellow;">0</span> 2</div>
<div style="text-align: left;">
3 4 </div>
<div style="text-align: left;">
1 <span style="background-color: yellow;">0</span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#!/bin/bash<br />for file in `ls *.gr`<br />do<br /> nodes=`awk 'NR==1{print $3}' $file` #takes the 3rd word which is n or |V|<br /> sed -i "1s/p tw //" $file #chops the p and tw from the 1st line<br /> echo $file - done $nodes<br /> sed -i '2,$ s/$nodes/0/g' $file #f <br />done</span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Thanks to Vijay R</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-4810357569860537252017-09-07T20:34:00.002+05:302017-09-07T20:35:36.756+05:30Resolving expired GPG key and Github signing<div dir="ltr" style="text-align: left;" trbidi="on">
My GPG key during creation had default expiry date which I didn't bother to change it at that time. One fine day it got expired. I was using that same key to sign commits on Github . In all my commits it was showing signed with unverified / expired key. However later from "password and keys" i was able to revoke the expiry. Even then after signing it was showing signed with unverified / expired key.<br />
<br />
Here are the steps to resolve:<br />
1. Github setting delete the existing GPG key <br />
2. gpg --list-keys<br />
3. gpg --armour --export <keyid>YOUR-KEY-ID</keyid><br />
4. Copy it to Github GPG settings as new GPG key<br />
5. Try committing and pushing on github! <br />
<br />
All your commits have a verified and have a non-expired signature. :-) </div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-56091732343188112302017-08-31T13:16:00.000+05:302017-08-31T13:43:55.229+05:30Install Gurobi on Linux and Hello world Gurobi !<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
Installation</h2>
<h3 style="text-align: left;">
System requirements</h3>
<div style="text-align: left;">
Any linux flavour would work</div>
<div style="text-align: left;">
Recent gcc version </div>
<div style="text-align: left;">
<br /></div>
<h4 style="text-align: left;">
Steps</h4>
<div style="text-align: left;">
1. Register Gurobi Optimizer(64b-Linux) Download http://www.gurobi.com/downloads/download-center<br />
2. Register and get an academic licence from the same (note the cmd grbgetkey <i>36-digit-key</i> )<br />
3. Extract tar file to /opt <br />
4. Generate licence file using the cmd<br />
<br />
rajz@warriorwithin :/opt/gurobi751/$ ./linux64/bin/grbgetkey <span style="background-color: yellow;"><i>whatever-is-your-key</i></span></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Note the license file must have got generated!! <br />
<br />
6. append at the last line of .bashrc at $HOME/.bashrc using a texteditor<br />
<br />
export GUROBI_HOME="/opt/gurobi751/linux64"<br />
export PATH="${PATH}:${GUROBI_HOME}/bin"<br />
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"<br />
export GRB_LICENSE_FILE="/opt/gurobi751/gurobi.lic"<br />
<br />
If any useraccount of the machine wants to use it, then they just have to perform step 6 on their ~/.bashrc<br />
<br />
<h3 style="text-align: left;">
Hello World Gurobi Program! </h3>
// coming soon</div>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-808307266380275322017-08-01T17:33:00.000+05:302019-09-14T23:02:29.511+05:30Installing CUDA on Linux Mint and Hello CUDA Program<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: small;">CUDA<sup>®</sup> is a parallel computing platform and programming model invented by NVIDIA. In case you wanted to write parellel programs that runs on GPU. CUDA will be helpful. </span><br />
<span style="font-size: small;"> Things that are need for CUDA programming. </span><br />
<ol>
<li><span style="font-size: small;">A machine with Nvidia Graphics Card</span></li>
<li><span style="font-size: small;">A Supported Linux, Kernel and GCC [refer <a href="http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements">here</a>]</span></li>
<li><span style="font-size: small;">NVIDIA CUDA Toolkit </span></li>
</ol>
<b><span style="font-size: small;">My System Specs is the following: </span></b><br />
<br />
<span style="font-size: small;">Dell Inspiron. It has a Nvidia Geforce grapics card. </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pan7mQDkcYJF-PgNq2TfEFDkwi6rrUoO3NPmjuRvGsadoQ9fAr38wqyKvYU4LjmjNr1F23oV475l4EftRcvklXXAtzlGhgo13gGVJHqmfA8n4YqkdYRbXtIfRo1KVia5xU8wC2SEvhvP/s1600/Screenshot+from+2017-08-01+16-06-49.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="405" data-original-width="687" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pan7mQDkcYJF-PgNq2TfEFDkwi6rrUoO3NPmjuRvGsadoQ9fAr38wqyKvYU4LjmjNr1F23oV475l4EftRcvklXXAtzlGhgo13gGVJHqmfA8n4YqkdYRbXtIfRo1KVia5xU8wC2SEvhvP/s320/Screenshot+from+2017-08-01+16-06-49.png" width="320" /></a></span></div>
<br />
<b><span style="font-size: small;">Installation steps:</span></b><br />
<b><span style="font-size: small;"><span style="background-color: red;">WARNING- Read the step completely before starting. I ran into issues with some of these step. Only for expert users or else you may have to endup reinstalling you OS</span>. </span></b><br />
<br />
<span style="font-size: small;">1. Go <a href="https://developer.nvidia.com/cuda-downloads">here</a> and download NVIDIA CUDA Toolkit deb/runfile. I am using the deb file. It is about 2GB. So, be careful if you got lesser bandwidth or Internet quota.</span><br />
<span style="font-size: small;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8iACFwEMBjso13HdQ2ao3fFperWFhVIJ1Ys5eRiZ6-5z5mB-18shptAgWRWbfuNqqRdgPnaVfc3_Kmq4raT7epUqZLHTWNetO2qwMGLBXFMHMvIVg5bJMAZo3Ya8vObbekBVp0ljoMFmi/s1600/Screenshot+from+2017-08-01+16-13-24.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="739" data-original-width="1234" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8iACFwEMBjso13HdQ2ao3fFperWFhVIJ1Ys5eRiZ6-5z5mB-18shptAgWRWbfuNqqRdgPnaVfc3_Kmq4raT7epUqZLHTWNetO2qwMGLBXFMHMvIVg5bJMAZo3Ya8vObbekBVp0ljoMFmi/s320/Screenshot+from+2017-08-01+16-13-24.png" width="320" /></a></span></div>
<span style="font-size: small;">2. To check if you have a CUDA compatible GPU, version of kernel and gcc. </span><br />
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@warriorwithin ~ $ <b>lspci | grep -i nvidia</b><br />08:00.0 3D controller: <span style="background-color: yellow;">NVIDIA</span> Corporation GM108M [GeForce 840M] (rev a2)<br />rajz@warriorwithin ~ $ <b>uname -a</b><br />Linux warriorwithin <span style="background-color: yellow;">4.4.0-71</span>-generic #92-Ubuntu SMP Fri Mar 24 12:59:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux<br />rajz@warriorwithin ~ $ <b>gcc --version</b><br />gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4)<span style="background-color: yellow;"> 5.4.0</span> 20160609</span></span> </span><br />
<span style="font-size: small;">3. If <i>nouveau</i> is enabled, then we need to disable it. If the below command prints details which means that it is active. So, just disable it by doing the steps below.</span><br />
<pre class="pre screen"><span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@warriorwithin ~ $ <b>lsmod | grep nouveau</b></span></span></pre>
<pre class="pre screen"><span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@warriorwithin ~ $ <b>sudo vi <samp class="ph codeph">/etc/modprobe.d/blacklist-nouveau.conf</samp></b></span></span></pre>
<pre class="pre screen"><span style="background-color: yellow;"><span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;">blacklist nouveau
options nouveau modeset=0</span></span></span></pre>
<span style="font-size: small;">add above two lines and run the below command.</span><br />
<pre class="pre screen"><span style="font-size: small;">sudo update-initramfs -u</span></pre>
<span style="font-size: small;">4. Reboot!!</span><br />
<span style="font-size: small;">5. <span style="font-family: "courier new" , "courier" , monospace;"> <span style="font-size: x-small;"><b>lsmod | grep nouveau</b></span></span> to check if it is active.</span><br />
<span style="font-size: small;">6. Then run the following command based on your file in Step 1. Mine was the following</span><br />
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">rajz@warriorwithin ~/install $ <span style="background-color: white;"><b>dpkg -i <span style="background-color: yellow;">cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64</span>.deb </b></span></span></span></span><br />
<span style="font-size: small;">7. <span id="targetInstructions">Run this <b><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update</span></span></b></span></span><br />
<span style="font-size: small;">8. Run this <b><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install cuda</span></span></b></span><br />
<span style="font-size: small;">9. Reboot!!</span><br />
<span style="font-size: small;">10. Open <b><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">~/.bashrc</span></span></b> file and Add the two lines at the end of file</span><br />
<span style="font-size: small;">11. Created a folder under Documents(or wherever you wish) to Install sample files and Run the below </span><br />
<span style="font-size: small;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">rajz@warriorwithin ~/Documents $ <b><span style="background-color: white;">cuda-install-samples-8.0.sh <span style="background-color: yellow;">cuda-samples/</span></span></b></span></span></span><br />
<span style="font-size: small;">12. cd into <span style="font-family: "courier new" , "courier" , monospace;"><b><span style="font-size: x-small;">~/Documents/cuda-samples/NVIDIA_CUDA-8.0_Samples</span></b> </span>and do <b><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">make</span></span></b></span><br />
<span style="font-size: small;">13. Then do the following </span><br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWGH166grrrW10JoGBmTq7dodDVGfH1D76z71Ku703mGU9G5RfTfo7Q7pKLuK-a4FXQVHlON-oRtV6qV3qiJvvWoUay-MFszsQ4jas_KAQEEkgjTRIvnML7_VKnxseIm8CPOjA2J_6hDH8/s1600/Screenshot+from+2017-08-01+15-53-20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="750" data-original-width="1069" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWGH166grrrW10JoGBmTq7dodDVGfH1D76z71Ku703mGU9G5RfTfo7Q7pKLuK-a4FXQVHlON-oRtV6qV3qiJvvWoUay-MFszsQ4jas_KAQEEkgjTRIvnML7_VKnxseIm8CPOjA2J_6hDH8/s320/Screenshot+from+2017-08-01+15-53-20.png" width="320" /></a></span></div>
<span style="font-size: small;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0jcdmx4LRdMcBinYKKD9WtMtojmNt_saf7HrVsSiO8G6v4d2X58WSYcALQ7WBCPysFsxol_efGC0rvoksPuwWTWFlqhDxk1BSTZDGwhrgcX6MQtHbIYIZvW1KJpjUjh2OvMeu25N7shQA/s1600/Screenshot+from+2017-08-01+15-52-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0jcdmx4LRdMcBinYKKD9WtMtojmNt_saf7HrVsSiO8G6v4d2X58WSYcALQ7WBCPysFsxol_efGC0rvoksPuwWTWFlqhDxk1BSTZDGwhrgcX6MQtHbIYIZvW1KJpjUjh2OvMeu25N7shQA/s320/Screenshot+from+2017-08-01+15-52-04.png" width="320" /></a></span></div>
<br />
<span style="font-size: small;">14. If it shows up like in the figure. Then it is all fine. </span><br />
<span style="font-size: small;">15. So, far so good. Next up is Hello<strike> World </strike>CUDA program </span><br />
<br />
<br />
<span style="font-size: small;">I am unsure if the step 3, 4, 5 are really necessary. But still did it for completeness sake.<span style="font-family: "courier new" , "courier" , monospace;"> </span></span><br />
<br />
<span style="font-size: small;"><span style="font-size: small;"><span style="color: red;"><b>ALERT!!!</b></span></span></span><br />
<span style="font-size: small;"><span style="font-size: small;"><span style="color: red;"></span>After Doing these steps. <span style="color: red;"><b>My system went blank after a restart!!!!!</b></span></span></span><br />
<span style="font-size: small;"><span style="font-size: small;">I figured it out that My display is by Intel Graphics Controller. Where as after NVIDIA Driver installation it set nvidia as my default display or card. So, I was getting a blank screen; Grub loaded. Linux mint Logo appeared. Even login happened. but I can't see any thing. even TTY didn't work. </span></span><br />
<br />
<span style="font-size: small;"><span style="font-size: small;">Workaround to fix this.</span></span><br />
<span style="font-size: small;"><span style="font-size: small;">1. During Grub loading. Press 'e'. search a line and prefix <b>nomodeset</b> before <b>quick splash </b>and press enter.</span></span><br />
<span style="font-size: small;"><span style="font-size: small;">2. It will take you to login. But cinnamon may crash. </span></span><br />
<span style="font-size: small;"><span style="font-size: small;">3. Using terminal Uninstall all drivers of nvidia <b>sudo apt-get remove nvidia**</b> <i> <hit driver="" find="" out="" tab="" to=""></hit></i></span></span><br />
<span style="font-size: small;"><span style="font-size: small;">4. reboot. I reverted the changes I did in step 3,4 of prev installation.</span></span><br />
<span style="font-size: small;"><span style="font-size: small;"><i>5. </i>Get to know you GPU model from <b>lspci</b> cmd</span></span><br />
<span style="font-size: small;"><span style="font-size: small;">6. Download <a href="http://www.nvidia.com/Download/index.aspx?lang=en-us">http://www.nvidia.com/Download/index.aspx?lang=en-us</a> your driver based on your MODEL, and OS; Mine was <a href="http://us.download.nvidia.com/XFree86/Linux-x86_64/384.59/NVIDIA-Linux-x86_64-384.59.run">this</a></span></span><br />
<span style="font-size: small;"><span style="font-size: small;">7. Go to TTY by pressing CTRL+ALT +F1</span></span><br />
<span style="font-size: small;"><span style="font-size: small;">8. Use cmd to stop display using Card[on Linuxmint] using <b>sudo service mdm stop </b></span></span><br />
<span style="font-size: small;"><span style="font-size: small;">8.1 For ubuntu OS; use </span></span><span style="font-size: small;"><span style="font-size: small;"><b>sudo service lightdm stop </b></span></span><span style="font-size: small;"><span style="font-size: small;"><b> </b></span></span><br />
<span style="font-size: small;"><span style="font-size: small;">9. <b>sudo ./NVIDIA-Linux-x86_64-384.59.run --no-opengl-files</b></span></span><br />
<span style="font-size: small;"><span style="font-size: small;"> follow instruction</span></span><br />
<span style="font-size: small;"><span style="font-size: small;">9.1 I said no only for 32 bit libs; Rest say positively. IMPORTANT.!</span></span><br />
<span style="font-size: small;">10. </span><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><b>sudo service mdm start </b>will get you back to GUI mode.</span></span> </span><br />
11. Reboot! huh! Hoping that it won't go blank!<br />
<br />
Cheers, <br />
<br />
<span style="font-size: small;">Let me know if these steps doesn't work or even if it works! Hope it helps!</span><br />
<br />
<b><span style="font-size: small;">References</span></b><br />
<span style="font-size: small;">[1] - <a href="http://www.docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html">www.docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html</a></span><br />
<span style="font-size: small;">[2] - <a href="https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04">https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04</a> </span><br />
<span style="font-size: small;">[3] - <a href="https://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/">https://kislayabhi.github.io/Installing_CUDA_with_Ubuntu/</a></span></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-52664803509271294612017-05-13T23:16:00.002+05:302017-05-13T23:16:54.717+05:30Installing Gitlab Server<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<div>
Let me walk through the steps.</div>
</div>
<ol style="text-align: left;">
<li><span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install curl openssh-server ca-certificates</span></li>
<li>curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash </li>
<li>sudo apt-get install gitlab-ce</li>
<li>In file /etc/gitlab/gitlab.rb</li>
<ol>
<li>nginx['listen_port'] = 8081</li>
<li>external_url 'http://mithun.cse.iitm.ac.in' </li>
</ol>
<li>sudo gitlab-ctl reconfigure </li>
<li>Go to localhost or mithun.cse.iitm.ac.in to set to <b>root</b>'s password.</li>
</ol>
<ul style="text-align: left;">
<li>Note: We tried setting up as gitlab.mithun.cse.iitm.ac.in but wasn't able to as mithun.cse.iitm.ac.in was already running an apache2 webserver from 80 port.</li>
<li>Note: We decided to run on 8081 instead</li>
<li>Note: We could have setup as "http://mithun.cse.iitm.ac.in/gitlab" -- I was not in favour of it.</li>
</ul>
If someone knows how to setup gitlab it as subdomain without affecting the existing webserver. Do let us know. Thank you.</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-15150943865196568052017-05-13T23:03:00.001+05:302017-05-13T23:04:50.163+05:30Install custom vimrc file<div dir="ltr" style="text-align: left;" trbidi="on">
There are basically only two step. Download and copy it in your home dir and save it as .vimrc. But let me walk thorough.<br />
<br />
<ol style="text-align: left;">
<li>cd ~ </li>
<li>wget https://raw.githubusercontent.com/pallavagarwal07/_vim/master/_vimrc</li>
<li>mv _vimrc .vimrc</li>
<li>vim <somefile></somefile></li>
<li>:PlugInstall</li>
</ol>
If there is error in the 4th step. Check that you have git as well as curl installed already. Do you get error still?, then.<br />
<br />
<pre>curl -fLo <span class="pl-k">~</span>/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim</pre>
<pre> </pre>
<pre> </pre>
And repeat the steps 4 and 5.<br />
<br />
Thanks to <a href="https://github.com/pallavagarwal07">Pallav</a> <br />
<br />
<br /></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-64656452690338511912017-04-01T12:16:00.000+05:302017-04-01T12:24:00.327+05:30Resolve Linux screen freeze due to external monitor<div dir="ltr" style="text-align: left;" trbidi="on">
My Laptop has Linux mint 18 installed. Here is the thing I wanted to do. There is an extra monitor I wanted use it as a secondary screen (or dual display) and set the monitor's display as my primary screen.<br />
<br />
However, the max resolution of the laptop(1366x768 16:9 ) and max resolution of the the monitor(1366x768 16:9 ) are different. So, whenever I connect the VGA cable of the monitor to my laptop(through an HDMI converter), it was just mirroring the screen with a low resolution 1024x768. And when is change the resolution to 1366x768 16:9 (or any other) the screen <b><span style="font-size: x-large;">freezes</span></b>. And you can not do anything. Either you can hard shutdown or reboot from here. Only the mouse pointer movement is seen but the clicks are not recognized . Keyboad's cap/num lights works but keys don't work. Only thing I can do is long press the power button till it is shutdown. Other option is to go to tty(Ctrl + Alt + F1 ) and login to reboot it. This seems like a bug. But whose OS/Kernal /Cinnamon - don't know the root cause. <br />
<br />
These are my atttempts / understanding:<br />
<ul style="text-align: left;">
<li>Updating Linux mint - did NOT work.</li>
<li>Updating Kernal - did NOT work.</li>
<li>The secondary monitor is not hot pluggable in Linux mint(or in general Linux or due to HDMI - VGA convertion -- I don't understand it yet). </li>
<li>Finally the below steps did work. </li>
</ul>
Steps to solve the issue.<br />
<ul style="text-align: left;">
<li>Set the secondary monitor to primary in display option.</li>
<li>Shutdown the machine.</li>
<li>Make the VGA-HDMI connected to the machine.</li>
<li>Start the machine.</li>
<li>Go to the display option, changed the external monitor to max resolution [1366x768 16:9]. </li>
<li>Cool. All done and Enjoy the large screen ;-) </li>
</ul>
</div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0tag:blogger.com,1999:blog-2605943612170847082.post-4343981856009376442017-01-23T01:11:00.000+05:302017-04-01T12:10:47.196+05:30Installing and Using LLVM Clang on Linux<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: inherit;"><span style="font-size: small;">Here are the specs (Hardware and software) of my machine</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">RAM: 8GB</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Proc : Intel Core i7-4510U @ 2.00GHz</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Linux mint 18 Cinnamon</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">word size - 64 bit</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Kernel - 4.4.0-21-generic</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">swap Size - 10GB </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">HDD : 150GB</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">There are two ways of installing</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">1. Install from apt-get </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2. Building from src files using tar.gz</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">Make sure to check <a href="http://llvm.org/docs/GettingStarted.html#software">this requirements.</a></span></span><br />
<table border="1" class="docutils"><tbody valign="top">
<tr class="row-even"><td><span style="font-family: inherit;"><span style="font-size: small;"><a class="reference external" href="http://savannah.gnu.org/projects/make">GNU Make</a></span></span></td><td><span style="font-family: inherit;"><span style="font-size: small;">3.79, 3.79.1</span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">Makefile/build processor</span></span></td>
</tr>
<tr class="row-odd"><td><span style="font-family: inherit;"><span style="font-size: small;"><a class="reference external" href="http://gcc.gnu.org/">GCC</a></span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">>=4.8.0</span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">C/C++ compiler</span></span></td>
</tr>
<tr class="row-even"><td><span style="font-family: inherit;"><span style="font-size: small;"><a class="reference external" href="http://www.python.org/">python</a></span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">>=2.7</span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">Automated test suite</span></span></td>
</tr>
<tr class="row-odd"><td><span style="font-family: inherit;"><span style="font-size: small;"><a class="reference external" href="http://zlib.net/">zlib</a></span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">>=1.2.3.4</span></span></td>
<td><span style="font-family: inherit;"><span style="font-size: small;">Compression library //it worked without this</span></span></td></tr>
</tbody></table>
<h4 style="text-align: left;">
<b><span style="font-family: inherit;"><span style="font-size: small;">1. Install from apt-get </span></span></b></h4>
<span style="font-family: inherit;"><span style="font-size: small;"> $ sudo apt-get clang-3.9 llvm-3.9</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;"><b>Reference:</b> http://apt.llvm.org</span></span><br />
<h4 style="text-align: left;">
<b><span style="font-family: inherit;"><span style="font-size: small;">2. Building LLVM 3.9.1 from Source</span></span></b></h4>
<ol style="text-align: left;">
<li><span style="font-family: inherit;"><span style="font-size: small;">Download two tar file for llvm & clang from <a href="http://www.releases.llvm.org/download.html">here</a></span></span> </li>
<li><span style="font-family: inherit;"><span style="font-size: small;">Extract both the files inside some folder // say llvm</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">Rename llvm-3.9.1.src folder as <b>llvm-3.9</b> //LLVM_SRC</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">Rename cfe-3.9.1.src folder as <b>clang</b> and move inside folder llvm-3.9/tools</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">Create a folder llvm/llvm-build and cd llvm-build // LLVM_OBJ </span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DLLVM_ENABLE_ASSERTIONS=On /home/rajz/install/llvm/llvm-3.9</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">// after some time</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">make -j2</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">//after some more time </span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">sudo make install</span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">opt --version </span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">clang --version </span></span></li>
<li><span style="font-family: inherit;"><span style="font-size: small;">//Done </span></span></li>
</ol>
<b><span style="font-family: inherit;"><span style="font-size: small;">References: </span></span></b><br />
<span style="font-family: inherit;"><span style="font-size: small;">1. http://llvm.org/docs/GettingStarted.html</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2. https://www.youtube.com/watch?v=4iVc204omI0</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">3. http://llvm.org/docs/CMake.html</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<b><span style="font-family: inherit;"><span style="font-size: small;">Writing a Sample Pass using LLVM</span></span></b><br />
<span style="font-family: inherit;"><span style="font-size: small;">1. Source folder for LLVM:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> ~/install/llvm/llvm-3.9 </span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2. Build folder for LLVM:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> ~/install/llvm/llvm-build</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">3. Create a CMakeLists.txt file as below
</span></span><br />
<blockquote class="tr_bq">
<span style="font-family: inherit;"><span style="font-size: small;"> add_llvm_loadable_module( LLVMSample</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> Sample.cpp</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> PLUGIN_TOOL</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> opt</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> )</span></span></blockquote>
<span style="font-family: inherit;"><span style="font-size: small;">4. Create the Sample.cpp as below</span></span><br />
<blockquote class="tr_bq" style="text-align: left;">
<span style="font-family: inherit;"><span style="font-size: small;">#include "llvm/IR/Function.h"</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">#include "llvm/Pass.h"</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">#include "llvm/Support/raw_ostream.h"</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">using namespace llvm;</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">namespace {</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">struct Sample : public FunctionPass {</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> static char ID;</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> Sample() : FunctionPass(ID) {}</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;"> bool runOnFunction(Function &F) override {</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> errs() << "Sample: ";</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> errs().write_escaped(F.getName()) << '\n';</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> return false;</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> }</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">}; // end of struct Sample</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">} // end of anonymous namespace</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<span style="font-family: inherit;"><span style="font-size: small;">char Sample::ID = 0;</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">static RegisterPass<sample> X("sample", "Sample Hello World Pass ",<br /> false /* Only looks at CFG */,<br /> false /* Analysis Pass */);</sample></span></span></blockquote>
<span style="font-family: inherit;"><span style="font-size: small;">5. Sample pass folders at:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> ~/install/llvm/llvm-3.9/lib/Analysis/Sample (contains Sample.cpp and CMakeLists.txt)</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> ~/install/llvm/llvm-build/lib/Analysis/Sample (contains only the CMakeLists.txt)</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">6. Append a line in ~/install/llvm/llvm-3.9/lib/Analysis/CMakeLists.txt</span></span><br />
<br />
<div style="text-align: left;">
<span style="font-family: inherit;"><span style="font-size: small;"> add_subdirectory(Sample)</span></span></div>
<br />
<span style="font-family: inherit;"><span style="font-size: small;">7. Created shared library at ~/install/llvm/llvm-build/lib/LLVMSample.so</span></span><br />
<span style="font-family: inherit;"></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> $ cd ~/install/llvm/llvm-build</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> $ make</span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-size: small;">8. To run analysis on a test1.c program:</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> $ clang -S -O0 -emit-llvm test1.c -o test1.ll</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"> $ opt -load ~/install/llvm/llvm-build/lib/LLVMSample.so -disable-output -sample test1.ll</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;"><br /></span></span>
<b><span style="font-family: inherit;"><span style="font-size: small;">Reference</span></span></b><br />
<span style="font-family: inherit;"><span style="font-size: small;">1. http://llvm.org/docs/WritingAnLLVMPass.html</span></span><br />
<span style="font-family: inherit;"><span style="font-size: small;">2. <a href="http://www.cse.iitm.ac.in/~rupesh/teaching/pa/jan16/">AMR</a>, PA TAs </span></span></div>
<div class="blogger-post-footer">______________________________
Rajesh Pandian M</div>Rajesh Pandian Mhttp://www.blogger.com/profile/13738748238418756325noreply@blogger.com0