Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
machinejobfeatures
mjf-scripts
Commits
0d16489c
Commit
0d16489c
authored
Mar 01, 2016
by
Andrew McNab
Browse files
Add README
parent
e223fa63
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
0d16489c
...
...
@@ -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
...
...
README
0 → 100644
View file @
0d16489c
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.
mjf-htcondor.spec
View file @
0d16489c
...
...
@@ -19,7 +19,7 @@ Currently this only creates $MACHINEFEATURES!
%build
%install
make
install-
htcondor
make htcondor
-install
%post
chkconfig mjf on
...
...
mjf-torque.spec
View file @
0d16489c
...
...
@@ -19,7 +19,7 @@ MJF implementations following HSF-TN-2016-02
%build
%install
make install
-torque
make
torque-
install
%post
chkconfig mjf on
...
...
mjf.init
View file @
0d16489c
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment