Previous Next Contents

3.2   Process management primitives











      program firstpvm 
      include 'fpvm3.h'
      integer nprocs, info, tids (0:20), mytid
      call pvmfmytid (mytid)
      call pvmfparent (tids(0))
      if (tids (0) .lt. 0) then
C***  In the master code ***
         tids(0) = mytid
         read (*,*), nprocs
         call pvmfspawn ('a.out', PVMTASKDEFAULT, 
    &                 '*', nproc-1, tids(1), numt)
         ....
      else
C***  In the slave code ***
         ....
      end if 
      call pvmfexit (info)
      end      







Previous Next Contents