Monday, May 28, 2012

How to install LaTeX/Packages/Extra Packages

http://en.wikibooks.org/wiki/LaTeX/Packages/Installing_Extra_Packages

1. Extract the files:
Run LaTeX on the .ins file. That is, open the file in your editor and process it as if it were a LaTeX document.

Or type : latex xxx.ins in terminal window.

2. Create the documentation
Run LaTeX on the .dtx file. You might need to run it twice or more. to get the cross-references right (just like any other LaTeX document). This will create a .dvi file of documentation explaining what the package is for and how to use it. If you prefer to create PDF then run pdfLaTeX instead. If you created a .idx as well, it means that the document contains an index, too. .glo (glossary) file has been produced. Run the following command instead:


makeindex -s gglo.ist -o name.gls name.glo


3. Install the files While the documentation is printing, move or copy the package files from your temporary directory to the right places in your TeX local installation directory tree, Packages installed by hand should always be placed in your "local" directory tree, not in the directory tree containing all the pre-installed packages.

Unix-type systems: Usually ~/texmf/ or ~/texmf-texlive

The "right place" sometimes causes confusion, especially if your TeX installation is old or does not conform to the TeX Directory Structure. For a TDS-conformant system, the "right place" for a LaTeX .sty file is suitably-named subdirectory of texmf/tex/latex/.

TDS?
http://www.tex.ac.uk/tex-archive/info/beginlatex/html/chapter5.html#TDS




4. Update your index Finally, run your TeX indexer program to update the package database.
texhash
mktexlsr
.....

This step is utterly essential, otherwise nothing will work.
http://theoval.cmp.uea.ac.uk/~nlct/latex/novices/installsty.html

Easy installatin/removal of a LaTeX package
http://askubuntu.com/questions/72803/easy-installation-removal-of-a-latex-package

Monday, May 7, 2012

How to measure time in NVIDIA CUDA?

Ivan's blog
http://ivanlife.wordpress.com/2011/05/09/time-cuda/

CUDA Developer Forum Discussion:
cudaEvent timer vs. Host timers
http://forums.developer.nvidia.com/devforum/discussion/7541/cudaevent-timers-vs-host-timers/p1
Parallel Nsight, NVIDIA Visual Profiler, CUDA profiler, and the CUPTI SDK provide the most accurate  methods to measure the execution time of a kernel. The measured time does not include the overhead to launch the kernel.

cudaEventRecord is the most accurate method to measure the setup and execution time of a kernel.

A high percision CPU timer can be used to measure the overhead of the launch, the execution of the kernel, and the completion notification. If you use this method I recommend that you call cudaDeviceSynchronize() before the first clock to make sure there is no outstanding work that might delay the launch of the kernel. This method will have the highest variance as OS context switching and other applications using the GPU will show up in this method.

Greg Simth

Wednesday, May 2, 2012

Tuesday, May 1, 2012