Dear All, Here's an attempt to unify the raw and QDP level 3 API based on Chulwoo's strawman. -James QCD_layout layout; layout.ndims = 4; /* number of dimension */ layout.x_sites = nx; /* total number of sites in X dimension */ layout.y_sites = ny; layout.z_sites = nz; layout.t_sites = nt; layout.x_bc = 0; /* periodic, 1 = antiperiodic */ layout.y_bc = 0; /* periodic, 1 = antiperiodic */ layout.z_bc = 0; /* periodic, 1 = antiperiodic */ layout.t_bc = 1; /* periodic, 1 = antiperiodic */ *** alternatively *** layout.sites[0] = nx; ... or QCD_set_layout_ndims(&layout, 4); QCD_set_layout_sites(&layout, 0, nx); QCD_set_layout_sites(&layout, 1, ny); ... ****** QCD_init(&layout); QCD_asqtad_arg asqtad_arg; (or QCD_staggered_asqtad_arg) asqtad_arg.link = path_coeff[0]; /* one link term */ asqtad_arg.naik = path_coeff[1]; asqtad_arg.3staple= path_coeff[2]; asqtad_arg.5staple = path_coeff[3]; asqtad_arg.7staple = path_coeff[4]; asqtad_arg.lepage = path_coeff[5]; asqtad_arg.sign = 1; /* TXYZ */ ( what does this do? ) QCD_F_asqtad_create_links_raw(&asqtad_arg, fatlinks, longlinks, links); QCD_F_asqtad_create_links_qdp(&asqtad_arg, fatlinks, longlinks, links); /* creates fat and long from plain */ /* args for raw are float *, qdp are QDP_F3_ColorMatrix *link[4] */ /* also have QCD_D versions */ /* QCD_asqtad_arg can all be doubles */ QCD_F_asqtad_dirac_init_raw(fatlinks, longlinks); QCD_F_asqtad_dirac_init_qdp(fatlinks, longlinks); QCD_invert_arg inv_arg; (or QCD_cg_arg) ( do we need a special asqtad version? ) inv_arg.mass = 0.1; inv_arg.niter = 400; inv_arg.restart = 100; inv_arg.rsqmin = 1e-6; inv_arg.evenodd = QCD_EVEN; /* or QCD_ODD or QCD_ALL */ iternum = QCD_F_asqtad_invert_raw (&inv_arg, out_pt, in_pt); iternum = QCD_F_asqtad_invert_qdp (&inv_arg, out_pt, in_pt); QCD_asqtad_dirac_finalize(); QCD_finalize(); Question: How do we reset the links for the dslash? Do we have to destroy it first or can we just call dirac_init again with new links? If so we could rename 'init' to 'set' and remove dirac_finalize.