Exemplo n.º 1
0
void
op_init ( int argc, char ** argv, int diags )
{
  op_init_core ( argc, argv, diags );

#if CUDART_VERSION < 3020
#error : "must be compiled using CUDA 3.2 or later"
#endif

#ifdef CUDA_NO_SM_13_DOUBLE_INTRINSICS
#warning : " *** no support for double precision arithmetic *** "
#endif

  cutilDeviceInit ( argc, argv );

//
// The following call is only made in the C version of OP2,
// as it causes memory trashing when called from Fortran.
// \warning add -DSET_CUDA_CACHE_CONFIG to compiling line
// for this file when implementing C OP2.
//

#ifdef SET_CUDA_CACHE_CONFIG
  cutilSafeCall ( cudaThreadSetCacheConfig ( cudaFuncCachePreferShared ) );
#endif

  printf ( "\n 16/48 L1/shared \n" );
}
Exemplo n.º 2
0
void op_init ( int argc, char ** argv, int diags )
{
    int flag = 0;
    MPI_Initialized(&flag);
    if(!flag)
    {
      MPI_Init(&argc, &argv);
    }
    op_init_core ( argc, argv, diags );
}
Exemplo n.º 3
0
void op_init ( int argc, char ** argv, int diags )
{
  int flag = 0;
  MPI_Initialized(&flag);
  if(!flag)
  {
    MPI_Init(&argc, &argv);
  }
  OP_MPI_WORLD = MPI_COMM_WORLD;
  OP_MPI_GLOBAL = MPI_COMM_WORLD;
  op_init_core ( argc, argv, diags );
}
Exemplo n.º 4
0
void op_mpi_init ( int argc, char ** argv, int diags, MPI_Fint global, MPI_Fint local )
{
  int flag = 0;
  MPI_Initialized(&flag);
  if(!flag)
  {
    printf("Error: MPI has to be initialized when calling op_mpi_init with communicators\n");
    exit(-1);
  }
  OP_MPI_WORLD = MPI_Comm_f2c(local);
  OP_MPI_GLOBAL = MPI_Comm_f2c(global);

  op_init_core ( argc, argv, diags );
}
Exemplo n.º 5
0
void op_init(int argc, char **argv, int diags){
  op_init_core(argc, argv, diags);
}