Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
bdffcd13
Commit
bdffcd13
authored
17 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
add information about env_cache_builder
parent
88b85e5a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/html/moab.shtml
+55
-1
55 additions, 1 deletion
doc/html/moab.shtml
with
55 additions
and
1 deletion
doc/html/moab.shtml
+
55
−
1
View file @
bdffcd13
...
@@ -175,8 +175,62 @@ CLIENTCFG[RM:slurm] KEY=123456789
...
@@ -175,8 +175,62 @@ CLIENTCFG[RM:slurm] KEY=123456789
</pre>
</pre>
<p>Insure that this file is protected from viewing by users. </p>
<p>Insure that this file is protected from viewing by users. </p>
<h3>User Environment</h3>
<p>When a user submits a job to Moab, that job could potentially
execute on a variety of computers, so it is typically necessary
that the user's environment on the execution host be loaded.
Moab relies upon SLURM to perform this action, using the
<i>--get-user-env</i> option for the salloc, sbatch and srun commands.
The SLURM command then executes as user root a command of this sort
as user root:
<pre>
/bin/su - <user> -c "/bin/echo BEGIN; /bin/env; /bin/echo FINI"
</pre>
While this command is executing within salloc, sbatch or srun,
the Moab daemon is completely non-responsive.
To insure that Moab remains operational, SLURM will abort the above
command within a few seconds and look for a cache file with the
user's environment and use that if found.
Otherwise an error is reported to Moab.
We have provided a simple program that can be used to build
cache files for users. The program can be found in the SLURM
distribution at <i>contribs/env_cache_builder.c</i>.
This program can support a longer timeout than Moab, but
will report errors for users for whom the environment file
can not be automatically build (typically due to the user's
"dot" files spawning another shell so the desired command
never execution).
For such user, you can manually build a cache file.
You may want to execute this program periodically to capture
information for new users or changes in existing users'
environment.
A sample execution is shown below.
Run this on the same host as the Moab daemon and execute it as user root.</p>
<pre>
bash-3.00# make -f /dev/null env_cache_builder
cc env_cache_builder.c -o env_cache_builder
bash-3.00# ./env_cache_builder
Building user environment cache files for Moab/Slurm.
This will take a while.
Processed 100 users...
***ERROR: Failed to get current user environment variables for alice
***ERROR: Failed to get current user environment variables for brian
Processed 200 users...
Processed 300 users...
***ERROR: Failed to get current user environment variables for christine
***ERROR: Failed to get current user environment variables for david
Some user environments could not be loaded.
Manually run 'env' for those 4 users.
Write the output to a file with the same name as the user in the
/usr/local/tmp/slurm/atlas/env_cache directory
</pre>
<p class="footer"><a href="#top">top</a></p>
<p class="footer"><a href="#top">top</a></p>
<p style="text-align:center;">Last modified 1
7 August
200
7
</p>
<p style="text-align:center;">Last modified 1
2 March
200
8
</p>
<!--#include virtual="footer.txt"-->
<!--#include virtual="footer.txt"-->
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment