forked from clusterlib/clusterlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request clusterlib#17 from clusterlib/travis-slurm
Set up slurm for travis
- Loading branch information
Showing
5 changed files
with
202 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# This file is taken from the Pulsar project | ||
# (https://github.com/galaxyproject/pulsar) which is apache 2.0 | ||
# | ||
|
||
|
||
from socket import gethostname | ||
from string import Template | ||
from subprocess import call | ||
from getpass import getuser | ||
|
||
SLURM_CONFIG_TEMPLATE = ''' | ||
# slurm.conf file generated by configurator.html. | ||
# Put this file on all nodes of your cluster. | ||
# See the slurm.conf man page for more information. | ||
# | ||
ControlMachine=$hostname | ||
#ControlAddr= | ||
#BackupController= | ||
#BackupAddr= | ||
# | ||
AuthType=auth/munge | ||
CacheGroups=0 | ||
#CheckpointType=checkpoint/none | ||
CryptoType=crypto/munge | ||
MpiDefault=none | ||
#PluginDir= | ||
#PlugStackConfig= | ||
#PrivateData=jobs | ||
ProctrackType=proctrack/pgid | ||
#Prolog= | ||
#PrologSlurmctld= | ||
#PropagatePrioProcess=0 | ||
#PropagateResourceLimits= | ||
#PropagateResourceLimitsExcept= | ||
ReturnToService=1 | ||
#SallocDefaultCommand= | ||
SlurmctldPidFile=/var/run/slurmctld.pid | ||
SlurmctldPort=6817 | ||
SlurmdPidFile=/var/run/slurmd.pid | ||
SlurmdPort=6818 | ||
SlurmdSpoolDir=/tmp/slurmd | ||
SlurmUser=$user | ||
#SlurmdUser=root | ||
#SrunEpilog= | ||
#SrunProlog= | ||
StateSaveLocation=/tmp | ||
SwitchType=switch/none | ||
#TaskEpilog= | ||
TaskPlugin=task/none | ||
#TaskPluginParam= | ||
#TaskProlog= | ||
InactiveLimit=0 | ||
KillWait=30 | ||
MinJobAge=300 | ||
#OverTimeLimit=0 | ||
SlurmctldTimeout=120 | ||
SlurmdTimeout=300 | ||
#UnkillableStepTimeout=60 | ||
#VSizeFactor=0 | ||
Waittime=0 | ||
FastSchedule=2 | ||
SchedulerType=sched/backfill | ||
SchedulerPort=7321 | ||
SelectType=select/linear | ||
#SelectTypeParameters= | ||
AccountingStorageType=accounting_storage/none | ||
#AccountingStorageUser= | ||
AccountingStoreJobComment=YES | ||
ClusterName=cluster | ||
#DebugFlags= | ||
#JobCompHost= | ||
#JobCompLoc= | ||
#JobCompPass= | ||
#JobCompPort= | ||
JobCompType=jobcomp/none | ||
#JobCompUser= | ||
JobAcctGatherFrequency=30 | ||
JobAcctGatherType=jobacct_gather/none | ||
SlurmctldDebug=3 | ||
#SlurmctldLogFile= | ||
SlurmdDebug=3 | ||
#SlurmdLogFile= | ||
NodeName=$hostname CPUs=1 State=UNKNOWN RealMemory=5000 | ||
PartitionName=debug Nodes=$hostname Default=YES MaxTime=INFINITE State=UP | ||
''' | ||
|
||
|
||
def main(): | ||
template_params = {"hostname": gethostname(), "user": getuser()} | ||
config_contents = Template(SLURM_CONFIG_TEMPLATE).substitute(template_params) | ||
open("/etc/slurm-llnl/slurm.conf", "w").write(config_contents) | ||
call("slurmctld") | ||
call("slurmd") | ||
|
||
if __name__ == "__main__": | ||
main() |
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