Skip to content

Commit

Permalink
Slurm: Simplified the multiple instances options.
Browse files Browse the repository at this point in the history
  • Loading branch information
nbigaouette committed Nov 23, 2012
1 parent 9b65d57 commit f4d6478
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sys-cluster/slurm/Manifest
@@ -1,7 +1,7 @@
AUX logrotate 360 SHA256 22a0e4bf21c9387f34245ec3cdd3a59512e377f6a0509451088b17e6c5201f89 SHA512 f6edceef15960accbe72ddd34ff34934fa46b6d647c83e0d3a512d2ddc1ae6c60352e377cfa5332fd5cd817689e23680f7384f1b27fc49677b2e671e1bfe86b9 WHIRLPOOL f210575af8ce123646e78c05980f1953b409e19e678221e4a17d97423fae6a9bd14a7ecc6cdb046102c3439d50718349063c01ef29f507500e3259f33b85e3e4
AUX slurm.confd 155 SHA256 bc1b32f7b3c4a2fb5d97ae227ff15d40da16c346c0eed33a7956ed780a1a0d96 SHA512 e4d21cdb6a427f0beaef0e157202308f9e86a41dea4532ee98b274a5979b5e82ec2ca4ca2996f6cb59045fd8b01e815aaad71673e2011cead788de3d879aa11f WHIRLPOOL c836f20aae1fc4619757fe0db935f22736cc73077d51792427c8c629248af1e35d5f0f8c54342e41f45729ae6cdbb2b7dad2bf4db0f0689c46656a5cfc652564
AUX slurm.confd 744 SHA256 4a2966da13e13b775ad8e12cec239349e492c4aff0c1bb8dbe27b139a1996331 SHA512 8ec408200fceaa21e43188898c0c922584989159dcde3667c4eb8f7c2f4dbf41e12576b0bf53acdb86f3f40e3737ceddfdccd2d6dbb1d852f0c262b30aa35861 WHIRLPOOL 5e9f65eb148b79c78eb9f5e57e8a98f0f74dc82a46fe0e44113fa61b0ad848b4721a27b6c7f445acc683ffa57c98d9ee1c6f143e28b451b0bdcdaf9c05e1e966
AUX slurmctld.initd 1851 SHA256 fdc64a6746c870b14f74989f1a8c581f2eacaf185e91507b86cab6628f27c257 SHA512 d2294f3d5b62cd0b3826a705c6d39b25f7332c3ca2a0ac54a2f781d9af45c29db08b6cd6c3507bef311ddcd0b5872ce8f9bb74fab769c507fecf419757d78d1d WHIRLPOOL d8c5629d38b7423df559bf2402325c5c1c57a44482e78bedf6cb4a5a071c47ab1b56b732763cafec8a3e266b3b7f75d4640e554bdd7cdb972875cc21152afccb
AUX slurmd.initd 2011 SHA256 b106586b96c4aecb9b2cfe6da06059c426bb543de1d7e773aa79a5919da6da57 SHA512 7c52c019cd6b93a5d35d41187af724eb6a8c02e3d8e2d0dc3a7d3ff629c6e282cf613ec0a6ca2184984ad42a64400b85b4664394452be049da932a65fa34ef9f WHIRLPOOL 2d9797d17ab9286d68d60f46ae49cb4eb1782592c53f265f88f9a55aa9311d511802c15b29943ef63703bc3e7a253b110359482ef8cafb0e94f58b04adae739b
AUX slurmd.initd 2597 SHA256 9c101a991dca77c92967ad9b2147fc3ba03c8b3db55eab40fdef7ea558713e7a SHA512 ec7fd200e7275277b26eb05c6e6bfc5baeeb99ca6683fe3a2dda5386710bf7d83ed31f84147230ebe774fd6eb719c6879de012f6274ee76a51cbd45555a02be4 WHIRLPOOL c083b11eb0023e9e9f61d6927d69c6829695a1b1cbefa09ff3110ad12b669ff1daef7d79c349670c0defa90e60ad659d6d653e662a6c9dce2f38422425cdc56c
AUX slurmdbd.initd 1730 SHA256 79a3e087d555eed4511fb5c4f36b2afbec1578f280d7307139feb21f4c5cf6a8 SHA512 8be316325b28dd359a124fb0bf8bd6cce423588025c8c452ed3b2eb6d0f3f8b1066306d9840fff6d5428ac441d5682f414c28786da9558a3bdf643dab9859c86 WHIRLPOOL f08879556f638f0d86080bcb839976613e76588ddd62dae793a46396ae9c2da059e0fb2ecec03055e8b0124b900444f79a56fd337a77befa962de855f51d1177
DIST slurm-2.2.7.tar.bz2 4454740 SHA256 8dfd8ec1b447caa1c8d83817a90414e19bc5b8cc9caf2c7ec4b6d2cb6bcd0a7e
DIST slurm-2.3.5.tar.bz2 5019657 SHA256 7eae0328c5ab957abf9975042675fe4ebb767c761614b9e23c5dd3ffd72dc492 SHA512 febfc12e0c53672b6d22d949ed0386cb3c06b0f4e76301db659022b1000828fa2976d7746925110c4c8c650e5efae5481d99a85a3f539ae2339306ec7eb7b5a7 WHIRLPOOL bbd2a48addd2feb415228a950f6854fbe35bcb61e057b272a6da2cd77a50505e9979c7d3b85ea64948f98f303a42417d6e52eb37091b3d82cd0500683ca76a10
Expand Down
14 changes: 13 additions & 1 deletion sys-cluster/slurm/files/slurm.confd
Expand Up @@ -3,4 +3,16 @@ SLURMCTLD_OPTIONS=""
SLURMDBD_OPTIONS=""
SLURMD_OPTIONS=""
SLURM_USE_MUNGE="0"
SLURM_USE_YPBIND="0"
SLURM_USE_YPBIND="0"

