Repository navigation
Closed
Description
MPAS-Analysis will occasionally fail on compy when /tmp fills up. When I contacted support, they recommended not using /tmp:
Glaesemann, Kurt R commented:
You are safer avoiding /tmp, and using /scratch instead. Secondly that /tmp was extra tiny because of some crash logs.
Would it be possible to change MPAS-Analysis so that it doesn't use /tmp?
Here is the log from one of the failure
analysis task computeRegionMasks_EC30to60E2r2_antarcticRegions20200621 failed during run
Traceback (most recent call last):
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/site-packages/mpas_analysis/shared/analysis_task.py", line 329, in run
self.run_task()
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/site-packages/mpas_analysis/shared/regions/compute_region_masks_subtask.py", line 473, in run_task
showProgress=False, useMpasMaskCreator=self.useMpasMaskCreator)
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/site-packages/mpas_analysis/shared/regions/compute_region_masks_subtask.py", line 66, in compute_mpas_region_masks
logger=logger)
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/site-packages/mpas_tools/conversion.py", line 188, in mask
with TemporaryDirectory() as tempdir:
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/site-packages/backports/tempfile.py", line 53, in __init__
self.name = mkdtemp(suffix, prefix, dir)
File "/share/apps/E3SM/conda_envs/base/envs/e3sm_unified_1.3.1.1/lib/python3.7/tempfile.py", line 366, in mkdtemp
_os.mkdir(file, 0o700)
OSError: [Errno 28] No space left on device: '/tmp/tmpsaoco80k'
Metadata
Metadata
Assignees
Labels
No labels
Activity
chengzhuzhang commentedon Sep 3, 2020
Based on a recent conversation with @stephenprice, the issue that /tmp is filled also happened on a local LANL luster. The fix Steve had for MPAS-Analysis has been to set “export TEMPDIR=/some_other_place_w_plenty_of_space”, This gets set in the batch script for MPAS-A when submitting the job.
This may serve as a short-term solution.
rljacob commentedon Sep 3, 2020
An environment variable set by user is actually the right solution to this.
maltrud commentedon Sep 3, 2020
this is actually a problem i've had for quite a while. the default temp space for NCO is /tmp. maybe we should have Charlie change that?
rljacob commentedon Sep 3, 2020
TMPDIR is the unix/posix standard for where to find temporary disk space. If its set to /tmp but should be something else, that is first the responsibility of the sysadmin to change and then the user. Not the program.
rljacob commentedon Sep 3, 2020
On the other hand, if NCO and MPAS-analysis are using really large amounts of TMPDIR, 10's to 100's of GB, then its not reasonable to expect TMPDIR to have the space. In that case, I think the default behavior should be to use a MPAS_ANALYSIS_TMPDIR variable which the user has to set. If its not set, use $HOME/tmp.
golaz commentedon Sep 3, 2020
Interesting, there is a lot more to it than I expected.
It might be too much to expect that users of software within E3SM Unified will be aware that they are expected to set TMPDIR in order to reliably run NCO or MPAS-Analysis on E#SM machines. Could a better default be set as part of loading the E3SM Unified environment?
maltrud commentedon Sep 3, 2020
@rljacob are you saying that TMPDIR should always be set by the system's default login settings since it is the standard? seems unlikely to get admins to do this.
and i may be wrong, but i think it is NCO within MPAS-Analysis that uses /tmp, not any of the analysis python stuff.
golaz commentedon Sep 3, 2020
I don't think it's only NCO. The failure above clearly arose within some python code. So I think it's both NCO and MPAS-Analysis, and maybe other utilities as well.
maltrud commentedon Sep 3, 2020
@golaz yeah i think you're right. thanks for pointing that out.
rljacob commentedon Sep 3, 2020
Yes TMPDIR will always be defined to something in any unix system. But since NCO and MPAS-An aren't your typical unix program, maybe they should have their own variable for that tmp directory. If you want machine-specific, user-proof defaults, you get in to the same config file situation as CIME. Better to to just have each user set it once per machine in their .bashrc
milenaveneziani commentedon Sep 3, 2020
From the log file, I gather it has to do with an MPAS-Tool routine that creates ocean region masks.
Defining an env variable seems like a good idea to me: maybe a best-practice recommendation to add to the MPAS-Analysis documentation.
golaz commentedon Sep 3, 2020
@rljacob,
echo $TMPDIRreturns an empty string on compy
rljacob commentedon Sep 4, 2020
Doh! I got that wrong. Nearly all unix systems will have a /tmp or /var/tmp directory. IF the system defines a TMPDIR to something, programs are supposed to honor that setting.
xylar commentedon Sep 4, 2020
@golaz, thanks for bringing this up. I will fix this in the next release. It should be easy to just use the output directory as a temp directory.
Everyone else, thanks for the discussion. But I do think this issue is probably best resolved by MPAS-Analysis just not using
/tmpfor this purpose. It's easy enough to use a different directory.