<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>shocksolution.com</title>
	<atom:link href="http://www.shocksolution.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shocksolution.com</link>
	<description>computational science and engineering</description>
	<lastBuildDate>Fri, 14 Jun 2013 21:25:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Very helpful PDF manipulation tools on Linux</title>
		<link>http://www.shocksolution.com/2013/06/very-helpful-pdf-manipulation-tools-on-linux/</link>
		<comments>http://www.shocksolution.com/2013/06/very-helpful-pdf-manipulation-tools-on-linux/#comments</comments>
		<pubDate>Fri, 14 Jun 2013 21:25:15 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1270</guid>
		<description><![CDATA[You can do some really cool stuff with Ghostscript on the command line on a computer running Linux or OS X. However, it&#8217;s hard to remember all that stuff when you don&#8217;t use it very often. I recently learned about a set of command-line PDF manipulation tools called PDFjam. If you are a  geek like [...]]]></description>
				<content:encoded><![CDATA[<p>You can do some really cool stuff with Ghostscript on the command line on a computer running Linux or OS X. However, it&#8217;s hard to remember all that stuff when you don&#8217;t use it very often. I recently learned about a set of <a title="PDFjam PDF-manipulation tools" href="http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam/" target="_blank">command-line PDF manipulation tools called PDFjam</a>. If you are a  geek like me, you probably already have pdfLaTeX installed.  I can&#8217;t summarize the capabilities any better than the description on the PDFjam site:</p>
<blockquote><p>PDFjam is a small collection of shell scripts which provide a simple interface to much of the functionality of the excellent pdfpages PDF file package (by Andreas Matthias) for pdfLaTeX. These scripts take one or more PDF files (and/or JPG/PNG graphics files) as input, and produce one or more PDF files as output. They are useful for joining files together, selecting pages, reducing several source pages onto one output page, etc., etc.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/06/very-helpful-pdf-manipulation-tools-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When root cannot run X applications from a local terminal</title>
		<link>http://www.shocksolution.com/2013/06/when-root-cannot-run-x-applications-from-a-local-terminal/</link>
		<comments>http://www.shocksolution.com/2013/06/when-root-cannot-run-x-applications-from-a-local-terminal/#comments</comments>
		<pubDate>Sun, 02 Jun 2013 03:08:56 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1255</guid>
		<description><![CDATA[I run XWindows on a CentOS 5.9 box as a non-root user. To perform administrative tasks, I occasionally log in as root using &#8220;su&#8221; in a terminal window. However, I found that I was unable to start any GUI applications as root. I got the following error: Xlib: connection to ":0.0" refused by server Xlib: [...]]]></description>
				<content:encoded><![CDATA[<p>I run XWindows on a CentOS 5.9 box as a non-root user. To perform administrative tasks, I occasionally log in as root using &#8220;su&#8221; in a terminal window.  However, I found that I was unable to start any GUI applications as root.  I got the following error:</p>
<pre>Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

E233: cannot open display Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified</pre>
<p><span id="more-1255"></span></p>
<p>This can happen when xhost isn&#8217;t configured to allow local, non-network connections. As the user who started the xwindows session (not root) run:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">xhost</span>
access control enabled, only authorized clients can connect
INET:localhost.localdomain
SI:localuser:cfinch</pre></td></tr></table></div>

<p>This shows that network connections to X are only allowed from localhost, and from a local user called cfinch (who started the X server). To fix the problem, run the following command to allow local user &#8220;root&#8221; to connect to the X server:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">xhost</span> local:root
non-network <span style="color: #7a0874; font-weight: bold;">local</span> connections being added to access control list</pre></td></tr></table></div>

<p>To see what this did, run xhost without any arguments:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">xhost</span>
access control enabled, only authorized clients can connect
LOCAL:
INET:localhost.localdomain
SI:localuser:cfinch</pre></td></tr></table></div>

<p>Now root can run GUI applications, such as the system-config-* tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/06/when-root-cannot-run-x-applications-from-a-local-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The cause of init: Id &#8220;co&#8221; respawning too fast, and how to fix it</title>
		<link>http://www.shocksolution.com/2013/04/the-cause-of-init-id-co-respawning-too-fast-and-how-to-fix-it/</link>
		<comments>http://www.shocksolution.com/2013/04/the-cause-of-init-id-co-respawning-too-fast-and-how-to-fix-it/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 20:26:03 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1212</guid>
		<description><![CDATA[I recently found the following message in the system logs for one of the compute nodes in the STOKES cluster: init: Id "co" respawning too fast: disabled for 5 minutes This caught my attention, because this OS image on this particular node should be identical to the image that is deployed on the rest of [...]]]></description>
				<content:encoded><![CDATA[<p>I recently found the following message in the system logs for one of the compute nodes in the STOKES cluster:</p>
<pre>init: Id "co" respawning too fast: disabled for 5 minutes</pre>
<p>This caught my attention, because this OS image on this particular node should be identical to the image that is deployed on the rest of the nodes in the cluster. Why was it the only one producing this strange warning message? I searched the web and learned that the following line in /etc/inittab is causing the warning:<span id="more-1212"></span></p>
<pre>co:2345:respawn:/sbin/agetty ttyS1 19200 vt100-nav</pre>
<p>However, this line is also found in the inittab file on every other node, so there is no error in inittab. Many solutions suggest commenting out this line. That is not a real solution, since this line is actually correct. After reading <a title="init: id &quot;co&quot; respawning too fast" href="http://xmlandmore.blogspot.com/2012/12/init-id-co-respawning-too-fast-disabled.html" target="_blank">this post about co respawning too fast</a>, I realized that the problem with my server is that one of the physical serial ports was not working. The output from dmesg showed:</p>
<pre>Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
brd: module loaded</pre>
<p>This node should have TWO serial ports!  I rebooted the node and confirmed that the second serial port was not configured in the UEFI.  I suspect that this node &#8220;lost&#8221; a serial port when the battery on the motherboard had to be replace a few months back. Surprisingly, I had to reconfigure the serial ports twice before it worked.  Now dmesg shows:</p>
<pre>Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:03: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A</pre>
<p>&#8230;and the annoying warning is no longer filling my log files with noise! I suspect that this points to the root problem experienced by other admins, such as <a title="init: id &quot;co&quot; respawning too fast on AWS" href="https://forums.aws.amazon.com/thread.jspa?messageID=383873" target="_blank">these disgruntled Amazon Web Services users</a>. I suspect that Amazon made a change in their virtual machine that eliminated one or more virtual serial ports, wreaking havoc with some users whose instances depended on them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/04/the-cause-of-init-id-co-respawning-too-fast-and-how-to-fix-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to plot .xvg files from GROMACS on Windows</title>
		<link>http://www.shocksolution.com/2013/03/how-to-plot-xvg-files-from-gromacs-on-windows/</link>
		<comments>http://www.shocksolution.com/2013/03/how-to-plot-xvg-files-from-gromacs-on-windows/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 18:00:51 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Molecular modeling]]></category>
		<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1198</guid>
		<description><![CDATA[GROMACS produces graphical output in the form of .xvg files. These are designed to be viewed with a classic UNIX/Linux plotting program called Grace. If you happen to be using Linux and you have Grace installed, it is very easy to plot the data with the command xmgrace my_file.xvg If you aren&#8217;t using Linux, plotting .xvg files [...]]]></description>
				<content:encoded><![CDATA[<p><a title="GROMACS xvg files" href="http://www.gromacs.org/Documentation/How-tos/Graphing_Data" target="_blank">GROMACS produces graphical output in the form of .xvg files</a>. These are designed to be viewed with a classic <a title="Grace" href="http://plasma-gate.weizmann.ac.il/Grace/" target="_blank">UNIX/Linux plotting program called Grace</a>. If you happen to be using Linux and you have Grace installed, it is very easy to plot the data with the command</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">xmgrace my_file.xvg</pre></td></tr></table></div>

<p><span id="more-1198"></span><br />
If you aren&#8217;t using Linux, plotting .xvg files is quite a bit more difficult. <a title="Gnuplot" href="http://www.gnuplot.info/" target="_blank">Gnuplot </a>is the only free plotting program that I have found that can handle .xvg files. <a title="Gnuplot download for Windows" href="http://sourceforge.net/projects/gnuplot/files/" target="_blank">Gnuplot is available for Windows</a> (there is a direct download link near the top of the download page), but I will caution you that Gnuplot is not easy to learn. It has a command-line interface, and there are no point-and-click options to do basic operations such as labeling the axes of the plot. If you are using Gnuplot, you can plot the contents of an .xvg file with the command:
<pre>plot "my_filename.xvg" u 1:2 w lines</pre>
<p style="text-align: left;">If you are more comfortable with Microsoft Office, you can also plot the contents of .xvg files using Excel. Start Excel, choose File-&gt;Open, and select “All Files (*.*) in the lower right corner of the dialog.  Select a .xvg file and press Open.  The text import wizard should start.  Choose Fixed width, Enter 14 where it says, “Start import at row: “ and press Next. A screenshot is shown below.<a href="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_import_step1.png"><img class="size-medium wp-image-1199 aligncenter" alt="xvg_import_step1" src="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_import_step1-300x215.png" width="300" height="215" /></a></p>
<p> In the next window, remove one of the black vertical lines, and move the other one to Column 15 as shown below. Press Finish.</p>
<p style="text-align: left;"><a href="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_import_step2.png"><img class="size-medium wp-image-1200 aligncenter" alt="xvg_import_step2" src="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_import_step2-300x215.png" width="300" height="215" /></a>If your import was successful, your spreadsheet should look like this:</p>
<p style="text-align: left;"><a href="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_data_imported.png"><img class="size-medium wp-image-1201 aligncenter" alt="xvg_data_imported" src="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_data_imported-300x178.png" width="300" height="178" /></a>Now, highlight the first two columns and insert a scatter plot (with lines) as shown below:</p>
<p style="text-align: left;"><a href="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_Excel_plot.png"><img class="size-medium wp-image-1202 aligncenter" alt="xvg_Excel_plot" src="http://shocksolution.com/wordpress/wp-content/uploads/2013/03/xvg_Excel_plot-300x191.png" width="300" height="191" /></a>Although I generally don&#8217;t recommend using Excel for making publication-quality plots, it can be useful if you don&#8217;t have better tools available.</p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/03/how-to-plot-xvg-files-from-gromacs-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opportunity for postdoctoral research associate in high performance computing</title>
		<link>http://www.shocksolution.com/2013/03/opportunity-for-postdoctoral-research-associate-in-high-performance-computing/</link>
		<comments>http://www.shocksolution.com/2013/03/opportunity-for-postdoctoral-research-associate-in-high-performance-computing/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 22:51:12 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1188</guid>
		<description><![CDATA[My current employer, the STOKES Advanced Research Computing Center (STOKES ARCC), is hiring a postdoctoral research associate to conduct research in high performance computing with an emphasis on next-generation networking technologies. The ARCC has internal funding that will be used to upgrade our research network to the Internet2 Innovation Platform standard. We are also seeking [...]]]></description>
				<content:encoded><![CDATA[<p>My current employer, the <a title="STOKES ARCC" href="http://webstokes.ist.ucf.edu" target="_blank">STOKES Advanced Research Computing Center (STOKES ARCC)</a>, is <a title="Hiring postdoc in high performance computing" href="https://www.jobswithucf.com/postings/34718" target="_blank">hiring a postdoctoral research associate to conduct research in high performance computing with an emphasis on next-generation networking technologies</a>. The ARCC has internal funding that will be used to upgrade our research network to the <a title="Internet2" href="http://www.internet2.edu/" target="_blank">Internet2</a> <a title="Innovation Platform" href="http://www.internet2.edu/pubs/Internet2-Innovation-Platform-FAQ.pdf" target="_blank">Innovation Platform</a> standard. We are also seeking external funding to extend the research network across the <a title="University of Central Florida" href="http://www.ucf.edu/" target="_blank">UCF </a>campus. We are looking for a candidate with an interest in topics such as defining a &#8220;Science DMZ,&#8221; Internet2, GENI, <a title="perfSONAR-PS" href="http://www.internet2.edu/performance/pS-PS/" target="_blank">perfSONAR</a>, software-defined networks, etc. Please use the link above to apply for the position. Feel free to contact me if you have questions-<a title="Contact Craig Finch" href="http://www.shocksolution.com/about_craig_finch/" target="_blank">my contact information is on the about page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/03/opportunity-for-postdoctoral-research-associate-in-high-performance-computing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated GROMACS tutorials</title>
		<link>http://www.shocksolution.com/2013/02/updated-gromacs-tutorials/</link>
		<comments>http://www.shocksolution.com/2013/02/updated-gromacs-tutorials/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 21:40:54 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Molecular modeling]]></category>
		<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1179</guid>
		<description><![CDATA[I have published up-to-date versions of two classic GROMACS tutorials on GitHub. The Getting Started section of the GROMACS online documentation contains some helpful tutorials.  Unfortunately, these tutorials have not been updated in a while. They also don&#8217;t explain how to set up an efficient workflow to run large molecular dynamics simulations on a shared cluster [...]]]></description>
				<content:encoded><![CDATA[<p>I have published <a title="GROMACS Tutorials" href="https://github.com/cfinch/GROMACS_Examples" target="_blank">up-to-date versions of two classic GROMACS tutorials</a> on GitHub. The <a title="GROMACS Getting Started" href="http://manual.gromacs.org/online/getting_started.html" target="_blank">Getting Started section of the GROMACS online documentation</a> contains some helpful tutorials.  Unfortunately, these tutorials have not been updated in a while. They also don&#8217;t explain how to set up an efficient workflow to run large molecular dynamics simulations on a shared cluster using a resource manager such at <a title="Torque resource manager" href="http://www.adaptivecomputing.com/products/open-source/torque/" target="_blank">Torque</a>. I have created a set of files that implement the <a title="speptide molecular dynamics tutorial" href="http://manual.gromacs.org/online/speptide.html" target="_blank">speptide tutorial</a> from the GROMACS documentation.You can use my files and follow along with the explanations in the GROMACS manual.<span id="more-1179"></span></p>
<p>The speptide directory has two subdirectories: one for MDP files (which control the simulations) and one for simulation files. I have found this to be an efficient setup because many MD experiments involve simulating multiple variants of a molecule (such as mutants of a protein) and comparing the results. All variants should be run with the same parameters, so the same MDP files are used for each simulation. Keeping the MDP files in their own directory and creating symbolic links from the run directory to the MDP files ensures that all simulations are run with identical parameters.</p>
<p>In the <strong>run</strong> directory, there is a Bash script called setup_GROMACS_job.sh. At the top of the script, the user sets variables to set simulation parameters such as the box size. The script can be run with the command</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>setup_GROMACS_job.sh speptide</pre></td></tr></table></div>

<p> Running this script creates the symbolic links to the MDP files and prompts the user for other parameters, such as the number of ions required to neutralize charge in the simulation domain. Note that this script is a simple tool to automate some common setup steps; running the script is <em>not</em> a substitute for understanding what it does at each step!</p>
<p><strong>run_GROMACS_MD.bat</strong> is a Torque submit script. You will have to edit the Torque parameters so that you are using an account and queue that are appropriate for your cluster. This script assumes that <strong>setup_GROMACS_job.sh</strong> has already run successfully.  It performs an energy minimization run, an NVT run with constraints on the positions of protein atoms, an NPT run with the same constraints, and an unconstrained NPT run. Not every MD simulation requires all of these runs, but they are all included for demonstration purposes. If you have already run an unconstrained NPT simulation but want to extend the trajectory in time, the Torque submit script <strong>run_GROMACS_MD_unconstrained.bat</strong> will run only the unconstrained NPT simulation.</p>
<p>The script called <strong>analysis.sh</strong> is another simple way to automate many of the standard analysis operations that are performed on MD trajectories. Once again, it is not wise to run this script without studying it and understanding every line. For example, running the DSSP analysis program requires downloading and installing DSSP, and having a version of GROMACS that is compatible with DSSP.</p>
<p>Finally, the script called <strong>cleanup.sh</strong> will reset the simulation directory to its original condition, DELETING YOUR RESULTS. If you think you might screw this up, delete this script now so you don&#8217;t accidentally delete precious data!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/02/updated-gromacs-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Lumerical FDTD on a linux cluster</title>
		<link>http://www.shocksolution.com/2013/02/installing-lumerical-fdtd-on-a-linux-cluster/</link>
		<comments>http://www.shocksolution.com/2013/02/installing-lumerical-fdtd-on-a-linux-cluster/#comments</comments>
		<pubDate>Mon, 25 Feb 2013 20:25:43 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1170</guid>
		<description><![CDATA[Most of the time, RPM (especially in conjunction with yum) is a decent package management solution. However, I can think of two common circumstances when you don&#8217;t want to let RPM install a package: You don&#8217;t have root permissions on a system such as a shared cluster You are an administrator on a shared cluster [...]]]></description>
				<content:encoded><![CDATA[<p>Most of the time, RPM (especially in conjunction with yum) is a decent package management solution. However, I can think of two common circumstances when you don&#8217;t want to let RPM install a package:</p>
<ul>
<li>You don&#8217;t have root permissions on a system such as a shared cluster</li>
<li>You are an administrator on a shared cluster and you can&#8217;t risk having a package over-write system-critical files</li>
</ul>
<p><span id="more-1170"></span>One approach is to <a title="Extract files from RPM package" href="http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html" target="_blank">extract the files from the RPM package</a> and install them manually. I used this method to install <a title="FDTD Solutions" href="http://www.lumerical.com/tcad-products/fdtd/" target="_blank">FDTD Solutions</a> from <a title="Lumerical" href="http://www.lumerical.com/" target="_blank">Lumerical</a> on the <a title="STOKES ARCC" href="http://webstokes.ist.ucf.edu/" target="_blank">STOKES Linux cluster</a>. The application is distributed as an RPM package. I <em>never</em> install a third-party RPM as root, because a badly constructed package might over-write a system-critical file that some user is depending on. I downloaded the appropriate TAR file from Lumerical, uncompressed it, and looked at the contents. There is a simple script called install.sh which checks to make sure the user is root and then tries to install a hardware key driver and an RPM that contains the FDTD software. Here are my recommendations for installing Lumerical products on a cluster:</p>
<ol>
<li><a title="Lumerical cluster instructions are WRONG" href="http://docs.lumerical.com/en/fdtd/install_linux_cluster_setup.html" target="_blank">Instructions on the Lumerical web site</a> say to install the hardware USB key driver on every compute node. This is a bad idea unless you have a small, single-user cluster. Those instructions fail to mention that Lumerical also offers FlexLM-based network licenses. If you are installing Lumerical products on a production cluster, get them to give you a FlexLM-based license!</li>
<li>Use the following command to extract the files from the RPM:</li>
</ol>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">rpm2cpio FDTD-8.5.3-<span style="color: #000000;">1</span>.rhel5.x86_64.rpm <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">cpio</span> <span style="color: #660033;">-idmv</span></pre></td></tr></table></div>

<p>This could get messy, but fortunately, the FDTD Solutions app is self-contained within the /opt directory. I copied the application directory to our apps directory, and it runs fine from there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/02/installing-lumerical-fdtd-on-a-linux-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenMPI, Intel Compilers and RedHat 5: cannot find -lnuma</title>
		<link>http://www.shocksolution.com/2013/02/openmpi-on-redhat-5-cannot-find-lnuma/</link>
		<comments>http://www.shocksolution.com/2013/02/openmpi-on-redhat-5-cannot-find-lnuma/#comments</comments>
		<pubDate>Wed, 20 Feb 2013 23:21:42 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1157</guid>
		<description><![CDATA[I found an interesting quirk when trying to build an OpenMPI application on a visualization node with a &#8220;stock&#8221; version of Red Hat Enterprise Linux 5.8.  I used mpicc to compile the application and got the following error: $ mpicc hello_world_mpi.c -o hello_world /usr/bin/ld: cannot find -lnuma This was rather surprising, since this node mounts [...]]]></description>
				<content:encoded><![CDATA[<p>I found an interesting quirk when trying to build an OpenMPI application on a visualization node with a &#8220;stock&#8221; version of Red Hat Enterprise Linux 5.8.  I used mpicc to compile the application and got the following error:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ mpicc hello_world_mpi.c <span style="color: #660033;">-o</span> hello_world
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ld: cannot <span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-lnuma</span></pre></td></tr></table></div>

<p><span id="more-1157"></span><br />
This was rather surprising, since this node mounts a directory via NFS that contains OpenMPI and Intel Composer 2013, and these applications are known to work on other nodes. To find the source of the problem, I used the <strong>showme</strong> option to see the command that is actually run by mpicc:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ mpicc hello_world_mpi.c <span style="color: #660033;">-o</span> hello_world <span style="color: #660033;">--showme</span>
icc hello_world_mpi.c <span style="color: #660033;">-o</span> hello_world -I<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>openmpi<span style="color: #000000; font-weight: bold;">/</span>openmpi-1.6.2-intel-composer-<span style="color: #000000;">2013</span><span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-pthread</span> -L<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>openmpi<span style="color: #000000; font-weight: bold;">/</span>openmpi-1.6.2-intel-composer-<span style="color: #000000;">2013</span><span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lmpi</span> <span style="color: #660033;">-ldl</span> <span style="color: #660033;">-lm</span> <span style="color: #660033;">-lnuma</span> -Wl,--export-dynamic <span style="color: #660033;">-lrt</span> <span style="color: #660033;">-lnsl</span> <span style="color: #660033;">-lutil</span></pre></td></tr></table></div>

<p>The output was identical to the output on the other nodes&#8230;so why was this node failing to find libnuma?  It turned out that OpenMPI looks for a library called libnuma.so, while RHEL only includes a library called libnuma.so.1, and it is missing a symbolic link that points libnuma.so to libnuma.so.1.  The solution is to create the symbolic link:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma.so.1 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma.so
$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma<span style="color: #000000; font-weight: bold;">*</span>
lrwxrwxrwx <span style="color: #000000;">1</span> root root    <span style="color: #000000;">23</span> Feb <span style="color: #000000;">20</span> <span style="color: #000000;">17</span>:<span style="color: #000000;">37</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma.so -<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma.so.1
<span style="color: #660033;">-rwxr-xr-x</span> <span style="color: #000000;">1</span> root root <span style="color: #000000;">22032</span> May <span style="color: #000000;">17</span>  <span style="color: #000000;">2011</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib64<span style="color: #000000; font-weight: bold;">/</span>libnuma.so.1</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/02/openmpi-on-redhat-5-cannot-find-lnuma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pickle, hickle and HDF5</title>
		<link>http://www.shocksolution.com/2013/02/pickle-hickle-and-hdf5/</link>
		<comments>http://www.shocksolution.com/2013/02/pickle-hickle-and-hdf5/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 19:33:57 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1149</guid>
		<description><![CDATA[Danny Price recently left a comment to let me know about a new Python package he&#8217;s developing called hickle. The goal of &#8220;hickle&#8221; is to create a module that works like Python&#8217;s pickle module but stores its data in the HDF5 binary file format. This is a promising approach, because I advocate storing binary data [...]]]></description>
				<content:encoded><![CDATA[<p><a title="Danny Price" href="http://www.thetelegraphic.com/" target="_blank">Danny Price</a> recently left a comment to let me know about a new Python package he&#8217;s developing called <a title="hickle" href="https://github.com/telegraphic/hickle" target="_blank">hickle</a>. The goal of &#8220;hickle&#8221; is to create a module that works like Python&#8217;s <a title="Pickle" href="http://docs.python.org/2/library/pickle.html" target="_blank">pickle</a> module but stores its data in the <a title="HDF5 Project" href="http://www.hdfgroup.org/HDF5/" target="_blank">HDF5</a> binary file format. This is a promising approach, because I advocate storing binary data in HDF5 files whenever possible instead of creating yet another one-off binary file format that nobody will be able to read in ten years. The immediate advantage of using HDF5 to store picked Python objects is that HDF5 files are portable across many platforms, while &#8220;pickled&#8221; objects may not be readable on a different platform.<span id="more-1149"></span></p>
<p>The hickle developers have made a good start, and they have a long way to go before hickle will be useful to a wider audience. Right now, hickle can only store NumPy ndarrays and Python list objects. If you only need to store lists and arrays, you might as well use HDF5 bindings for Python such as <a title="PyTables" href="http://www.pytables.org/moin" target="_blank">PyTables</a> or <a title="HDF5 for Python" href="http://www.h5py.org/" target="_blank">h5py</a>. The power of the pickle module is that you can immediately serialize almost any Python object of arbitrary complexity, store it on disk, and retrieve it. hickle will only achieve its full potential once it replicates this functionality, and I&#8217;m not sure how difficult this will be. Ideally, you might be able to derive a class from Pickler that uses Picker&#8217;s methods to serialize an object, and then add your own method to write the serialized object to an HDF5 file.</p>
<p>In a future post, I&#8217;ll describe some of the practical problems with using pickle files to store data, and try to organize some thoughts about how they might be solved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/02/pickle-hickle-and-hdf5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building NumPy and SciPy with Intel Composer 2013 and the MKL</title>
		<link>http://www.shocksolution.com/2013/01/building-numpy-and-scipy-with-intel-composer-2013-and-the-mkl/</link>
		<comments>http://www.shocksolution.com/2013/01/building-numpy-and-scipy-with-intel-composer-2013-and-the-mkl/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 22:29:19 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scientific computing]]></category>

		<guid isPermaLink="false">http://www.shocksolution.com/?p=1120</guid>
		<description><![CDATA[Since Python is widely used as a high-productivity language for scientific computing, Intel has created a page showing how to build NumPy with Intel compilers and the Math Kernel Library (MKL). I would like to clarify a few items regarding building NumPy on a 64-bit Red Hat Enterprise Linux 5.4 system. Since this is a [...]]]></description>
				<content:encoded><![CDATA[<p>Since Python is widely used as a high-productivity language for scientific computing, <a title="Intel: building NumPy with Intel compilers and MKL" href="http://software.intel.com/en-us/articles/numpy-scipy-with-mkl" target="_blank">Intel has created a page showing how to build NumPy with Intel compilers and the Math Kernel Library (MKL)</a>. I would like to clarify a few items regarding building NumPy on a 64-bit Red Hat Enterprise Linux 5.4 system. Since this is a production system, I don&#8217;t want to replace the Python 2.4 binary -2.7.3-intel-composer-2013that ships with RHEL 5.4. Instead, I created a directory called</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>-2.7.3-intel-composer-<span style="color: #000000;">2013</span></pre></td></tr></table></div>

<p>and set</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PYTHONPATH</span>=<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>python-2.7.3-intel-composer-<span style="color: #000000;">2013</span>
<span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>python-2.7.3-intel-composer-<span style="color: #000000;">2013</span><span style="color: #000000; font-weight: bold;">/</span>lib:<span style="color: #007800;">$LD_LIBRARY_PATH</span></pre></td></tr></table></div>

<p><span id="more-1120"></span><br />
<h1>NumPy</h1>
<p>The Intel guide is a good starting point for building NumPy. The modifications that Intel suggests for the file <b>site.cfg</b> also with Composer 2013. However, you also have to modify several Python files in the distribution, and this is where the guide gets confusing. You need to edit the class of the file that corresponds to the command-line flags you will use to build NumPy.  For example, if you have a 64-bit system (<em>not an Itanium</em>), you should modify the class IntelEM64TCCompiler to look like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># File numpy-1.6.2/numpy/distutils/intelccompiler.py</span>
<span style="color: #ff7700;font-weight:bold;">class</span> IntelEM64TCCompiler<span style="color: black;">&#40;</span>UnixCCompiler<span style="color: black;">&#41;</span>:
    <span style="color: #483d8b;">&quot;&quot;&quot; A modified Intel x86_64 compiler compatible with a 64bit gcc built Python.
    &quot;&quot;&quot;</span>
    compiler_type <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'intelem'</span>
    cc_exe <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'icc -m64 -fPIC'</span>
    cc_args <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;-fPIC&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span> <span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: #66cc66;">,</span> verbose<span style="color: #66cc66;">=</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span> dry_run<span style="color: #66cc66;">=</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span> force<span style="color: #66cc66;">=</span><span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
        UnixCCompiler.<span style="color: #0000cd;">__init__</span> <span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: #66cc66;">,</span> verbose<span style="color: #66cc66;">,</span>dry_run<span style="color: #66cc66;">,</span> force<span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">cc_exe</span> <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'icc -m64 -O3 -g -fPIC -fp-model strict -fomit-frame-pointer -openmp -xhost'</span>
        <span style="color: #dc143c;">compiler</span> <span style="color: #66cc66;">=</span> <span style="color: #008000;">self</span>.<span style="color: black;">cc_exe</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">set_executables</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">compiler</span><span style="color: #66cc66;">=</span><span style="color: #dc143c;">compiler</span><span style="color: #66cc66;">,</span>
                             compiler_so<span style="color: #66cc66;">=</span><span style="color: #dc143c;">compiler</span><span style="color: #66cc66;">,</span>
                             compiler_cxx<span style="color: #66cc66;">=</span><span style="color: #dc143c;">compiler</span><span style="color: #66cc66;">,</span>
                             linker_exe<span style="color: #66cc66;">=</span><span style="color: #dc143c;">compiler</span><span style="color: #66cc66;">,</span>
                             linker_so<span style="color: #66cc66;">=</span><span style="color: #dc143c;">compiler</span> + <span style="color: #483d8b;">' -shared'</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>You also need to modify the compiler script for Intel Fortran. Once again, the modifications below are for a 64-bit system.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># numpy-1.6.2/numpy/distutils/fcompiler/intel.py</span>
<span style="color: #ff7700;font-weight:bold;">class</span> IntelEM64TFCompiler<span style="color: black;">&#40;</span>IntelFCompiler<span style="color: black;">&#41;</span>:
    compiler_type <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'intelem'</span>
    compiler_aliases <span style="color: #66cc66;">=</span> <span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    description <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">'Intel Fortran Compiler for 64-bit apps'</span>
&nbsp;
    version_match <span style="color: #66cc66;">=</span> intel_version_match<span style="color: black;">&#40;</span><span style="color: #483d8b;">'EM64T-based|Intel<span style="color: #000099; font-weight: bold;">\\</span>(R<span style="color: #000099; font-weight: bold;">\\</span>) 64|64|IA-64|64-bit'</span><span style="color: black;">&#41;</span>
&nbsp;
    possible_executables <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'ifort'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'efort'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'efc'</span><span style="color: black;">&#93;</span>
&nbsp;
    executables <span style="color: #66cc66;">=</span> <span style="color: black;">&#123;</span>
        <span style="color: #483d8b;">'version_cmd'</span>  : <span style="color: #008000;">None</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'compiler_f77'</span> : <span style="color: black;">&#91;</span><span style="color: #008000;">None</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-FI&quot;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-w90&quot;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-w95&quot;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'compiler_fix'</span> : <span style="color: black;">&#91;</span><span style="color: #008000;">None</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-FI&quot;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'compiler_f90'</span> : <span style="color: black;">&#91;</span><span style="color: #008000;">None</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'linker_so'</span>    : <span style="color: black;">&#91;</span><span style="color: #483d8b;">'&lt;F90&gt;'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-shared&quot;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'archiver'</span>     : <span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;ar&quot;</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">&quot;-cr&quot;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span>
        <span style="color: #483d8b;">'ranlib'</span>       : <span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;ranlib&quot;</span><span style="color: black;">&#93;</span>
        <span style="color: black;">&#125;</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> get_flags_arch<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        opt <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'-O3'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'-openmp'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'-fp-model strict'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'-fPIC'</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> cpu.<span style="color: black;">is_PentiumIV</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> cpu.<span style="color: black;">is_Xeon</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
            opt.<span style="color: black;">extend</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'-tpp7'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'-xW'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> opt</pre></td></tr></table></div>

<p>After making these modifications, run the commands:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">python setup.py config <span style="color: #660033;">--compiler</span>=intelem <span style="color: #660033;">--fcompiler</span>=intelem
python setup.py build <span style="color: #660033;">--compiler</span>=intelem <span style="color: #660033;">--fcompiler</span>=intelem
python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>The way I have my system configured, the packages were automatically installed into</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>python<span style="color: #000000; font-weight: bold;">/</span>python-2.7.3-intel-composer-<span style="color: #000000;">2013</span><span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>python2.7<span style="color: #000000; font-weight: bold;">/</span>site-packages</pre></td></tr></table></div>

<h1>SciPy</h1>
<p>Once you have built NumPy, SciPy is easily built because it uses the site.cfg file from NumPy:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">python setup.py config <span style="color: #660033;">--compiler</span>=intelem <span style="color: #660033;">--fcompiler</span>=intelem
python setup.py build <span style="color: #660033;">--compiler</span>=intelem <span style="color: #660033;">--fcompiler</span>=intelem
python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<p>Warnings about <a href="http://www.cise.ufl.edu/research/sparse/umfpack/" title="UMFPACK" target="_blank">umfpack</a> can be safely ignored if you don&#8217;t have umfpack installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shocksolution.com/2013/01/building-numpy-and-scipy-with-intel-composer-2013-and-the-mkl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
