コード例 #1
0
ファイル: setup.c プロジェクト: jcosborn/milc_qcd
int setup()   {
  int prompt;

  /* print banner, get volume */
  prompt=initial_set();
  if(prompt == 2)return prompt;

  /* initialize the node random number generator */
  initialize_prn( &node_prn, param.iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  /* Initialize fermion links as unallocated */
//  init_ferm_links(&fn_links, &ks_act_paths);
//  init_ferm_links(&fn_links_dmdu0, &ks_act_paths_dmdu0);
  /* set up nearest neighbor gathers */
  make_nn_gathers();
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  /* set up K-S phase vectors, boundary conditions */
  phaseset();
  return(prompt);
}
コード例 #2
0
ファイル: setup.c プロジェクト: erinaldi/milc_qcd
int
setup()
{
  int prompt;

  /* print banner, get volume, nflavors1,nflavors2, seed */
  prompt = initial_set();
  if(prompt == 2)return prompt;
  /* initialize the node random number generator */
  initialize_prn( &node_prn, iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  node0_printf("Made lattice\n"); fflush(stdout);
  /* Mark t_longlink and t_fatlink unallocted */
  // init_ferm_links(&fn_links, &ks_act_paths);
  /* set up neighbor pointers and comlink structures
     code for this routine is in com_machine.c  */
  make_nn_gathers();
  node0_printf("Made nn gathers\n"); fflush(stdout);
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  node0_printf("Made 3nn gathers\n"); fflush(stdout);
  /* set up K-S phase vectors, boundary conditions */
  phaseset();

  node0_printf("Finished setup\n"); fflush(stdout);
  return( prompt );
}
コード例 #3
0
ファイル: setup.c プロジェクト: jcosborn/milc_qcd
int
setup()
{
  int initial_set();
  int prompt;
  
  /* print banner, get initial parameters */
  prompt = initial_set();
  if(prompt == 2)return prompt;
  /* initialize the node random number generator */
  initialize_prn( &node_prn, iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();

  node0_printf("Made lattice\n"); fflush(stdout);
  /* set up neighbor pointers and comlink structures
     code for this routine is in com_machine.c  */
  make_nn_gathers();
  node0_printf("Made nn gathers\n"); fflush(stdout);
  
  node0_printf("Finished setup\n"); fflush(stdout);
  return prompt;
}
コード例 #4
0
ファイル: setup.c プロジェクト: winterowd/MILC_graphene
int
setup(void)
{
  int prompt;

  
  /* print banner, get volume, seed */
  prompt = initial_set();
  /* initialize the node random number generator */
  initialize_prn( &node_prn, iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  node0_printf("Made lattice\n"); fflush(stdout);

  /* set up neighbor pointers and comlink structures */
  make_nn_gathers();
  node0_printf("Made nn gathers\n"); fflush(stdout);
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  node0_printf("Made 3nn gathers\n"); fflush(stdout);
  /* set up K-S phase vectors, boundary conditions */
  phaseset();
  
  node0_printf("Finished setup\n"); fflush(stdout);
  return( prompt );
}
コード例 #5
0
ファイル: setup.c プロジェクト: ddkalamk/milc_qcd
int setup(void)   {
  int prompt, dir;

  /* print banner, get volume */
  prompt=initial_set();
  if(prompt == 2)return prompt;

  /* initialize the node random number generator */
  initialize_prn( &node_prn, param.iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  FORALLUPDIR(dir){
    boundary_phase[dir] = 0.;
  }
  /* set up nearest neighbor gathers */
  make_nn_gathers();
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  /* set up K-S phase vectors, boundary conditions */
  phaseset();
  twist_in = OFF;
  /* Create clover structure */
  gen_clov = create_clov();

  return(prompt);
}
コード例 #6
0
ファイル: setup.c プロジェクト: andypea/MILC
int setup()   {
  int prompt;

  /* print banner, get volume */
  prompt=initial_set();
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  /* set up nearest neighbor gathers */
  make_nn_gathers();
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  /* set up K-S phase vectors, boundary conditions */
  phaseset();
  /* Create clover structure */
  gen_clov = create_clov();

#ifdef HAVE_QDP
  {
    int i;
    for(i=0; i<4; ++i) {
      shiftdirs[i] = QDP_neighbor[i];
      shiftdirs[i+4] = neighbor3[i];
    }
    for(i=0; i<8; ++i) {
      shiftfwd[i] = QDP_forward;
      shiftbck[i] = QDP_backward;
    }
  }
#endif
  
  return(prompt);
}
コード例 #7
0
ファイル: setup.c プロジェクト: liu0604/milc_qcd
int  setup()   {
    int initial_set();
    void make_gen_pt();
    void make_3n_gathers(),
        setup_layout();
    int prompt;
//#ifdef HAVE_QDP
//    int i;
//#endif

	/* print banner, get volume, seed */
    prompt=initial_set();
   	/* initialize the node random number generator */
    initialize_prn( &node_prn, iseed, volume+mynode() );
	/* Initialize the layout functions, which decide where sites live */
    setup_layout();
	/* allocate space for lattice, set up coordinate fields */
    make_lattice();
    node0_printf("Made lattice\n"); fflush(stdout);
    //init_ferm_links(&fn_links, &ks_act_paths);
	/* set up neighbor pointers and comlink structures
	   code for this routine is in com_machine.c  */
    make_nn_gathers();
node0_printf("Made nn gathers\n"); fflush(stdout);
#ifdef FN
	/* set up 3rd nearest neighbor pointers and comlink structures
	   code for this routine is below  */
    make_3n_gathers();
node0_printf("Made 3nn gathers\n"); fflush(stdout);
#endif
	/* set up K-S phase vectors, boundary conditions */
    phaseset();

//#if HAVE_QOP
//  /* Initialize QOP */
//  if(initialize_qop() != QOP_SUCCESS){
//    node0_printf("setup: Error initializing QOP\n");
//    terminate(1);
//  }
//#endif

//#ifdef HAVE_QDP
//    make_rand_seed();
//node0_printf("Made random seed\n"); fflush(stdout);
//
//  for(i=0; i<4; ++i) {
//    shiftdirs[i] = QDP_neighbor[i];
//    shiftdirs[i+4] = neighbor3[i];
//  }
//  for(i=0; i<8; ++i) {
//    shiftfwd[i] = QDP_forward;
//    shiftbck[i] = QDP_backward;
//  }
//#endif

node0_printf("Finished setup\n"); fflush(stdout);
    return( prompt );
}
コード例 #8
0
ファイル: setup.c プロジェクト: erinaldi/milc_qcd
int setup()   {
  int prompt;
  
  /* print banner, get volume, nflavors, seed */
  prompt=initial_set();
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  /* set up neighbor pointers and comlink structures */
  make_nn_gathers();
  
  return(prompt);
}
コード例 #9
0
int  setup_H_cl()   {
    int initial_set();
    int prompt;

    /* print banner, get volume */
    prompt=initial_set();
    /* Initialize the layout functions, which decide where sites live */
    setup_layout();
    /* allocate space for lattice, set up coordinate fields */
    make_lattice();
    /* set up nearest neighbor gathers */
    make_nn_gathers();

    return(prompt);
}
コード例 #10
0
int
setup()
{
  int prompt;
#ifdef HAVE_QDP
  int i;
#endif
  
  /* print banner, get volume, seed */
  prompt = initial_set();
  /* initialize the node random number generator */
  initialize_prn( &node_prn, iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  node0_printf("Made lattice\n"); fflush(stdout);

  /* Mark fermion links as unallocated */
  init_ferm_links(&fn_links);
#ifdef DM_DU0
  init_ferm_links(&fn_links_dmdu0);
#endif
  /* set up neighbor pointers and comlink structures */
  make_nn_gathers();
  node0_printf("Made nn gathers\n"); fflush(stdout);
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  make_3n_gathers();
  node0_printf("Made 3nn gathers\n"); fflush(stdout);
  /* set up K-S phase vectors, boundary conditions */
  phaseset();
  
#ifdef HAVE_QDP
  for(i=0; i<4; ++i) {
    shiftdirs[i] = QDP_neighbor[i];
    shiftdirs[i+4] = neighbor3[i];
  }
  for(i=0; i<8; ++i) {
    shiftfwd[i] = QDP_forward;
    shiftbck[i] = QDP_backward;
  }
#endif

  node0_printf("Finished setup\n"); fflush(stdout);
  return( prompt );
}
コード例 #11
0
ファイル: setup.c プロジェクト: erinaldi/milc_qcd
int setup(void)   {
  int prompt;

  /* print banner, get volume */
  prompt=initial_set();
  if(prompt == 2)return prompt;
  /* initialize the node random number generator */
  initialize_prn( &node_prn, param.iseed, volume+mynode() );
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  /* set up nearest neighbor gathers */
  make_nn_gathers();

  return(prompt);
}
コード例 #12
0
ファイル: setup.c プロジェクト: erinaldi/milc_qcd
int setup()   {
  int prompt;

  /* print banner, get volume, nflavors, seed */
  prompt=initial_set();
  /* initialize the node random number generator */
  initialize_prn(&node_prn,iseed,volume+mynode());
  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  /* set up neighbor pointers and comlink structures */
  make_nn_gathers();
  /* Create clover structure */
  gen_clov = create_clov();

  return(prompt);
}
コード例 #13
0
ファイル: setup.c プロジェクト: daschaich/KS_nHYP_FA
// -----------------------------------------------------------------
int setup() {
  int prompt;

  // Print banner, get volume, seed
  prompt = initial_set();
  // Initialize the node random number generator
  initialize_prn(&node_prn, iseed, volume + mynode());
  // Initialize the layout functions, which decide where sites live
  setup_layout();
  // Allocate space for lattice, set up coordinate fields
  make_lattice();
  // Set up neighbor pointers and comlink structures
  make_nn_gathers();
  // Allocate space for fields
  make_fields();
  // Set up staggered phase vectors, boundary conditions
  phaseset();
  return prompt;
}
コード例 #14
0
ファイル: setup.c プロジェクト: liu0604/milc_qcd
int setup()   {
  int prompt;

  /* print banner, get volume */
  prompt=initial_set();
  if(prompt == 2)return prompt;

  /* Initialize the layout functions, which decide where sites live */
  setup_layout();
  /* allocate space for lattice, set up coordinate fields */
  make_lattice();

  /* Initialize fermion links as unallocated */
  //  init_ferm_links(&fn_links, &ks_act_paths);
  //  init_ferm_links(&fn_links_dmdu0, &ks_act_paths_dmdu0);
  /* set up nearest neighbor gathers */
  make_nn_gathers();
  /* set up 3rd nearest neighbor pointers and comlink structures
     code for this routine is below  */
  return(prompt);
}
コード例 #15
0
ファイル: setup.c プロジェクト: erinaldi/milc_qcd
int
setup()
{
  int prompt;
  
  /* print banner, get initial parameters */
  prompt = initial_set();

  /* Initialize the layout functions, which decide where sites live */
  setup_layout();

  /* allocate space for lattice, set up coordinate fields */
  make_lattice();
  node0_printf("Made lattice\n"); fflush(stdout);

  /* set up neighbor pointers and comlink structures */
  make_nn_gathers();
  node0_printf("Made nn gathers\n"); fflush(stdout);

  node0_printf("Finished setup\n"); fflush(stdout);
  return prompt;
}
コード例 #16
0
ファイル: 1636.c プロジェクト: soenmie/Online_Judge
int main() {
    scanf("%d", &n);
    while (n-- > 0) {
        scanf("%d%d", &m, &r);
        for (i = 1; i <= 2 * m; ++i) {
            initial_set(i);
        }
        for (i = 0; i < r; i++) {
            scanf("%d%d", &x, &y);
            union_set(x, m + y);
        }
        for (i = 1; i <= 2 * m; ++i) {
            if (i == find_set(i)) {
                ss[cnt++] = i;
            }
        }
        dp[0][0] = 1;
        for (i = 0; i < cnt; ++i) {
            for (j = m / 2; j >= sz1[ss[i]]; --j) {
                for (k = m / 2; k >= sz2[ss[i]]; --k) {
                    dp[j][k] = dp[j - sz1[ss[i]]][k - sz2[ss[i]]];
                }
            }
        }
        for (i = m / 2; i >= 0; i--) {
            if (dp[i][i] == 1) {
                printf("%d\n", i);
                break;
            }
        }
        memset(sz1, 0, sizeof(sz1));
        memset(sz2, 0, sizeof(sz2));
        memset(ss, 0, sizeof(ss));
        memset(dp, 0, sizeof(dp));
    }
    return 0;
}