[aspect-devel] mktemp failure

Wolfgang Bangerth bangerth at math.tamu.edu
Wed May 2 14:36:50 PDT 2012


On 05/02/2012 03:56 PM, Eric Heien wrote:
> I'm trying to run Aspect on the Lonestar cluster at TACC.  It seems
> to work fine if I run a single process on the head node, but when I
> submit to multiple nodes I get the following error:
>
> *** Timestep 0:  t=0 seconds Solving temperature system... 15
> iterations. Rebuilding Stokes preconditioner... Solving Stokes
> system... 20 iterations.
>
> Postprocessing: mktemp: cannot create temp file
> /tmp/566558.1.development/tmp.qMtGl26621: No such file or directory
> mktemp: cannot create temp file
> /tmp/566558.1.development/tmp.lCiCl26628: No such file or directory
> mktemp: cannot create temp file
> /tmp/566558.1.development/tmp.oxSoo26625: No such file or directory
> mktemp: cannot create temp file
> /tmp/566558.1.development/tmp.yLbPF26629: No such file or directory
>
> I'm pretty sure this is caused by the temporary file creation in
> source/postprocess/visualization.cc (line 416).  When I directly call
> mktemp from the submission script it seems to work fine, so maybe the
> forked child process is not inheriting the correct permissions?  Does
> anyone have an idea why this would happen?

No :-(


> Also, is there a particular reason why Aspect forks a process to call
> mktemp instead of just calling mkstemp in the standard C library?

I was looking for a function that (i) isn't marked as "do not use, ever, 
since it is a security risk", (ii) does not create a race condition when 
running in parallel on the same machine. All functions that generate a 
file name but don't actually open the file violate (ii). Pretty much any 
other function violates (i). I think mkstemp could work (I don't know 
why I didn't find that). I'm not enough of a C programmer to know what 
it means that the function returns an 'int' -- is that the same as 
FILE*? And how do I convert it to a C++ std::ostream?

Best
  W.

------------------------------------------------------------------------
Wolfgang Bangerth               email:            bangerth at math.tamu.edu
                                 www: http://www.math.tamu.edu/~bangerth/



More information about the Aspect-devel mailing list