Interactive Background Processes

Ken Van Camp kvancamp at ardec.arpa
Sat Jul 2 06:22:05 AEST 1988


	When running large, computationally-intensive programs (such as
finite element codes, ray tracers, and other simulations), it is usually
desirable to run the program in the background so the user is free to
perform other tasks, logout, etc.  Unfortunately, under Unix, selecting
background processing precludes interactivity in the software.

	Interactive I/O in a long simulation is often desirable.  Typical 
uses may include: 

(1) Interrogation of the model, to determine the current state of 
    computation.  This may include a graphical interface.  

(2) Modification of the model "on the fly", including rezoning, dropping
    elements, changing a maximum or minimum simulation time or time step, 
    redefining materials, and many others.  

(3) Giving the user and/or system administrator the chance to prematurely
    abort a simulation without losing results.  Typically, if a system
    must be shut down while background processes are in progress, the
    simulation will be lost and will have to be restarted from scratch.
    Since many large simulation codes already possess the capability to
    write a restart file, it would make more sense to allow system
    administrators an easy way to alert all background processes of an
    imminent shutdown, so the program can shut itself down "gracefully".

	The purpose of this message is twofold: (1) I would like to hear 
from other programmers who have given thought to this problem, and possibly 
devised solutions; and (2) If you are interested in the subject but haven't 
given it much thought, you are welcome to try out my first attempt at a set 
of "generic" background I/O routines (callable from either C or Fortran).
I call my package "BGio", and you can get a copy of the shar file (complete 
with short working examples, about 50 Kbytes long) by sending e-mail to me.  
I have used BGio in EPIC-2, a finite element program for large-strain impact 
simulations.  It has also been tested on three different Unix systems: a 
Silicon Graphics Iris (System V), DEC 8600 (Ultrix), and an Integrated 
Solutions (4.3 BSD).  

                            --Ken  Van Camp 
ARPANET or BITNET:        kvancamp at ARDEC.ARPA
USENET:                uunet!ardec.arpa!kvancamp

                   I would understand life much better 
             if someone would just show me the source code.



More information about the Comp.unix.wizards mailing list