Graduate Student Survival Guide: using cluster, gnuplot and LaTeX

  • View
    34

  • Download
    2

Embed Size (px)

DESCRIPTION

Graduate Student Survival Guide: using cluster, gnuplot and LaTeX. Janardhan Rao Doppa School of EECS, Oregon State University doppa@eecs.oregonstate.edu http://web.engr.oregonstate.edu/~doppa. EECS Cluster: what ?. A computing resource to run your jobs Off-shore your computing - PowerPoint PPT Presentation

Text of Graduate Student Survival Guide: using cluster, gnuplot and LaTeX

  • Graduate Student Survival Guide:using cluster, gnuplot and LaTeXJanardhan Rao DoppaSchool of EECS, Oregon State Universitydoppa@eecs.oregonstate.eduhttp://web.engr.oregonstate.edu/~doppa

  • EECS Cluster: what ? A computing resource to run your jobsOff-shore your computing Experiments or simulations for researchWill be handy when you have to run large number of experimentsYou dont want to use your DELL (read as delicate) laptop Webhttp://engr.oregonstate.edu/computing/cluster/

  • EECS Cluster: how ? Connection: Connect to one of the submit HostsSubmit32 or submit64Availability: Check the availability of slots in each queueI386, em64t, amd64-low, eecs1Compile: Compile your code on the remote machineScript: Prepare the submit scriptcommand to run your program, which queue, where to store the output or error Submit: Submit the job using submit scriptMonitor: Monitor the statusauto- email or manually check the status

  • EECS Cluster: how ? Connection: Connect to one of the submit Hostsssh @ {submit32, submit64}.eecs.oregonstate.eduAvailability: Check the availability of slots in each queueqstat command : learn the usage qstat - - helpqstat f q where = i386 or em64t or amd64-low or eecs1

    em64t@exec-em64t-01.hpc.engr.o BIP 2/2 2.02 lx24-amd64 1402020 0.50500 run09_26.s matthchr r 10/28/2010 20:05:08 1 1402032 0.50500 closfc mathewm r 10/28/2010 21:03:08 1 #occupied / # total

  • EECS Cluster: how ? Script: Prepare the submit script#!/bin/csh

    #Job name#$ -N job_name

    #Current Working Directory#$ -cwd

    # Resource request for the faster bees#$ -soft -l mem_total=3.00G

    # specify the hardware platform to run the job on.# options are: amd64, em64t, i386, volumejob (use em64t if you don't care)#$ -q i386

    # Output/error file (merged)#$ -o output_file.out#$ -j y

    # Command sequence./source_file

  • EECS Cluster: how ? Submit: Submit the job using submit scriptChange permissions of script: chmod u+x script.cshqsub script.cshMonitor: Monitor the statusqstat u Cautions:You should have enough disk space (logs and outputs) and main memory (RAM) to run the programDont monopolize the cluster think of others also!Budgeted experimental design based on the available resources (slots), hard deadlines (time) etc.

  • gnuplot: what ? A command-line program to generate 2D and 3D plotsbetter than Excel no more frustrating clicks!specify style, fonts, legends as commandsreuse the code for modifications or similar plotsgenerates very good PS or EPS figures which are highly compatible with LaTeXgnu is not the same as GNU!!Webhttp://www.gnuplot.info/Available for both linux and windows

  • gnuplot: how ? Data file: Create data file to be used for the plotSpace separated column-wise dataCode file: Create the gnuplot code fileSpecify the title of plot, axes names and ranges, legends, thickness of lines, color etc.Specify the output format (PNG, PS or EPS), along with the filenameRun: run your code on the gnuplot command-lineCopy and paste your code on the command-line and press ENTER

  • gnuplot: how ? Data file: Create data file to be used for the plotSpace separated column-wise data

    0.110073.1370.140.210070.1473.130.310070.1473.130.410074.6273.130.510074.6273.130.68464.1770.89

  • gnuplot: how ? Code file: Create the gnuplot code fileset terminal postscript eps enhanced "Helvetica" 18set term postscript eps colorset key graph 0.75,0.9set size 0.9, 0.9set title "Bayes-EM vs Ripper on NFL data \n (Novelty missingness model)set ylabel "Accuracy (%)set xlabel "Percentage of missing valuesset xrange [0.1:0.6]set yrange [50:100]set output 'EM_comparison_novelty.epsplot \'EM_comparison_novelty.txt' using 1:$2 t'Bayes-EM' with linespoint lt 2 lw 1 pt 7,\'EM_comparison_novelty.txt' using 1:$3 t'RIPPER-conservative' with linespoint lt 3 lw 3 pt 7,\'EM_comparison_novelty.txt' using 1:$4 t'RIPPER-aggressive' with linespoint lt 4 lw 3 pt 7

  • gnuplot: how ? Run: run your code on the gnuplot command-lineCopy and paste your code on the command-line and press ENTER

  • gnuplot: resources Short and quick reference guidehttp://sparky.rice.edu/gnuplot.htmlWeb resourceshttp://www.gnuplot.info/Demos, tutorials, sample codes and scriptsLot of useful sample plots are available at: http://www.cse.iitb.ac.in/silmaril/br/lib/exe/fetch.php?id=students&cache=cache&media=students:gnuplot.tgzThanks to Bhaskaran Raman and Kameshwari Chebrolu.

  • LaTeX: what ? A manuscript preparation systembetter than Word no more equation editors!Math formulas and equations are easier to writeBibliography and cross-referencing is much easyAlmost all conference and journal papers are written using LaTeX Default standard in academia get used to it!Webhttp://en.wikibooks.org/wiki/LaTeXWindows editors: TeXnicCenter and WinEditLinux editors: Lyx and Kyle

  • LaTeX: basic files LaTex code.tex LaTeX input code file.sty style fileBibliography.bib bibliography file.bst bibliography style fileOutput.dvi device independent file .ps postscript file

  • LaTeX: writing code file Start with an existing templateBasic commands\section, \subsection, \subsubsectionText mode vs. Math mode ($ $)Math symbols: \alpha, \beta, \gamma\begin{environment} and \end{environment}\begin{itemize} and \end{itemize}\begin{equation} and \end{equation}\begin{figure} and \end{figure}\begin{table} and \end{table}

  • LaTeX: bibliography file A sample bibliography entry

    @inproceedings{CRF-ICML:01, author = {John Lafferty and Andrew McCallum and Fernando Pereira}, title = {Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data}, booktitle = {ICML'01: Proceedings of the 18th International Conference on Machine Learning}, year = {2001},}@article{TRITRAINING-TKDE:05, author = {Zhi-Hua Zhou and Ming Li}, title = {Tri-Training: Exploiting Unlabeled Data Using Three Classifiers}, journal = {IEEE Transactions on Knowledge and Data Engineering}, volume = {17}, issue = {11}, year = {2005},}

  • LaTeX: compiling LaTeX code with latex or pdflatexBibTeX code with bibtexLatex Bibtex Latex two pass algorithm!Collaborative writingUse CVS or SVN repository much easier!

  • LaTeX: resourcesLaTeX cheat sheethttp://www.ctan.org/tex-archive/info/latexcheat/latexcheat/latexsheet.pdfLaTeX wiki bookhttp://en.wikibooks.org/wiki/LaTeX/Learn tips and tricksFrom expert usersFrom online forumsGrow your bag of tricks will save your time at deadlines!

  • LaTeX in PowerPointTeXPoint A LaTeX add-on for ppt and word http://texpoint.necula.org/http://web.engr.oregonstate.edu/~mehtane/latex/index.html TeXclip LaTeX to imagehttp://maru.bonyari.jp/texclip/texclip.phpBeamer slides using LaTeXhttp://bitbucket.org/rivanvx/beamer/wiki/Home

  • MS students: Advice Hard to fund all the MS studentsbad economy, low grant money etc.Short time investment faculty will chose their bets carefully!Look for alternative funding sourcesBSG, Media Services, Library, Science laboratories, e.g., chemistry, biology etc. Bottom line: Grad school is costly, but a very good long term investment!!

  • MS students: Advice Immediate reward vs. long-term average rewardWorst: you finish your graduate school with your moneyConcentrate on your education and develop skillsGo for a summer internship money and experienceSpecialize in something good job market!You can pay your loans in less than 6 months!!Don'ts Finish classes quickly and graduate with ME bad idea!worry about money while in school wont be productive

  • Questions ??