Commit 0d16489c authored by Andrew McNab's avatar Andrew McNab
Browse files

Add README

parent e223fa63
......@@ -50,9 +50,9 @@ install: $(INSTALL_FILES)
cp mjf.sh mjf.csh \
$(RPM_BUILD_ROOT)/etc/profile.d
install-torque: $(INSTALL_FILES) install
mkdir -p $(RPM_BUILD_ROOT)/var/lib/torque/mom_priv \
mkdir -p $(RPM_BUILD_ROOT)/usr/bin \
torque-install: $(INSTALL_FILES) install
mkdir -p $(RPM_BUILD_ROOT)/var/lib/torque/mom_priv
mkdir -p $(RPM_BUILD_ROOT)/usr/bin
cp prologue.user epilogue.user \
$(RPM_BUILD_ROOT)/var/lib/torque/mom_priv
cp mjf-get-total-cpu.torque \
......@@ -67,7 +67,7 @@ torque-rpm: mjf-scripts.tgz
--define "_topdir $(shell pwd)/RPMTMP" \
--buildroot $(shell pwd)/RPMTMP/BUILDROOT mjf-torque.spec
install-htcondor: $(INSTALL_FILES) install
htcondor-install: $(INSTALL_FILES) install
htcondor-rpm: mjf-scripts.tgz
rm -Rf RPMTMP
......
See https://twiki.cern.ch/twiki/bin/view/LCG/MachineJobFeaturesImplementations
for more about the mjf-scripts implementations of Machine/Job Features
Sources are maintained at https://gitlab.cern.ch/machinejobfeatures/mjf-scripts
These files can either be used directly, or the torque-rpm and htcondor-rpm
Makefile targets can be used to build RPMs for SL 6.x.
Torque/PBS
----------
Pre-builts RPMs are available at
https://repo.gridpp.ac.uk/machinejobfeatures/mjf-scripts/
To use the RPMs, just install the RPM and the /etc/rc.d/init.d/mjf script
is run to create /etc/machinefeatures/ and
/var/lib/torque/mom_priv/prologue.user which is run by Torque at the start of
each job to create a jobfeatures-$PBS_JOBID in the user’s home directory.
/var/lib/torque/mom_priv/epilogue.user runs at the end of the job to clean up
that directory. There are mjf.sh and mjf.csh scripts created in /etc/profile.d
which define $MACHINEFEATURES and $JOBFEATURES for the job itself to use.
If you know the HS06 of each worker node, you can also create
/etc/sysconfig/mjf with a line like hs06=99.99 which will be picked up
when populating /etc/machinefeatures/ (you can force updates after
changing that file with service mjf start as the mjf script looks like a
SysV service.) This is then used to create $MACHINEFEATURES/hs06 for the
whole WN and $JOBFEATURES/hs06_job with the pro-rata HS06 for that job
based on the number of processors Torque has assigned it (the ppn number,
but it defaults to 1.)
When creating $MACHINEFEATURES/total_cpu, the scripts use the value
given in /etc/sysconfig/mjf (and/or the transient /var/run/mjf),
or if not available, the value obtained by running the pbsnodes command,
or if not available, the value obtained by counting Processor lines in
/proc/cpuinfo.
......@@ -19,7 +19,7 @@ Currently this only creates $MACHINEFEATURES!
%build
%install
make install-htcondor
make htcondor-install
%post
chkconfig mjf on
......
......@@ -19,7 +19,7 @@ MJF implementations following HSF-TN-2016-02
%build
%install
make install-torque
make torque-install
%post
chkconfig mjf on
......
......@@ -39,8 +39,8 @@ start() {
if [ "$total_cpu" == "" ] ; then
# If not explicitly configured then try to get it from the batch system
if [ -x /usr/bin/get-total-cpu ] ; then
$total_cpu=`/usr/bin/get-total-cpu`
if [ -x /usr/bin/mjf-get-total-cpu ] ; then
total_cpu=`/usr/bin/mjf-get-total-cpu`
fi
# If still not explicitly configured then it get from the OS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment