On Unix systems, with the exception of HP-UX and SOLARIS, it is possible to communicate between processes using shared memory. In the histogram producer program, use routime HLIMAP instead of HLIMIT to initialize HBOOK. With PAW use the command global_sect to use shared memory.
Action: The routine maps a file to a shared memory area.
NWORDS=0
an existing
shared memory is attached and becomes
the current HBOOK directory.
In this case HLIMIT must have been called previously.
CHARACTER*4
) specifying the name
given to the shared area.
All histograms, Ntuples, etc. in this area have a structure
similar to the /PAWC/
common.
Example with pre-existing shared area
Program toy Parameter (nwpaw=100000) common/pawc/paw(nwpaw) call hlimit(nwpaw) * call hlimap(0,'TEST') * 1 read *,id call hrin(id,9999,0) call hprint(id) call hdelet(id) if(id.ne.0)go to 1 end
Note that HBOOK does not delete the shared memory when the job finishes, that reamins the user's responsability .