[aspect-devel] mktemp failure

Eric Heien emheien at ucdavis.edu
Thu May 3 13:05:18 PDT 2012


I confirmed with TACC that this is correct.  Rather than fiddle with different possible locations, I changed the background writer to just write directly to the target file if there's a problem creating the temporary one.  It will give one warning the first time it does this.

I also changed the popen() to a direct call to mkstemp() and removed exception throws.  If there are unrecoverable errors, it will keep printing out error messages to the user.  The system call to "mv" is still there because it handles NFS semantics that require extra work with rename().

Let me know if these changes cause any problems.

-Eric

On May 3, 2012, at 11:24 AM, Eric Heien wrote:

> From my initial work, it appears that the location specified by $TMPDIR is in fact not accessible from all processes during a run, which was causing the problem.  I've emailed TACC to confirm this.  Instead, for scripts run on Lonestar (and probably other XSEDE machines) we should export TMPDIR=$SCRATCH in the submission script - this appears to fix the problem.
> 
> In any case I will rewrite the output function to gracefully handle this.  Also, I will remove exception throwing from this function since in a separate thread they will be uncaught and potentially cause the program to hang (as was happening with me).
> 
> -Eric
> 
> On May 3, 2012, at 8:25 AM, Timo Heister wrote:
> 
>>> Oh, right, that was the other requirement we had from Thomas: One can't
>>> assume that /tmp is the correct directory. The function we currently use
>>> automatically uses the environment variable that designates which
>>> directory to use (TMPDIR?).
>> 
>> Yes, it should be TMPDIR. At least this is the only variable like
>> that, that is set on my machine. :-)
>> 
>> -- 
>> Timo Heister
>> http://www.math.tamu.edu/~heister/
>> _______________________________________________
>> Aspect-devel mailing list
>> Aspect-devel at geodynamics.org
>> http://geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
> 
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel



More information about the Aspect-devel mailing list