[aspect-devel] Writing output in parallel

Wolfgang Bangerth bangerth at math.tamu.edu
Tue Feb 28 09:02:07 PST 2012


> something like:
> 1. ln -s /a/local/tmp/filesystem output
> 2. run normally: mpirun ...
> 3. mv output/* /some/shared/filesystem/
>
> Thomas was thinking of doing step 3 concurrently with the code running
> (for example spawn a shell script after every visualization).

Thinking about this, isn't step 3 *after* the job is done creating the 
very same bottleneck we wanted to avoid? I.e., isn't doing it in the 
background the only real option?

Thomas, at least for this second scheme, what would you think if I 
modified the background_writer() function we currently have to the 
following:
..........................
void Visualization<dim>::background_writer (const std::string *filename,
                                        const std::string *file_contents)
{
   char *tmp_filename = tempnam(...)  // get name of a tmp file

   ...write data into tmp_filename...

   system ("mv tmp_filename filename");
}
..........................
Is this what you had in mind?

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