# Support for multiple instances of slurmd running on the same node.
# (requires 'multiple-slurmd' use flag enabled).
# Create a copy of /etc/init.d/slurmd to a different name (does not
# matter what) and add it to the run level.
# The following string will be appended to the PID and log files.
# Additionally, since this string is given as an argument to
# slurmd for the hostname, <hostname>${SLURMD_MULTIPLE_SECOND_NAME}
# must resolve to 127.0.0.1.
# For example, if the hostname is "node", then "node${SLURMD_MULTIPLE_SECOND_NAME}"
# must resolve.
SLURMD_MULTIPLE_SECOND_NAME="GPU"
24 changes: 21 additions & 3 deletions sys-cluster/slurm/files/slurmd.initd
Expand Up @@ -7,6 +7,20 @@ extra_commands="reload"

[[ -f /etc/conf.d/slurm ]] && . /etc/conf.d/slurm

hostname="`hostname`"

# To support multiple instances of slurmd on the same node,
# copy this init script to a different name and uncomment the
# following line:
#SLURMD_MULTIPLE_SECOND="1"

if [[ "${SLURMD_MULTIPLE_SECOND}" -eq 1 ]]; then
hostname="${hostname}${SLURMD_MULTIPLE_SECOND_NAME}"
filenames_extra_str="_${hostname}"
else
filenames_extra_str=""
fi

depend() {
local _need="net"
[[ ${SLURM_USE_MUNGE} -ne 0 ]] && _need="${_need} munged"
Expand Down Expand Up @@ -51,8 +65,12 @@ start() {
# See http://www.open-mpi.org/faq/?category=openfabrics
# and https://computing.llnl.gov/linux/slurm/faq.html#rlimit
ulimit -l unlimited
if [[ "${filenames_extra_str}" != "" ]]; then
# Add -N nodeGPU[2-16] as option
SLURMD_OPTS="${SLURMD_OPTS} -N ${hostname}"
fi
start-stop-daemon --start --quiet --background \
--pidfile /var/run/slurm/slurmd.pid \
--pidfile /var/run/slurm/slurmd${filenames_extra_str}.pid \
--user root \
--group root \
--exec /usr/sbin/slurmd -- ${SLURMD_OPTS}
Expand All @@ -61,12 +79,12 @@ start() {

stop() {
ebegin "Stopping slurm daemon"
start-stop-daemon --stop --pidfile /var/run/slurm/slurmd.pid
start-stop-daemon --stop --pidfile /var/run/slurm/slurmd${filenames_extra_str}.pid
eend $?
}

reload() {
ebegin "Reloading slurm daemon configuration"
start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmd.pid
start-stop-daemon --signal HUP --pidfile /var/run/slurm/slurmd${filenames_extra_str}.pid
eend $?
}

0 comments on commit f4d6478

Please sign in to comment.