/* SETUP ROUTINES */ int initial_set(){ int prompt,status; /* On node zero, read lattice size, seed, and send to others */ if(mynode()==0){ /* print banner */ printf("SU3 with improved KS action\n"); printf("Eigenvalues and eigenvectors\n"); printf("MIMD version 6\n"); printf("Machine = %s, with %d nodes\n",machine_type(),numnodes()); gethostname(hostname, 128); printf("Host(0) = %s\n",hostname); printf("Username = %s\n", getenv("USER")); time_stamp("start"); get_utc_datetime(utc_date_time); /* Print list of options selected */ node0_printf("Options selected...\n"); show_generic_opts(); show_generic_ks_opts(); #if FERM_ACTION == HISQ show_su3_mat_opts(); show_hisq_links_opts(); #elif FERM_ACTION == HYPISQ show_su3_mat_opts(); show_hypisq_links_opts(); #endif status=get_prompt(stdin, &prompt); IF_OK status += get_i(stdin, prompt,"nx", &par_buf.nx ); IF_OK status += get_i(stdin, prompt,"ny", &par_buf.ny ); IF_OK status += get_i(stdin, prompt,"nz", &par_buf.nz ); IF_OK status += get_i(stdin, prompt,"nt", &par_buf.nt ); IF_OK status += get_i(stdin, prompt,"iseed", &par_buf.iseed ); if(status>0) par_buf.stopflag=1; else par_buf.stopflag=0; } /* end if(mynode()==0) */ /* Node 0 broadcasts parameter buffer to all other nodes */ broadcast_bytes((char *)&par_buf,sizeof(par_buf)); if( par_buf.stopflag != 0 ) normal_exit(0); nx=par_buf.nx; ny=par_buf.ny; nz=par_buf.nz; nt=par_buf.nt; iseed=par_buf.iseed; this_node = mynode(); number_of_nodes = numnodes(); volume=nx*ny*nz*nt; total_iters=0; return(prompt); }
/* SETUP ROUTINES */ static int initial_set(){ int prompt,status; #ifdef FIX_NODE_GEOM int i; #endif /* On node zero, read lattice size and send to others */ if(mynode()==0){ /* print banner */ printf("SU3 staggered fermion measurements\n"); printf("MIMD version %s\n",MILC_CODE_VERSION); printf("Machine = %s, with %d nodes\n",machine_type(),numnodes()); gethostname(hostname, 128); printf("Host(0) = %s\n",hostname); printf("Username = %s\n", getenv("USER")); time_stamp("start"); get_utc_datetime(utc_date_time); /* Print list of options selected */ node0_printf("Options selected...\n"); show_generic_opts(); show_generic_ks_opts(); #if FERM_ACTION == HISQ show_su3_mat_opts(); show_hisq_links_opts(); #elif FERM_ACTION == HYPISQ show_su3_mat_opts(); show_hypisq_links_opts(); #endif status = get_prompt(stdin, &prompt ); IF_OK status += get_i(stdin,prompt,"nx", ¶m.nx ); IF_OK status += get_i(stdin,prompt,"ny", ¶m.ny ); IF_OK status += get_i(stdin,prompt,"nz", ¶m.nz ); IF_OK status += get_i(stdin,prompt,"nt", ¶m.nt ); #ifdef FIX_NODE_GEOM IF_OK status += get_vi(stdin, prompt, "node_geometry", param.node_geometry, 4); #ifdef FIX_IONODE_GEOM IF_OK status += get_vi(stdin, prompt, "ionode_geometry", param.ionode_geometry, 4); #endif #endif IF_OK status += get_i(stdin, prompt,"iseed", ¶m.iseed ); IF_OK status += get_s(stdin, prompt,"job_id",param.job_id); if(status>0) param.stopflag=1; else param.stopflag=0; } /* end if(mynode()==0) */ /* Node 0 broadcasts parameter buffer to all other nodes */ broadcast_bytes((char *)¶m,sizeof(param)); if( param.stopflag != 0 ) normal_exit(0); if(prompt==2)return prompt; nx=param.nx; ny=param.ny; nz=param.nz; nt=param.nt; iseed=param.iseed; #ifdef FIX_NODE_GEOM for(i = 0; i < 4; i++) node_geometry[i] = param.node_geometry[i]; #ifdef FIX_IONODE_GEOM for(i = 0; i < 4; i++) ionode_geometry[i] = param.ionode_geometry[i]; #endif #endif this_node = mynode(); number_of_nodes = numnodes(); volume=nx*ny*nz*nt; return(prompt); }