next up previous contents index
Next: Using PAW and Up: Global sections and Previous: Using PAW as

Unix shared memory (Sun and DecStation only!)

 

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.   

CALL HLIMAP (NWORDS,CHNAME)

Action: The routine maps a file to a shared memory area.

Input parameters:
NWORDS
Number of words for the shared area.
If NWORDS=0 an existing shared memory is attached and becomes the current HBOOK directory. In this case HLIMIT must have been called previously.
CHNAME
Character variable (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 .



Last update: Tue May 16 09:09:27 METDST 1995