<?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"
	>

<channel>
	<title>code.edbaskerville.com</title>
	<atom:link href="http://code.edbaskerville.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.edbaskerville.com</link>
	<description>software development by ed baskerville</description>
	<pubDate>Fri, 06 Jul 2007 01:22:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>File transfer overview</title>
		<link>http://code.edbaskerville.com/2007/07/05/file-transfer-overview/</link>
		<comments>http://code.edbaskerville.com/2007/07/05/file-transfer-overview/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 23:30:47 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/07/05/file-transfer-overview/</guid>
		<description><![CDATA[GridSweeper&#8217;s file transfer mechanism is designed to allow transfer of input and output files in a grid system-independent way. In environments without a real IT infrastructure, such as my own ad-hoc Xgrid setup, a shared filesystem will not necessarily be available, so you need a way to stage and retrieve files.
The GridSweeper code is file [...]]]></description>
			<content:encoded><![CDATA[<p>GridSweeper&#8217;s file transfer mechanism is designed to allow transfer of input and output files in a grid system-independent way. In environments without a real IT infrastructure, such as my own ad-hoc Xgrid setup, a shared filesystem will not necessarily be available, so you need a way to stage and retrieve files.</p>
<p>The GridSweeper code is file transfer system-agnostic, providing a simple interface that can be implemented for a particular file transfer system (e.g., FTP, which is included as a working example). The interface requires just a few basic methods: <code>connect()</code>, <code>disconnect()</code>, <code>uploadFile</code>, <code>deleteFile</code>, <code>makeDirectory()</code>, <code>removeDirectory</code>, <code>list()</code>, and <code>isDirectory()</code>, which all do pretty much what you&#8217;d expect. There is no notion of a working directory, so all paths are relative to the implicit root of the file system. Particular file transfer systems can define custom properties to affect setup—e.g., the FTP system provides properties for setting the hostname, username/password, root directory (so the GridSweeper root need not be the same as the FTP server&#8217;s default working directory), etc.</p>
<p>Here&#8217;s how a GridSweeper run interacts with the file system:</p>
<ol>
<li>The experiment setup data includes a list of input files, mapping (absolute) paths on the local filesystem for the submit host to relative paths in the working directory of the running job. When the job is submitted, those files are copied into an input-file directory on the file transfer system, within the location <code>experimentName/submissionDate/submissionTime/input/</code>.</li>
<li>The experiment setup data also includes a list of output file paths, relative to the working directory of the running job. This list is part of the input data for a running GridSweeper job.</li>
<li>The GridSweeperRunner tool, which is the process actually executed by the grid system, begins the process by transferring any files in the input directory on the file transfer system into the working directory as specified. After the run is complete, it copies the specified output files back to the file transfer system to the location <code>experimentName/submissionDate/submissionTime/caseDir/filename</code>, where <code>caseDir</code> is a directory name representing the particular parameter settings for the run (&#8221;b=0.1-g=25&#8243;). If the filename includes the wildcard <code>$gs_rn_ph$</code>, that will be replaced by the current run number. If it does not, the run number will be appended as an extension (<code>filename.runNumber</code>).</li>
<li>When each run is complete, the submit host, which is monitoring the activity, retrieves files back to the local experiments directory. If the submit host stopped monitoring, there should be a way to go back and retrieve files not yet retrieved; I haven&#8217;t designed this mechanism yet.</li>
</ol>
<p>Note: as of 4:30 PM, July 5, 2007, this is not all implemented correctly.</p>
<p>Thought: it&#8217;s possible, though unlikely, that file transfer system collisions may occur from multiple people submitting identically-named experiments at the same time. I can imagine a lab class with people following the same tutorial instructions all submitting identically-named jobs at the same time. So maybe it&#8217;s better to name these directories with unique hashes. Assuming no collisions, though, it doesn&#8217;t matter from the user perspective, so this can be changed later; the current naming scheme is nice for debugging.</p>
<p>If you have a shared filesystem, of course, none of this is necessary!</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/07/05/file-transfer-overview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Preliminary Javadoc completed</title>
		<link>http://code.edbaskerville.com/2007/06/25/preliminary-javadoc-completed/</link>
		<comments>http://code.edbaskerville.com/2007/06/25/preliminary-javadoc-completed/#comments</comments>
		<pubDate>Mon, 25 Jun 2007 08:02:53 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/25/preliminary-javadoc-completed/</guid>
		<description><![CDATA[Between driving from San Francisco and selling furniture on Craigslist, this weekend I wrote preliminary Javadoc for all of last summer&#8217;s GridSweeper work. A very valuable exercise before diving into coding: it made me look through every single method I wrote and say something about it. It also brought a number of design flaws to [...]]]></description>
			<content:encoded><![CDATA[<p>Between driving from San Francisco and selling furniture on Craigslist, this weekend I wrote preliminary Javadoc for all of last summer&#8217;s GridSweeper work. A very valuable exercise before diving into coding: it made me look through every single method I wrote and say something about it. It also brought a number of design flaws to my attention, duly noted in TODO comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/25/preliminary-javadoc-completed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>High-level GridSweeper execution overview</title>
		<link>http://code.edbaskerville.com/2007/06/21/high-level-gridsweeper-execution-overview/</link>
		<comments>http://code.edbaskerville.com/2007/06/21/high-level-gridsweeper-execution-overview/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 01:01:45 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/21/high-level-gridsweeper-execution-overview/</guid>
		<description><![CDATA[The purpose of GridSweeper is to take a simple user-provided description of what parameter settings to run a model with, run the model on a grid, and return results to the user.
The user will be able to manipulate the parameter-sweep description in three ways: (1) using an XML specification file, (2) with command-line arguments, and [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of GridSweeper is to take a simple user-provided description of what parameter settings to run a model with, run the model on a grid, and return results to the user.</p>
<p>The user will be able to manipulate the parameter-sweep description in three ways: (1) using an XML specification file, (2) with command-line arguments, and (3) with a graphical user interface. These three mechanisms can be mixed: command-line arguments can augment or override XML as well as be saved back out to XML, and the GUI tool will serve to edit and save XML files as well.</p>
<p>Ultimately, user action will result in running the GridSweeper program, which turns parameter sweep specifications into job specifications for the grid system via DRMAA. Specifically, the program does the following:</p>
<ol>
<li>Parses the XML specification and command-line arguments to generate an <code>Experiment</code> object.</li>
<li>Generates a list of <code>ExperimentCase</code> objects (parameter value settings) from the <code>Experiment</code> class.</li>
<li>Sets up an output directory for the files generated by this experiment. If a shared filesystem is not present, this can be done via FTP or other file-transfer mechanism supported by a plugin implementing a subclass of <code>FileTransferSystem</code>.</li>
<li>Starts a DRMAA session and submits a job for each experiment case, using an archived <code>RunSetup</code> object for each job&#8217;s standard input.</li>
<li>Still unimplemented: monitors the results of jobs and reports status changes to the user.</li>
</ol>
<p>The way things are set up now, GridSweeper requires support on both the submission end and the execution end of the grid. The DRMAA job specification specifies that the execution host run not the model itself, but the <code>GridSweeperRunner</code> program, which takes input data and uses that to actually run the model. Specifically, it does the following:</p>
<ol>
<li>Unarchives the <code>RunSetup</code> object from standard input.</li>
<li>If necessary, downloads input files via the file transfer mechanism.</li>
<li>Actually runs the model using an instance of the <code>Adapter</code> class specified by the user (explicitly, or implicitly by using, e.g., <code>gdrone</code> for the Drone compatibility adapter). The <code>Adapter</code> object knows how to take a set of parameters and send it to a particular type of model executable.</li>
<li>If necessary, uploads output files via the file transfer mechanism.</li>
</ol>
<p>One problem with this mechanism is that it submits a <em>separate job</em> for every experiment case, bypassing DRMAA&#8217;s notion of batch jobs. DRMAA batch jobs let you submit a whole bunch of jobs at the same time by specifying that each job is the same except for an integer specifier, and that specifier can be used as a variable in command-line arguments. Because some systems may be faster at accepting batch jobs than a pile of individual jobs, it might be worth using the batch job mechanism.</p>
<p>One way to do this would be to defer the calculation of parameter assignments and random seeds to the execution host, but that makes it impossible to generate a file for reproducing the experiment as soon as it is submitted. A better way is to generate a series of input files in the experiment directory, named with the batch run index, and have the GridSweeperRunner tool read those files at runtime rather than reading an object from standard input.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/21/high-level-gridsweeper-execution-overview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GridSweeper installation hierarchy</title>
		<link>http://code.edbaskerville.com/2007/06/21/gridsweeper-installation-hierarchy/</link>
		<comments>http://code.edbaskerville.com/2007/06/21/gridsweeper-installation-hierarchy/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 23:57:07 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/21/gridsweeper-installation-hierarchy/</guid>
		<description><![CDATA[As currently conceived, GridSweeper will consist of a set of Java classes in JAR files, additional Java classes as plugins (plugin format to be determined, but will include a JAR file), and shell scripts to simplify this:

java -cp ${GRIDSWEEPER_ROOT}/classes/GridSweeper.jar \\
    com.edbaskerville.gridsweeper.GridSweeper [args]

into this:

gsweep [args]

The top level of the hierarchy will be designated [...]]]></description>
			<content:encoded><![CDATA[<p>As currently conceived, GridSweeper will consist of a set of Java classes in JAR files, additional Java classes as plugins (plugin format to be determined, but will include a JAR file), and shell scripts to simplify this:</p>
<pre>
java -cp ${GRIDSWEEPER_ROOT}/classes/GridSweeper.jar \\
    com.edbaskerville.gridsweeper.GridSweeper [args]
</pre>
<p>into this:</p>
<pre>
gsweep [args]
</pre>
<p>The top level of the hierarchy will be designated by the environment variable $GRIDSWEEPER_ROOT, within which the following tree will exist:</p>
<pre>
$GRIDSWEEPER_ROOT/
    bin/
        gsweep
            (main GridSweeper submission executable)
        gdrone
            (shortcut to gsweep -a com.edbaskerville.gridsweeper.DroneAdapter)
        grunner
            (wrapper to actually execute jobs on the agent machine)
        ...
            (other scripts to shortcut, e.g., the Repast adapter)
    classes/
        classes.jar
            (all classes except those with main methods)
        GridSweeper.jar
            (app/tool class)
        GridSweeperRunner.jar
            (class to actually run simulations on agents)
    plugins/
        (contains add-on adapters and file-transfer systems)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/21/gridsweeper-installation-hierarchy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up the GridSweeper build environment</title>
		<link>http://code.edbaskerville.com/2007/06/21/setting-up-the-gridsweeper-build-environment/</link>
		<comments>http://code.edbaskerville.com/2007/06/21/setting-up-the-gridsweeper-build-environment/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 23:28:58 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/21/setting-up-the-gridsweeper-build-environment/</guid>
		<description><![CDATA[First things first: this post covers how to get the GridSweeper build environment set up on your machine. I&#8217;ve developed GridSweeper entirely with Eclipse, but the build process uses Ant, so it can be run from the command line as well (or, theoretically, any other Ant-compatible IDE).
To get GridSweeper building on your machine, you&#8217;ll need [...]]]></description>
			<content:encoded><![CDATA[<p>First things first: this post covers how to get the GridSweeper build environment set up on your machine. I&#8217;ve developed GridSweeper entirely with Eclipse, but the build process uses Ant, so it can be run from the command line as well (or, theoretically, any other Ant-compatible IDE).</p>
<p>To get GridSweeper building on your machine, you&#8217;ll need to get <s>three</s>four things:</p>
<ol>
<li>The code distribution (trunk), checked out into your Eclipse workspace. Soon to be hosted at CSCS.</li>
<li>An implementation of the Java Distributed Resource Management Application API (DRMAA). For CSCS/Linux, you should use the one provided by the Sun Grid Engine (in <code>/appl/sge/drmaa.jar</code> on CSCS machines). For building on my Mac, I&#8217;m using my XgridDRMAA implementation.</li>
<li><a href="http://jakarta.apache.org/commons/net/">Jakarta Commons Net</a> (<a href="http://jakarta.apache.org/site/downloads/downloads_commons-net.cgi">download page</a>). This is for FTP file transfer, which won&#8217;t actually be relevant for CSCS—maybe I can modify the build system to make this optional.</li>
<li><a href="http://jakarta.apache.org/oro/index.html">Jakarta ORO</a> (<a href="http://jakarta.apache.org/site/downloads/downloads_oro.cgi">download page</a>), also for FTP. You won&#8217;t even realize you&#8217;re missing this until you get an obscure class not found error at runtime when using any of the FTP directory methods.</li>
</ol>
<p>If you&#8217;re using Eclipse (recommended), open up the project in your workspace. Add the DRMAA and Jakarta Commons Net jar files (Project > Properties > Java Build Path > Add External JARs&#8230;), and, in theory, the project should build.</p>
<p>Next: evaluating the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/21/setting-up-the-gridsweeper-build-environment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GridSweeper code review</title>
		<link>http://code.edbaskerville.com/2007/06/21/gridsweeper-code-review/</link>
		<comments>http://code.edbaskerville.com/2007/06/21/gridsweeper-code-review/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 22:53:27 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/21/gridsweeper-code-review/</guid>
		<description><![CDATA[I&#8217;m beginning this year&#8217;s GridSweeper development by picking up all the pieces from last summer, documenting them, and considering design changes, then getting down to the business of finishing up the implementation. The next few posts will cover what I find.
Once there&#8217;s a wiki hosted by CSCS, I&#8217;ll organize this information there.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m beginning this year&#8217;s GridSweeper development by picking up all the pieces from last summer, documenting them, and considering design changes, <em>then</em> getting down to the business of finishing up the implementation. The next few posts will cover what I find.</p>
<p>Once there&#8217;s a wiki hosted by CSCS, I&#8217;ll organize this information there.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/21/gridsweeper-code-review/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Report on git</title>
		<link>http://code.edbaskerville.com/2007/06/19/report-on-git/</link>
		<comments>http://code.edbaskerville.com/2007/06/19/report-on-git/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 06:12:21 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2007/06/19/report-on-git/</guid>
		<description><![CDATA[After seeing this video of Linus Torvalds waxing arrogant about git, the source code management system he wrote for Linux kernel development, I decided I should try it out.
The benefits of git over the CVS/Subversion model amount to this: (1) git is distributed, and (2) git is fast. (2) is partly a result of (1), [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing <a href="http://www.youtube.com/watch?v=4XpnKHJAok8">this video</a> of Linus Torvalds waxing arrogant about git, the source code management system he wrote for Linux kernel development, I decided I should try it out.</p>
<p>The benefits of git over the CVS/Subversion model amount to this: (1) git is distributed, and (2) git is fast. (2) is partly a result of (1), partly a result of Linus being a wizard programmer.</p>
<p>For git, &#8220;distributed&#8221; means that <em>every working directory is a full-fledged repository in its own right</em>. That is, there is no single repository that all developers check out of and commit into. Commits are done locally, into your own copy of the repository. Sharing is done only explicitly, so nobody can screw up your personal copy of the code with their code, and vice versa. Distribution also gets you a bunch of speed, because commits are simply written into your local filesystem. Beyond that, Linus used a lot of fancy impressive algorithms to make things generally fast.</p>
<p>I used <a href="http://www.finkproject.org/">Fink</a> to install git on my OS X machines (it&#8217;s in the unstable tree), and found that it works pretty much as advertised. The tutorial at <a href="http://www.kernel.org/pub/software/scm/git/docs/tutorial.html">kernel.org</a> is quite nice; below is a quick summary of the most important things I gleaned from it.</p>
<h3>Installation</h3>
<p>On Mac OS X, you need to install <a href="http://finkproject.org/">Fink</a> if you don&#8217;t have it. Then add <code>unstable/main</code> and <code>unstable/crypto</code> to <code>/sw/etc/fink.conf</code>, and then do</p>
<p><code>fink selfupdate; fink index; fink scanpackages</code></p>
<p>to activate the unstable trees.</p>
<p>Then do</p>
<p><code>fink install git</code></p>
<p>and type your admin password when it&#8217;s asked for.</p>
<p>On Linux, it&#8217;s probably just a matter of installing it from whatever package manager your distro has.</p>
<h3>User Configuration</h3>
<p>For the sake of the logs, you should first configure git to know your name and email address:</p>
<pre>
git config --global user.name "Ed Baskerville"
git config --global user.email notmyemailaddress@edbaskerville.com
</pre>
<h3>Creating a Repository</h3>
<p>To make a new repository from scratch and start working on it, you create the working directory and cd into it, create the repository inside, and then check out the empty main branch:</p>
<pre>
mkdir myproj
cd myproj
git-init
git-checkout
</pre>
<p>Notice I didn&#8217;t specify any arguments to init or checkout. Init assumes you want to create a repository called <code>.git</code> inside the current directory, and checkout assumes you want to check out code from <code>.git</code> into the current directory to begin working. So the standard directory structure is this:</p>
<pre>
myproj/ [the working directory]
    .git/ [the repository directory]
        ...
        [the git repository's internal state]
        ...
    ...
    [working source files]
    ...
</pre>
<h3>Cloning a Repository</h3>
<p>If there&#8217;s an existing repository that you want a copy of, you don&#8217;t check out a working copy as with CVS/Subversion. Rather, you clone it, making a copy of the complete repository for yourself. This works from a local file, via ssh, via http, or through <code>git-daemon</code>, which needs to be installed on the &#8220;server&#8221; machine. Examples:</p>
<pre>
git clone /local/path
git clone ssh://server.name/remote/path
git clone http://www.kernel.org/pub/scm/git/git.git
git clone git://git.sv.gnu.org/lilypond.git
</pre>
<h3>Making Changes</h3>
<p>Making and committing changes is pretty much just like CVS or Subversion: you edit or add files in your working directory, and then commit them, only your commits go into the local repository <code>.git</code> repository directory.</p>
<p>So you could create a file called myprogram.c:</p>
<pre>
echo I bet this won't compile > myprogram.c
git add myprogram.c
git commit
</pre>
<p>One catch is that you need to do a <code>git add</code> before a commit for all files that have <em>changed</em>, not just files that are new. You can get around this with the -a switch:</p>
<pre>
git commit -a
</pre>
<p>will first add any files that have changed to the commit (but not new files that have been created—they must be added explicitly) and then commit.</p>
<h3>Pulling and Pushing</h3>
<p>Source code management isn&#8217;t much use unless you can share your work. If somebody else has changes you want to merge into your copy of the repository, use <code>git pull</code>:</p>
<pre>
git-pull /path/to/repository
</pre>
<p>If you&#8217;re operating on a CVS/Subversion-like model with a central master repository, push can be used to put your changes into that repository:</p>
<pre>
git-push ssh://server.name/path/to/repository
</pre>
<h3>Branches</h3>
<p>I won&#8217;t spend time on branching, but one of the key reasons to use git is that branches are cheap and easy, so you can easily split off experimental branches to do things that might fail spectacularly. The <a href="http://www.kernel.org/pub/software/scm/git/docs/tutorial.html ">tutorial</a> has good information about all this.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2007/06/19/report-on-git/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XgridLite 1.0.2 Source Posted</title>
		<link>http://code.edbaskerville.com/2006/12/17/xgridlite-102-source-posted/</link>
		<comments>http://code.edbaskerville.com/2006/12/17/xgridlite-102-source-posted/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 00:54:39 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[Announcements]]></category>

		<category><![CDATA[XgridLite]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2006/12/17/xgridlite-102-source-posted/</guid>
		<description><![CDATA[Spurred by an increasing devotion to free information and free culture and because I don&#8217;t want to write an automatic license-generation engine, I&#8217;m releasing XgridLite under the GNU GPL. Code available via WebSVN or just via:
svn co http://code.edbaskerville.com/svn/xgridlite
]]></description>
			<content:encoded><![CDATA[<p>Spurred by an increasing devotion to free information and free culture and because I don&#8217;t want to write an automatic license-generation engine, I&#8217;m releasing XgridLite under the GNU GPL. Code available via <a href="http://code.edbaskerville.com/websvn/listing.php?repname=XgridLite">WebSVN</a> or just via:</p>
<p><code>svn co http://code.edbaskerville.com/svn/xgridlite</code></p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2006/12/17/xgridlite-102-source-posted/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GridSweeper getting there&#8230;</title>
		<link>http://code.edbaskerville.com/2006/10/28/gridsweeper-getting-there/</link>
		<comments>http://code.edbaskerville.com/2006/10/28/gridsweeper-getting-there/#comments</comments>
		<pubDate>Sat, 28 Oct 2006 10:08:44 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[GridSweeper]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2006/10/28/gridsweeper-getting-there/</guid>
		<description><![CDATA[Today, amidst a torrent of schoolwork and music, I got around to getting a little closer to a finished GridSweeper. (Sometimes it&#8217;s easiest to work on something when you&#8217;re using it to avoid working on something else.)
I worked through the fundamental problems of why neither Xgrid nor Sun Grid Engine wanted to run any of [...]]]></description>
			<content:encoded><![CDATA[<p>Today, amidst a torrent of schoolwork and music, I got around to getting a little closer to a finished GridSweeper. (Sometimes it&#8217;s easiest to work on something when you&#8217;re using it to avoid working on something else.)</p>
<p>I worked through the fundamental problems of why neither Xgrid nor Sun Grid Engine wanted to run any of the jobs I was giving it. Turned out to be mostly trivial things:</p>
<ul>
<li>On the CSCS machine with SGE installed, the wrong version of Java was being run to execute jobs. I hard-coded a fix for this; I need to put a check in the grunner shell script to support an optional GRIDSWEEPER_JAVA environment variable.</li>
<li>SGE doesn&#8217;t support the file-transfer mode attribute of DRMAA, so things were grinding to a halt because of that too. I just surrounded the line that set the file-transfer mode with a try/catch block; this is fine since SGE transfers all the files by default anyway. (I also changed the default behavior of XgridDRMAA to match SGE.)</li>
<li>I was trying to run jobs with XgridDRMAA from my home directory. But Xgrid jobs (with my non-fancy XgridLite setup) run as the user &#8220;nobody&#8221;, so it couldn&#8217;t access the executable. Solution: just set up a GridSweeper root directory where &#8220;nobody&#8221; can get to it. (I also added a line to XgridDRMAA to actually record the error returned by execve()&#8230;in case this happens again&#8230;)</li>
</ul>
<p>Ah, the joy of debugging. Anyway, GridSweeper now actually runs jobs, which is pretty cool. It doesn&#8217;t monitor the jobs, or correctly extract output data from the output files it produces, but that will be easy. (And won&#8217;t have any bugs, right?)</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2006/10/28/gridsweeper-getting-there/feed/</wfw:commentRss>
		</item>
		<item>
		<title>XgridDRMAA 0.1.1, With Examples</title>
		<link>http://code.edbaskerville.com/2006/08/22/xgriddrmaa-011-with-examples/</link>
		<comments>http://code.edbaskerville.com/2006/08/22/xgriddrmaa-011-with-examples/#comments</comments>
		<pubDate>Tue, 22 Aug 2006 10:01:50 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
		
		<category><![CDATA[Announcements]]></category>

		<category><![CDATA[XgridDRMAA]]></category>

		<guid isPermaLink="false">http://code.edbaskerville.com/2006/08/22/xgriddrmaa-011-with-examples/</guid>
		<description><![CDATA[I silently released XgridDRMAA 0.1 the other day; today I&#8217;m releasing XgridDRMAA 0.1.1 and announcing it to the appropriate mailing lists.
You can download it here:
http://code.edbaskerville.com/xgrid_drmaa/XgridDRMAA.dmg
I have now included simple example code in all three supported languages (C, Objective-C, Java). For people working in Mac-only environments, I highly recommend the Objective-C interface. If you want your [...]]]></description>
			<content:encoded><![CDATA[<p>I silently released XgridDRMAA 0.1 the other day; today I&#8217;m releasing XgridDRMAA 0.1.1 and announcing it to the appropriate mailing lists.</p>
<p>You can download it here:</p>
<p><a href="http://code.edbaskerville.com/xgrid_drmaa/XgridDRMAA.dmg">http://code.edbaskerville.com/xgrid_drmaa/XgridDRMAA.dmg</a></p>
<p>I have now included simple example code in all three supported languages (C, Objective-C, Java). For people working in Mac-only environments, I highly recommend the Objective-C interface. If you want your code to work with, e.g., Sun Grid Engine as well, the Java interface is convenient. If you&#8217;re attached to C, go ahead, but the API is a little cumbersome. All three languages use the Objective-C implementation at their core. (In the case of Java, there are actually two levels of wrapping: Java wraps C; C wraps Objective-C; this is so I could re-use Sun&#8217;s Java bindings for the Grid Engine.)</p>
<p>The code doesn&#8217;t take too much explanation, but here&#8217;s a basic outline of what it does:</p>
<ol>
<li>Obtain an object representing a DRMAA session (Objective-C and Java only).</li>
<li>Open the session.</li>
<li>Create a job template object describing various aspects of the job: in this case, it simply echoes a single number and writes stdout to the user&#8217;s desktop on the client machine.</li>
<li>Run a &#8220;bulk job&#8221;—that is, a job with a parameterized index—with an index running from 1 to 5. The corresponding sub-job simply echoes the parameterized index.</li>
<li>&#8220;Synchronize&#8221; all five jobs—wait for them all to complete.</li>
<li>Clean up memory (C and Java only).</li>
<li>Close the session and exit.</li>
</ol>
<p>Development work will be on hold for the next few weeks as I work on GridSweeper and travel around Europe, but please send along feedback for when I return to it in early September! For bug reports, please use the <a href="http://code.edbaskerville.com/mantis/">bug database</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.edbaskerville.com/2006/08/22/xgriddrmaa-011-with-examples/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
