Home | Trees | Indices | Help |
|
---|
|
1 from starcluster.clustersetup import DefaultClusterSetup 2 from starcluster.logger import log 3 46 7 MPICH2_HOSTS = '/etc/mpich2.hosts' 8 MPICH2_PROFILE = '/etc/profile.d/mpich2.sh' 94911 mpich2_hosts = node.ssh.remote_file(self.MPICH2_HOSTS, 'w') 12 mpich2_hosts.write('\n'.join(aliases)) 13 mpich2_hosts.close() 14 mpich2_profile = node.ssh.remote_file(self.MPICH2_PROFILE, 'w') 15 mpich2_profile.write("export HYDRA_HOST_FILE=%s" % self.MPICH2_HOSTS)1618 mpi_choices = node.ssh.execute("update-alternatives --list mpi") 19 mpirun_choices = node.ssh.execute("update-alternatives --list mpirun") 20 mpipath = None 21 for choice in mpi_choices: 22 if 'mpich2' in choice: 23 mpipath = choice 24 break 25 mpirunpath = None 26 for choice in mpirun_choices: 27 if 'mpich2' in choice: 28 mpirunpath = choice 29 break 30 node.ssh.execute("update-alternatives --set mpi %s" % mpipath) 31 node.ssh.execute("update-alternatives --set mpirun %s" % mpirunpath)3234 aliases = map(lambda x: x.alias, nodes) 35 log.info("Setting up MPICH2 hosts file on all nodes") 36 for node in nodes: 37 self.pool.simple_job(self._configure_hosts_file, 38 (node, aliases), 39 jobid=node.alias) 40 self.pool.wait(len(nodes)) 41 log.info("Setting MPICH2 as default MPI on all nodes") 42 for node in nodes: 43 self.pool.simple_job(self._update_alternatives, (node), 44 jobid=node.alias) 45 self.pool.wait(len(nodes)) 46 log.info("MPICH2 is now ready to use") 47 log.info( 48 "Use mpicc, mpif90, mpirun, etc. to compile and run your MPI apps")
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jan 3 23:11:48 2012 | http://epydoc.sourceforge.net |