      program simple
      integer data, iam, result

#include <cm/cmmd_fort.h>

      implicit none

      integer result, iam
      integer itest, ichange
      integer nsize
	
      nsize = 16
      result =  cmmd_set_io_mode(6, cmmd_independent)
      iam = cmmd_self_address()
      
      itest = 1

      ichange = CMMD_reset_partition_size( nsize );

      if ((change .eq. new_size1) .and.
   (CMMD_self_address() .lt. new_size1)) {
   <code to be run in 32-node restricted partition>
   change = CMMD_reset_partition_size( original_size );
}
change = CMMD_reset_partition_size( new_size2 )

      print *, "PN ", iam, " Twice address =  ", data
      call flush(6)
      end

      
int original_size = CMMD_partition_size();
int new_size1 = 32; 
int new_size2 = 51; 
change = CMMD_reset_partition_size( new_size1 );
if ((change .eq. new_size1) &&
   (CMMD_self_address() .lt. new_size1)) {
   <code to be run in 32-node restricted partition>
   change = CMMD_reset_partition_size( original_size );
}
change = CMMD_reset_partition_size( new_size2 )
if ((change .eq. new_size2) &&
   (CMMD_self_address() .lt. new_size2)) {
   <code to be run in 51-node restricted partition>
   change = CMMD_reset_p