Created
April 4, 2014 01:50
-
-
Save kwharrigan/9966545 to your computer and use it in GitHub Desktop.
Starcluster plugint to install dmtcp.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from starcluster.clustersetup import ClusterSetup | |
from starcluster.logger import log | |
class DMTCP(ClusterSetup): | |
def __init__(self, url, archive_file, install_hbict, hbict_url): | |
self.dmtcp_url = url | |
self.archive_file = archive_file | |
self.install_hbict = install_hbict | |
self.hbict_url = hbict_url | |
def run(self, nodes, master, user, user_shell, volumes): | |
for node in nodes: | |
# Optional install of hbict | |
if bool(self.install_hbict): | |
self._install_hbict(node) | |
log.info('Installing DMTCP on %s with url %s' % (node, | |
self.dmtcp_url)) | |
# Download the tar | |
node.ssh.execute('wget %s' % self.dmtcp_url) | |
# Untar | |
node.ssh.execute('tar -xf %s' % self.archive_file) | |
# Configure, make, make install | |
#cmd = 'cd %s && ./configure --enable-unique-checkpoint-filenames --enable-timing --enable-delta-compression && make && make install' | |
cmd = 'cd %s && ./configure --enable-run-as-root --enable-timing --enable-delta-compression && make && make install' | |
node.ssh.execute(cmd % 'dmtcp-2.1') | |
# Cleanup | |
node.ssh.execute('rm -rf dmtcp*') | |
def _install_hbict(self, node): | |
log.info('Installing hbict') | |
node.ssh.execute('wget %s' % self.hbict_url) | |
node.ssh.execute('tar -xf %s' % 'hbict-1.0.tar.gz') | |
cmd = 'cd hbict-1.0 && ./configure && make && make install' | |
node.ssh.execute(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment