#include "PLA.h"
#include "mpi.h"

void template_init( PLA_Template *template_pointer )
{
  int  me, nb;
  MPI_Comm comm;

  PLA_Base_comm( &comm );               /* extract PLAPACK base communicator */
  MPI_Comm_rank( comm, &me );                        /* get this node's rank */
                                               /* get template blocking size */
  if ( 0 == me ) {                 
    printf("Enter template blocking size (nb):\n");
    scanf("%d", &nb );
  }
                                         /* broadcast template blocking size */
  MPI_Bcast( &nb, 1, MPI_INT, 0, comm );
                                    /* create template (start indexing at 0) */
  PLA_Temp_create( nb, 0, template_pointer );
}

