├── 1d_Q16 ├── libraries ├── testsuite │ ├── in.SU2.hmc_meas │ ├── in.SU3.hmc_meas │ ├── in.SU4.hmc_meas │ ├── config.SU2.4 │ ├── config.SU3.4 │ ├── config.SU4.4 │ ├── config.SU2.4.info │ ├── config.SU3.4.info │ ├── config.SU4.4.info │ ├── in.SU5.hmc_meas │ ├── in.SU7.hmc_meas │ ├── in.SU2.hmc │ ├── in.SU2.meas │ ├── in.SU3.hmc │ ├── in.SU3.meas │ ├── in.SU4.hmc │ ├── in.SU4.meas │ ├── in.SU2.phase │ ├── in.SU3.phase │ ├── in.SU4.phase │ ├── in.SU2.eig │ ├── in.SU3.eig │ ├── in.SU4.eig │ ├── README │ ├── mpi │ │ ├── meas.SU2.ref │ │ ├── meas.SU3.ref │ │ └── meas.SU4.ref │ └── scalar │ │ ├── meas.SU2.ref │ │ ├── meas.SU3.ref │ │ └── meas.SU4.ref ├── susy │ ├── Make_mpi │ ├── Make_scalar │ ├── setup_rhmc.c │ ├── scalar_trace.c │ ├── ploop.c │ ├── defines.h │ ├── library_util.c │ ├── params.h │ └── control_phase.c ├── include │ ├── config.h │ ├── random.h │ ├── complex.h │ ├── int32type.h │ ├── loopend.h │ ├── precision.h │ ├── field_alloc.h │ ├── file_types.h │ ├── check_malloc.h │ └── dirs.h ├── generic │ ├── io_ansi.c │ ├── ranstuff.c │ ├── generic_includes.h │ ├── remap_stdio_from_args.c │ ├── README │ ├── nersc_cksum.c │ └── make_lattice.c └── README ├── 2d_Q04 ├── libraries ├── susy │ ├── path.c │ ├── unit.c │ ├── Make_mpi │ ├── rsymm.c │ ├── smear.c │ ├── Make_scalar │ ├── det_force.c │ ├── update_o.c │ ├── block_mcrg.c │ ├── blocked_ops.c │ ├── link_trace.c │ ├── ploop_corr.c │ ├── setup_rhmc.c │ ├── congrad_multi.c │ ├── update_leapfrog.c │ ├── plaq.c │ ├── tr_xsq.c │ ├── control_spill.c │ ├── blocked_ploop.c │ ├── defines.h │ ├── params.h │ ├── local_plaq.c │ └── hvy_pot_loop.c ├── testsuite │ ├── in.U2.hmc_meas │ ├── in.U3.hmc_meas │ ├── in.U4.hmc_meas │ ├── config.U2.44 │ ├── config.U3.44 │ ├── config.U4.44 │ ├── config.U2.44.info │ ├── config.U3.44.info │ ├── config.U4.44.info │ ├── in.U2.hmc │ ├── in.U3.hmc │ ├── in.U4.hmc │ ├── in.U2.phase │ ├── in.U3.phase │ ├── in.U4.phase │ ├── in.U2.mcrg │ ├── in.U3.mcrg │ ├── in.U4.mcrg │ ├── in.U2.eig │ ├── in.U3.eig │ ├── in.U4.eig │ ├── in.U5.hmc_meas │ ├── in.U7.hmc_meas │ ├── in.U2.meas │ ├── in.U3.meas │ ├── in.U4.meas │ └── README ├── include │ ├── susy.h │ ├── config.h │ ├── macros.h │ ├── random.h │ ├── complex.h │ ├── int32type.h │ ├── loopend.h │ ├── precision.h │ ├── field_alloc.h │ ├── file_types.h │ ├── check_malloc.h │ └── dirs.h ├── generic │ ├── io_ansi.c │ ├── ranstuff.c │ ├── nersc_cksum.c │ ├── generic_includes.h │ ├── remap_stdio_from_args.c │ ├── README │ └── make_lattice.c └── README ├── 4d_Q16 ├── testsuite │ ├── in.U2.hmc_meas │ ├── in.U3.hmc_meas │ ├── in.U4.hmc_meas │ ├── config.U2.2222 │ ├── config.U2.4444 │ ├── config.U3.2222 │ ├── config.U3.4444 │ ├── config.U4.2222 │ ├── config.U4.4444 │ ├── config.U2.2222.info │ ├── config.U2.4444.info │ ├── config.U3.2222.info │ ├── config.U3.4444.info │ ├── config.U4.2222.info │ ├── config.U4.4444.info │ ├── in.U2.hmc │ ├── in.U3.hmc │ ├── in.U4.hmc │ ├── in.U2.phase │ ├── in.U3.phase │ ├── in.U4.phase │ ├── in.U2.eig │ ├── in.U2.mcrg │ ├── in.U3.eig │ ├── in.U3.mcrg │ ├── in.U4.mcrg │ ├── in.U4.eig │ ├── in.U5.hmc_meas │ ├── in.U7.hmc_meas │ ├── in.U2.cheb │ ├── in.U3.cheb │ ├── in.U4.cheb │ ├── in.U2.meas │ ├── in.U3.meas │ ├── in.U4.meas │ ├── in.U2.mode │ ├── in.U3.mode │ ├── in.U4.mode │ ├── README │ ├── mpi │ │ ├── cheb.U2.ref │ │ ├── cheb.U3.ref │ │ └── cheb.U4.ref │ └── scalar │ │ ├── cheb.U4.ref │ │ ├── cheb.U2.ref │ │ └── cheb.U3.ref ├── susy │ ├── remez │ │ ├── in │ │ ├── Makefile │ │ └── README │ ├── mode_polynomial │ │ └── Makefile │ ├── ploop_corr.c │ ├── block_mcrg.c │ ├── Make_mpi │ ├── Make_scalar │ ├── z2source.c │ ├── blocked_ops.c │ ├── control_spill.c │ ├── plaq.c │ ├── link_trace.c │ ├── print_var3.c │ └── blocked_ploop.c ├── libraries │ ├── mat_copy.c │ ├── cmplx.c │ ├── dcmplx.c │ ├── clearvec.c │ ├── ce_itheta.c │ ├── s_a_d_mat.c │ ├── dce_itheta.c │ ├── clear_mat.c │ ├── cexp.c │ ├── dumpmat.c │ ├── cs_a_d_mat.c │ ├── csqrt.c │ ├── dumpsu2.c │ ├── clog.c │ ├── dcexp.c │ ├── dcsqrt.c │ ├── s_m_mat.c │ ├── dclog.c │ ├── l_su2_hit_n.c │ ├── s_m_amat.c │ ├── s_m_s_mat.c │ ├── s_m_a_amat.c │ ├── s_m_s_amat.c │ ├── r_su2_hit_a.c │ ├── subamat.c │ ├── m_su2_mat_vec_n.c │ ├── m_su2_mat_vec_a.c │ ├── cs_m_mat.c │ ├── z2rand.c │ ├── cs_m_a_mat.c │ ├── cs_m_s_mat.c │ ├── cmp_ahmat.c │ ├── dump_ahmat.c │ ├── cs_m_a_mata.c │ ├── adjoint.c │ ├── trace.c │ ├── Make_vanilla │ ├── uncmp_ahmat.c │ ├── Make_mpi │ ├── addmat.c │ ├── submat.c │ ├── addamat.c │ ├── realtr.c │ ├── s_m_a_mat.c │ ├── make_ahmat.c │ ├── gaussrand.c │ ├── cs_m_a_amat.c │ ├── byterevn.c │ ├── complextr.c │ ├── m_mat_nn.c │ ├── m_mat_an.c │ ├── m_mat_na.c │ ├── s_m_mat_nn.c │ ├── s_m_mat_na.c │ └── s_m_mat_an.c ├── correlators │ ├── README │ ├── params.h │ ├── defines.h │ ├── Make_mpi │ ├── Make_scalar │ └── plaq.c ├── include │ ├── precision.h │ ├── file_types.h │ ├── random.h │ ├── dirs.h │ ├── int32type.h │ ├── loopend.h │ ├── check_malloc.h │ └── config.h ├── README └── generic │ ├── generic_includes.h │ ├── io_ansi.c │ ├── remap_stdio_from_args.c │ ├── README │ ├── nersc_cksum.c │ └── make_lattice.c ├── .gitignore └── README /1d_Q16/libraries: -------------------------------------------------------------------------------- 1 | ../4d_Q16/libraries -------------------------------------------------------------------------------- /2d_Q04/libraries: -------------------------------------------------------------------------------- 1 | ../4d_Q16/libraries -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU2.hmc_meas: -------------------------------------------------------------------------------- 1 | in.SU2.meas -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU3.hmc_meas: -------------------------------------------------------------------------------- 1 | in.SU3.meas -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU4.hmc_meas: -------------------------------------------------------------------------------- 1 | in.SU4.meas -------------------------------------------------------------------------------- /2d_Q04/susy/path.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/path.c -------------------------------------------------------------------------------- /2d_Q04/susy/unit.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/unit.c -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U2.meas -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U3.meas -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U4.meas -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U2.meas -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U3.meas -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.hmc_meas: -------------------------------------------------------------------------------- 1 | in.U4.meas -------------------------------------------------------------------------------- /1d_Q16/susy/Make_mpi: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/Make_mpi -------------------------------------------------------------------------------- /2d_Q04/include/susy.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/susy.h -------------------------------------------------------------------------------- /2d_Q04/susy/Make_mpi: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/Make_mpi -------------------------------------------------------------------------------- /2d_Q04/susy/rsymm.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/rsymm.c -------------------------------------------------------------------------------- /2d_Q04/susy/smear.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/smear.c -------------------------------------------------------------------------------- /1d_Q16/include/config.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/config.h -------------------------------------------------------------------------------- /1d_Q16/include/random.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/random.h -------------------------------------------------------------------------------- /1d_Q16/susy/Make_scalar: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/Make_scalar -------------------------------------------------------------------------------- /2d_Q04/include/config.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/config.h -------------------------------------------------------------------------------- /2d_Q04/include/macros.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/macros.h -------------------------------------------------------------------------------- /2d_Q04/include/random.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/random.h -------------------------------------------------------------------------------- /2d_Q04/susy/Make_scalar: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/Make_scalar -------------------------------------------------------------------------------- /2d_Q04/susy/det_force.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/det_force.c -------------------------------------------------------------------------------- /2d_Q04/susy/update_o.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/update_o.c -------------------------------------------------------------------------------- /1d_Q16/generic/io_ansi.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/io_ansi.c -------------------------------------------------------------------------------- /1d_Q16/generic/ranstuff.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/ranstuff.c -------------------------------------------------------------------------------- /1d_Q16/include/complex.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/complex.h -------------------------------------------------------------------------------- /1d_Q16/include/int32type.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/int32type.h -------------------------------------------------------------------------------- /1d_Q16/include/loopend.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/loopend.h -------------------------------------------------------------------------------- /1d_Q16/include/precision.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/precision.h -------------------------------------------------------------------------------- /1d_Q16/susy/setup_rhmc.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/setup_rhmc.c -------------------------------------------------------------------------------- /2d_Q04/generic/io_ansi.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/io_ansi.c -------------------------------------------------------------------------------- /2d_Q04/generic/ranstuff.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/ranstuff.c -------------------------------------------------------------------------------- /2d_Q04/include/complex.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/complex.h -------------------------------------------------------------------------------- /2d_Q04/include/int32type.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/int32type.h -------------------------------------------------------------------------------- /2d_Q04/include/loopend.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/loopend.h -------------------------------------------------------------------------------- /2d_Q04/include/precision.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/precision.h -------------------------------------------------------------------------------- /2d_Q04/susy/block_mcrg.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/block_mcrg.c -------------------------------------------------------------------------------- /2d_Q04/susy/blocked_ops.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/blocked_ops.c -------------------------------------------------------------------------------- /2d_Q04/susy/link_trace.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/link_trace.c -------------------------------------------------------------------------------- /2d_Q04/susy/ploop_corr.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/ploop_corr.c -------------------------------------------------------------------------------- /2d_Q04/susy/setup_rhmc.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/setup_rhmc.c -------------------------------------------------------------------------------- /1d_Q16/include/field_alloc.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/field_alloc.h -------------------------------------------------------------------------------- /1d_Q16/include/file_types.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/file_types.h -------------------------------------------------------------------------------- /2d_Q04/generic/nersc_cksum.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/nersc_cksum.c -------------------------------------------------------------------------------- /2d_Q04/include/field_alloc.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/field_alloc.h -------------------------------------------------------------------------------- /2d_Q04/include/file_types.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/file_types.h -------------------------------------------------------------------------------- /2d_Q04/susy/congrad_multi.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/congrad_multi.c -------------------------------------------------------------------------------- /1d_Q16/include/check_malloc.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/check_malloc.h -------------------------------------------------------------------------------- /2d_Q04/include/check_malloc.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/include/check_malloc.h -------------------------------------------------------------------------------- /2d_Q04/susy/update_leapfrog.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/susy/update_leapfrog.c -------------------------------------------------------------------------------- /1d_Q16/generic/generic_includes.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/generic_includes.h -------------------------------------------------------------------------------- /2d_Q04/generic/generic_includes.h: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/generic_includes.h -------------------------------------------------------------------------------- /1d_Q16/generic/remap_stdio_from_args.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/remap_stdio_from_args.c -------------------------------------------------------------------------------- /2d_Q04/generic/remap_stdio_from_args.c: -------------------------------------------------------------------------------- 1 | ../../4d_Q16/generic/remap_stdio_from_args.c -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU2.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/1d_Q16/testsuite/config.SU2.4 -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU3.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/1d_Q16/testsuite/config.SU3.4 -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU4.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/1d_Q16/testsuite/config.SU4.4 -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U2.44: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/2d_Q04/testsuite/config.U2.44 -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U3.44: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/2d_Q04/testsuite/config.U3.44 -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U4.44: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/2d_Q04/testsuite/config.U4.44 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U2.2222: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U2.2222 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U2.4444: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U2.4444 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U3.2222: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U3.2222 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U3.4444: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U3.4444 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U4.2222: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U4.2222 -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U4.4444: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daschaich/susy/HEAD/4d_Q16/testsuite/config.U4.4444 -------------------------------------------------------------------------------- /4d_Q16/susy/remez/in: -------------------------------------------------------------------------------- 1 | 1 13 13 0.00005 5000 65 2 | # The numbers are 3 | # Nroot MD_order action_order eval_min eval_max precision 4 | # Run ./poly < in > out.N... 5 | # Try to keep the printed errors below 2e-5 6 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU2.4.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sun Sep 29 21:17:28 2019" 3 | checksums = "692efb07 d22e9404" 4 | nt = 4 5 | gauge.previous.filename = "config.SU2.4" 6 | gauge.previous.time_stamp = "Wed Sep 25 18:12:35 2019" 7 | gauge.previous.checksums = "97292763 62455eef" 8 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU3.4.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sat Sep 28 19:14:13 2019" 3 | checksums = "edd70b30 3f7ea8c3" 4 | nt = 4 5 | gauge.previous.filename = "config.SU3.4" 6 | gauge.previous.time_stamp = "Wed Sep 25 17:32:28 2019" 7 | gauge.previous.checksums = "3e8f93a 887ac091" 8 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/config.SU4.4.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sat Sep 28 17:32:20 2019" 3 | checksums = "9562f535 cf013137" 4 | nt = 4 5 | gauge.previous.filename = "config.SU4.4" 6 | gauge.previous.time_stamp = "Wed Sep 25 17:07:55 2019" 7 | gauge.previous.checksums = "aa183aa 67534d80" 8 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U2.44.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Mon Oct 9 05:51:48 2017" 3 | checksums = "564ac1d0 2e34c445" 4 | nx = 4 5 | nt = 4 6 | gauge.previous.filename = "config.U2.44" 7 | gauge.previous.time_stamp = "Sun Oct 8 16:03:30 2017" 8 | gauge.previous.checksums = "cbd4c664 e96f1ed0" 9 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U3.44.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Tue Oct 10 01:09:04 2017" 3 | checksums = "459cef92 ab23f244" 4 | nx = 4 5 | nt = 4 6 | gauge.previous.filename = "config.U3.44" 7 | gauge.previous.time_stamp = "Mon Oct 9 05:54:02 2017" 8 | gauge.previous.checksums = "e6aafcb1 dcb94857" 9 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/config.U4.44.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Mon Oct 9 07:35:02 2017" 3 | checksums = "d1599319 9ae91c1" 4 | nx = 4 5 | nt = 4 6 | gauge.previous.filename = "config.U4.44" 7 | gauge.previous.time_stamp = "Mon Oct 9 05:59:18 2017" 8 | gauge.previous.checksums = "8619dff c54b6c70" 9 | -------------------------------------------------------------------------------- /4d_Q16/susy/mode_polynomial/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -std=c99 -O3 -Wall 3 | LIBRARY_FLAGS = -lgsl -lgslcblas -lm 4 | 5 | main: 6 | $(CC) $(CFLAGS) -c mode_polynomial.c 7 | $(CC) $(CFLAGS) $(LIBRARY_FLAGS) -o mode_polynomial mode_polynomial.o 8 | 9 | clean: 10 | rm -f mode_polynomial mode_polynomial.o 11 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU5.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 42 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 13 13 | nstep_gauge 4 14 | traj_between_meas 2 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | fresh 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU7.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 43 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 15 13 | nstep_gauge 4 14 | traj_between_meas 2 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | fresh 23 | forget 24 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U2.2222.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sun Oct 8 11:18:46 2017" 3 | checksums = "7e6ee26a 1273f065" 4 | nx = 2 5 | ny = 2 6 | nz = 2 7 | nt = 2 8 | gauge.previous.filename = "config.U2.2222" 9 | gauge.previous.time_stamp = "Fri Apr 17 18:16:10 2015" 10 | gauge.previous.checksums = "cb2f495f a0d1975" 11 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U2.4444.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sun Oct 8 07:57:07 2017" 3 | checksums = "632f69a0 bb8becc" 4 | nx = 4 5 | ny = 4 6 | nz = 4 7 | nt = 4 8 | gauge.previous.filename = "config.U2.4444" 9 | gauge.previous.time_stamp = "Fri Apr 17 18:03:10 2015" 10 | gauge.previous.checksums = "2ffa97f c37b9702" 11 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U3.2222.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Mon Oct 9 05:53:09 2017" 3 | checksums = "266cca6d 8ab530f5" 4 | nx = 2 5 | ny = 2 6 | nz = 2 7 | nt = 2 8 | gauge.previous.filename = "config.U3.2222" 9 | gauge.previous.time_stamp = "Fri Apr 17 19:25:30 2015" 10 | gauge.previous.checksums = "80759468 d7bc2151" 11 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U3.4444.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sun Oct 8 10:56:41 2017" 3 | checksums = "3fbef447 1a43c79a" 4 | nx = 4 5 | ny = 4 6 | nz = 4 7 | nt = 4 8 | gauge.previous.filename = "config.U3.4444" 9 | gauge.previous.time_stamp = "Sat Apr 18 19:25:25 2015" 10 | gauge.previous.checksums = "e828858e fed7af9c" 11 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U4.2222.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Mon Oct 9 06:11:27 2017" 3 | checksums = "20f7d442 7b6b57a" 4 | nx = 2 5 | ny = 2 6 | nz = 2 7 | nt = 2 8 | gauge.previous.filename = "config.U4.2222" 9 | gauge.previous.time_stamp = "Sat Apr 18 00:54:46 2015" 10 | gauge.previous.checksums = "6a228cad c758b8a0" 11 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/config.U4.4444.info: -------------------------------------------------------------------------------- 1 | magic_number = 20103 2 | time_stamp = "Sun Oct 8 19:11:38 2017" 3 | checksums = "b42f2d5f cbf74541" 4 | nx = 4 5 | ny = 4 6 | nz = 4 7 | nt = 4 8 | gauge.previous.filename = "config.U4.4444" 9 | gauge.previous.time_stamp = "Sun Apr 19 21:34:20 2015" 10 | gauge.previous.checksums = "9098c02 35224501" 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.2o 2 | *.a 3 | *.o 4 | *.out 5 | *.sw[op] 6 | .DS_Store 7 | .lastmake* 8 | gmon.out 9 | localmake 10 | serial* 11 | susy_hmc* 12 | susy_phi 13 | susy_eig 14 | susy_meas 15 | susy_corr 16 | susy_mcrg 17 | susy_flow 18 | susy_cheb 19 | susy_mode 20 | susy_phase 21 | susy_spill 22 | poly 23 | error.dat 24 | mode_polynomial 25 | PRIMME 26 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU2.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 6 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU2.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU2.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 6 13 | nstep_gauge 4 14 | traj_between_meas 2 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU2.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU3.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 10 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU3.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU3.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 10 13 | nstep_gauge 4 14 | traj_between_meas 2 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU3.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU4.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 12 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU4.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU4.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 12 13 | nstep_gauge 4 14 | traj_between_meas 2 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | reload_serial config.SU4.4 23 | forget 24 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU2.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 6 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | ckpt_load 0 23 | ckpt_save 0 24 | 25 | reload_serial config.SU2.4 26 | forget 27 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU3.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 10 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | ckpt_load 0 23 | ckpt_save 0 24 | 25 | reload_serial config.SU3.4 26 | forget 27 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU4.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 12 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | ckpt_load 0 23 | ckpt_save 0 24 | 25 | reload_serial config.SU4.4 26 | forget 27 | -------------------------------------------------------------------------------- /4d_Q16/libraries/mat_copy.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Copy a matrix (hardly worth a function) 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | void mat_copy(matrix *src, matrix *dest) { 8 | *dest = *src; 9 | } 10 | // ----------------------------------------------------------------- 11 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU2.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 6 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | Nvec 12 23 | eig_tol 1e-10 24 | maxIter 5000 25 | 26 | reload_serial config.SU2.4 27 | forget 28 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU3.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 10 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | Nvec 12 23 | eig_tol 1e-10 24 | maxIter 5000 25 | 26 | reload_serial config.SU3.4 27 | forget 28 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/in.SU4.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nt 4 3 | PBC -1 4 | iseed 41 5 | 6 | Nroot 1 7 | Norder 15 8 | 9 | warms 0 10 | trajecs 3 11 | traj_length 1 12 | nstep 12 13 | nstep_gauge 4 14 | traj_between_meas 3 15 | 16 | lambda 0.01 17 | mu 1 18 | 19 | max_cg_iterations 500 20 | error_per_site 1e-5 21 | 22 | Nvec 12 23 | eig_tol 1e-8 24 | maxIter 5000 25 | 26 | reload_serial config.SU4.4 27 | forget 28 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 5 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | reload_serial config.U2.44 27 | forget 28 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 8 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | reload_serial config.U3.44 27 | forget 28 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 11 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | reload_serial config.U4.44 27 | forget 28 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cmplx.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex number from two given real numbers 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | 6 | complex cmplx(Real x, Real y) { 7 | complex c; 8 | c.real = x; 9 | c.imag = y; 10 | return c; 11 | } 12 | // ----------------------------------------------------------------- 13 | -------------------------------------------------------------------------------- /4d_Q16/correlators/README: -------------------------------------------------------------------------------- 1 | To test/debug: 2 | +++ 3 | prompt 0 4 | nx 4 5 | ny 4 6 | nz 4 7 | nt 4 8 | 9 | APE_smear 10 | Nsmear 0 11 | alpha 0.1 12 | 13 | Nblock 5 14 | Nmeas 1 15 | reload_serial ../testsuite/config.U2.4444 16 | reload_serial ../testsuite/config.U2.4444 17 | reload_serial ../testsuite/config.U2.4444 18 | reload_serial ../testsuite/config.U2.4444 19 | reload_serial ../testsuite/config.U2.4444 20 | +++ 21 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | reload_serial config.U2.4444 29 | forget 30 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 8 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | reload_serial config.U3.4444 29 | forget 30 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.hmc: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 11 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | reload_serial config.U4.4444 29 | forget 30 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 5 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | ckpt_load 0 27 | ckpt_save 0 28 | 29 | reload_serial config.U2.44 30 | forget 31 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 8 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | ckpt_load 0 27 | ckpt_save 0 28 | 29 | reload_serial config.U3.44 30 | forget 31 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 11 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | ckpt_load 0 27 | ckpt_save 0 28 | 29 | reload_serial config.U4.44 30 | forget 31 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dcmplx.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return double complex number from two given double real numbers 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | 6 | double_complex dcmplx(double x, double y) { 7 | double_complex c; 8 | c.real = x; 9 | c.imag = y; 10 | return c; 11 | } 12 | // ----------------------------------------------------------------- 13 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 5 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | APE_smear 24 | Nsmear 2 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | 30 | reload_serial config.U2.44 31 | forget 32 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 8 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | APE_smear 24 | Nsmear 2 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | 30 | reload_serial config.U3.44 31 | forget 32 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 11 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | APE_smear 24 | Nsmear 2 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | 30 | reload_serial config.U4.44 31 | forget 32 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 5 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | Nvec 12 27 | eig_tol 1e-8 28 | maxIter 5000 29 | 30 | reload_serial config.U2.44 31 | forget 32 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 8 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | Nvec 12 27 | eig_tol 1e-8 28 | maxIter 5000 29 | 30 | reload_serial config.U3.44 31 | forget 32 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 11 14 | nstep_gauge 4 15 | traj_between_meas 3 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | max_cg_iterations 500 24 | error_per_site 1e-5 25 | 26 | Nvec 12 27 | eig_tol 1e-8 28 | maxIter 5000 29 | 30 | reload_serial config.U4.44 31 | forget 32 | -------------------------------------------------------------------------------- /4d_Q16/include/precision.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | #ifndef _PRECISION_H 3 | #define _PRECISION_H 4 | // Generic floating point type, which defaults to double precision 5 | #ifndef PRECISION 6 | #define PRECISION 2 7 | #endif 8 | 9 | #if (PRECISION == 2) 10 | typedef double Real; 11 | #else 12 | typedef float Real; 13 | #endif 14 | 15 | #endif 16 | // ----------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /4d_Q16/libraries/clearvec.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Clear a fundamental vector 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | void clearvec(vector *v) { 8 | int i; 9 | for (i = 0; i < NCOL; i++) { 10 | v->c[i].real = 0.0; 11 | v->c[i].imag = 0.0; 12 | } 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 2 3 | ny 2 4 | nz 2 5 | nt 2 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | ckpt_load 0 29 | ckpt_save 0 30 | 31 | reload_serial config.U2.2222 32 | forget 33 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 2 3 | ny 2 4 | nz 2 5 | nt 2 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 8 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | ckpt_load 0 29 | ckpt_save 0 30 | 31 | reload_serial config.U3.2222 32 | forget 33 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.phase: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 2 3 | ny 2 4 | nz 2 5 | nt 2 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 11 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | ckpt_load 0 29 | ckpt_save 0 30 | 31 | reload_serial config.U4.2222 32 | forget 33 | -------------------------------------------------------------------------------- /4d_Q16/libraries/ce_itheta.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return exp[i theta], probably sub-optimal 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | complex ce_itheta(Real theta) { 8 | complex c; 9 | c.real = (Real)cos((double)theta); 10 | c.imag = (Real)sin((double)theta); 11 | return c; 12 | } 13 | // ----------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U5.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 1 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 15 14 | nstep_gauge 4 15 | traj_between_meas 2 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | stout_smear 24 | Nsmear 1 25 | alpha 0.1 26 | 27 | max_cg_iterations 5000 28 | error_per_site 1e-5 29 | nsrc 3 30 | 31 | no_gauge_fix 32 | 33 | fresh 34 | forget 35 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U7.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 1 3 | nt 4 4 | PBC -1 5 | iseed 14 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 18 14 | nstep_gauge 4 15 | traj_between_meas 2 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | stout_smear 24 | Nsmear 1 25 | alpha 0.1 26 | 27 | max_cg_iterations 5000 28 | error_per_site 1e-5 29 | nsrc 3 30 | 31 | no_gauge_fix 32 | 33 | fresh 34 | forget 35 | -------------------------------------------------------------------------------- /4d_Q16/include/file_types.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | #ifndef FILE_TYPES_H 3 | #define FILE_TYPES_H 4 | 5 | // For checking whether we're dealing with a SciDAC file 6 | #define LIME_MAGIC_NO 0x456789ab // Decimal 1164413355 7 | 8 | // Gauge configuration file type 9 | #define GAUGE_VERSION_NUMBER 0x4e87 // Decimal 20103 10 | #endif 11 | // ----------------------------------------------------------------- 12 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nvec 12 29 | eig_tol 1e-8 30 | maxIter 5000 31 | 32 | reload_serial config.U2.4444 33 | forget 34 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | APE_smear 26 | Nsmear 2 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | 32 | reload_serial config.U2.4444 33 | forget 34 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 8 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nvec 12 29 | eig_tol 1e-8 30 | maxIter 5000 31 | 32 | reload_serial config.U3.4444 33 | forget 34 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 8 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | APE_smear 26 | Nsmear 2 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | 32 | reload_serial config.U3.4444 33 | forget 34 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.mcrg: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 11 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | APE_smear 26 | Nsmear 2 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | 32 | reload_serial config.U4.4444 33 | forget 34 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.eig: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 11 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nvec 12 29 | eig_tol 1e-8 30 | maxIter 5000 31 | 32 | reload_serial config.U4.4444 33 | forget 34 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U2.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 5 14 | nstep_gauge 4 15 | traj_between_meas 2 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | stout_smear 24 | Nsmear 1 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | nsrc 3 30 | 31 | coulomb_gauge_fix 32 | 33 | reload_serial config.U2.44 34 | forget 35 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U3.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 8 14 | nstep_gauge 4 15 | traj_between_meas 2 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | stout_smear 24 | Nsmear 1 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | nsrc 3 30 | 31 | coulomb_gauge_fix 32 | 33 | reload_serial config.U3.44 34 | forget 35 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/in.U4.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | nt 4 4 | PBC -1 5 | iseed 41 6 | 7 | Nroot 1 8 | Norder 15 9 | 10 | warms 0 11 | trajecs 3 12 | traj_length 1 13 | nstep 11 14 | nstep_gauge 4 15 | traj_between_meas 2 16 | 17 | lambda 0.5 18 | kappa_u1 0.5 19 | bmass 0.5 20 | fmass 0.0 21 | G 0.1 22 | 23 | stout_smear 24 | Nsmear 1 25 | alpha 0.1 26 | 27 | max_cg_iterations 500 28 | error_per_site 1e-5 29 | nsrc 3 30 | 31 | coulomb_gauge_fix 32 | 33 | reload_serial config.U4.44 34 | forget 35 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_a_d_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add real scalar to diagonal components of matrix 3 | // a <-- a + cI 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_add_diag(matrix *a, Real c) { 9 | register int i; 10 | 11 | for (i = 0; i < NCOL; i++) 12 | a->e[i][i].real += c; 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U5.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 1 3 | ny 1 4 | nz 1 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 15 16 | nstep_gauge 4 17 | traj_between_meas 2 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | stout_smear 26 | Nsmear 1 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | nsrc 3 32 | 33 | no_gauge_fix 34 | 35 | fresh 36 | forget 37 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U7.hmc_meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 1 3 | ny 1 4 | nz 1 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 15 16 | nstep_gauge 4 17 | traj_between_meas 2 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | stout_smear 26 | Nsmear 1 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | nsrc 3 32 | 33 | no_gauge_fix 34 | 35 | fresh 36 | forget 37 | -------------------------------------------------------------------------------- /1d_Q16/include/dirs.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Directions, links, and macros to give their opposites 3 | #ifndef _DIRS_H 4 | #define _DIRS_H 5 | 6 | #define NODIR -1 // Not a direction 7 | #define TUP 0 8 | #define TDOWN 1 9 | #define OPP_DIR(dir) (1 - (dir)) // Opposite spacetime direction 10 | #define OPP_LDIR(dir) (1 - (dir)) // Opposite link direction 11 | 12 | #endif 13 | // ----------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dce_itheta.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return double exp[i theta], probably sub-optimal 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | double_complex dce_itheta(double theta) { 8 | double_complex c; 9 | c.real = (double)cos((double)theta); 10 | c.imag = (double)sin((double)theta); 11 | return c; 12 | } 13 | // ----------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.cheb: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | cheb_order 10 30 | lambda_min -0.02 31 | lambda_max 25 32 | 33 | reload_serial config.U2.4444 34 | forget 35 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.cheb: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | cheb_order 10 30 | lambda_min -0.02 31 | lambda_max 25 32 | 33 | reload_serial config.U3.4444 34 | forget 35 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.cheb: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | cheb_order 10 30 | lambda_min -0.02 31 | lambda_max 30 32 | 33 | reload_serial config.U4.4444 34 | forget 35 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 2 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | stout_smear 26 | Nsmear 1 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | nsrc 3 32 | 33 | coulomb_gauge_fix 34 | 35 | reload_serial config.U2.4444 36 | forget 37 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 8 16 | nstep_gauge 4 17 | traj_between_meas 2 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | stout_smear 26 | Nsmear 1 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | nsrc 3 32 | 33 | coulomb_gauge_fix 34 | 35 | reload_serial config.U3.4444 36 | forget 37 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.meas: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 11 16 | nstep_gauge 4 17 | traj_between_meas 2 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | stout_smear 26 | Nsmear 1 27 | alpha 0.1 28 | 29 | max_cg_iterations 5000 30 | error_per_site 1e-5 31 | nsrc 3 32 | 33 | coulomb_gauge_fix 34 | 35 | reload_serial config.U4.4444 36 | forget 37 | -------------------------------------------------------------------------------- /4d_Q16/libraries/clear_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Clear the given matrix 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | void clear_mat(matrix *m) { 8 | register int i, j; 9 | for (i = 0; i < NCOL; i++) { 10 | for (j = 0; j < NCOL; j++) { 11 | m->e[i][j].real = 0.0; 12 | m->e[i][j].imag = 0.0; 13 | } 14 | } 15 | } 16 | // ----------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cexp.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex exponential of given complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | complex cexp(complex *a) { 8 | complex c; 9 | Real mag = (Real)exp((double)(*a).real); 10 | c.real = mag * (Real)cos((double)(*a).imag); 11 | c.imag = mag * (Real)sin((double)(*a).imag); 12 | return c; 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dumpmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Print the given matrix 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void dumpmat(matrix *m) { 9 | int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) 12 | printf(" (%.4g, %.4g)", m->e[i][j].real, m->e[i][j].imag); 13 | printf("\n"); 14 | } 15 | } 16 | // ----------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U2.mode: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | step_order 32 30 | numOmega 5 31 | Omega 0.5 32 | Omega 1.0 33 | Omega 1.5 34 | Omega 2.0 35 | Omega 2.5 36 | 37 | reload_serial config.U2.4444 38 | forget 39 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U3.mode: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | step_order 32 30 | numOmega 5 31 | Omega 0.5 32 | Omega 1.0 33 | Omega 1.5 34 | Omega 2.0 35 | Omega 2.5 36 | 37 | reload_serial config.U3.4444 38 | forget 39 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/in.U4.mode: -------------------------------------------------------------------------------- 1 | prompt 0 2 | nx 4 3 | ny 4 4 | nz 4 5 | nt 4 6 | PBC -1 7 | iseed 41 8 | 9 | Nroot 1 10 | Norder 15 11 | 12 | warms 0 13 | trajecs 3 14 | traj_length 1 15 | nstep 5 16 | nstep_gauge 4 17 | traj_between_meas 3 18 | 19 | lambda 1.0 20 | kappa_u1 1.0 21 | bmass 1.0 22 | fmass 0.0 23 | G 0.1 24 | 25 | max_cg_iterations 5000 26 | error_per_site 1e-5 27 | 28 | Nstoch 5 29 | step_order 32 30 | numOmega 5 31 | Omega 0.5 32 | Omega 1.0 33 | Omega 1.5 34 | Omega 2.0 35 | Omega 2.5 36 | 37 | reload_serial config.U4.4444 38 | forget 39 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_a_d_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add complex scalar to diagonal components of matrix 3 | // a <-- a + cI 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void c_scalar_add_diag(matrix *a, complex *c) { 9 | register int i; 10 | 11 | for (i = 0; i < NCOL; i++) { 12 | a->e[i][i].real += c->real; 13 | a->e[i][i].imag += c->imag; 14 | } 15 | } 16 | // ----------------------------------------------------------------- 17 | -------------------------------------------------------------------------------- /4d_Q16/libraries/csqrt.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex square root of given complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | complex csqrt(complex *z) { 8 | complex c; 9 | Real theta, r; 10 | r = sqrt(hypot(z->real, z->imag)); 11 | theta = 0.5 * atan2(z->imag, z->real); 12 | c = ce_itheta(theta); 13 | c.real *= r; 14 | c.imag *= r; 15 | return c; 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dumpsu2.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Print the given SU2 matrix 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void dumpsu2(su2_matrix *u) { 9 | int i, j; 10 | for (i = 0; i < 2; i++) { 11 | for (j = 0; j < 2; j++) 12 | printf("(%.4g, %.4g) ", u->e[i][j].real, u->e[i][j].imag); 13 | printf("\n"); 14 | } 15 | printf("\n"); 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/clog.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex logarithm of given complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | complex clog(complex *a) { 8 | complex c; 9 | c.real = 0.5 * (Real)log((double)((*a).real * (*a).real 10 | + (*a).imag * (*a).imag)); 11 | c.imag = (Real)atan2((double)(*a).imag, (double)(*a).real); 12 | return c; 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dcexp.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return double complex exponential of given double complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | double_complex dcexp(double_complex *a) { 8 | double_complex c; 9 | double mag = (double)exp((double)(*a).real); 10 | c.real = mag * (double)cos((double)(*a).imag); 11 | c.imag = mag * (double)sin((double)(*a).imag); 12 | return c; 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dcsqrt.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return double complex square root of given double complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | double_complex dcsqrt(double_complex *z) { 8 | double_complex c; 9 | double theta, r; 10 | r = sqrt(hypot(z->real, z->imag)); 11 | theta = 0.5 * atan2(z->imag, z->real); 12 | c = dce_itheta(theta); 13 | c.real *= r; 14 | c.imag *= r; 15 | return c; 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Scalar multiplication on matrix 3 | // b <-- s * a 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_mult_matrix(matrix *a, Real s, matrix *b) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | b->e[i][j].real = s * a->e[i][j].real; 13 | b->e[i][j].imag = s * a->e[i][j].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dclog.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return double complex logarithm of given double complex number 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | 7 | double_complex dclog(double_complex *a){ 8 | double_complex c; 9 | c.real = 0.5 * (double)log((double)((*a).real * (*a).real 10 | + (*a).imag * (*a).imag)); 11 | c.imag = (double)atan2((double)(*a).imag, (double)(*a).real); 12 | return c; 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/libraries/l_su2_hit_n.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Multiply a matrix by an SU2 matrix from the left 3 | // The p and q rows of link match the 0 and 1 rows of u, respectively 4 | // link <-- u * link 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void left_su2_hit_n(su2_matrix *u, int p, int q, matrix *link) { 10 | register int m; 11 | for (m = 0; m < NCOL; m++) 12 | mult_su2_mat_vec_elem_n(u, &(link->e[p][m]), &(link->e[q][m])); 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/include/random.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | #ifndef _RANDOM_H 3 | #define _RANDOM_H 4 | // Random number structure and generic random number generator 5 | // returning a uniformly distributed random value on [0, 1] 6 | // We assume long is at least 32 bits 7 | #include "../include/precision.h" 8 | 9 | typedef struct { 10 | unsigned long r0, r1, r2, r3, r4, r5, r6; 11 | unsigned long multiplier, addend, ic_state; 12 | float scale; 13 | } double_prn; 14 | 15 | Real myrand(double_prn *prn_pt); 16 | 17 | #endif 18 | // ----------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_amat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Scalar multiplication on adjoint of matrix 3 | // b <-- s * adag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_mult_adj_matrix(matrix *a, Real s, matrix *b) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | b->e[i][j].real = s * a->e[j][i].real; 13 | b->e[i][j].imag = -1.0 * s * a->e[j][i].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /2d_Q04/README: -------------------------------------------------------------------------------- 1 | This directory of SUSY LATTICE contains parallel code for RHMC simulations of N=(2,2) supersymmetric Yang--Mills theory in two dimensions, including related measurements. 2 | 3 | See susy/README for the real README! 4 | 5 | Top-level directories mostly follow the MILC layout: 6 | generic -- Procedures common to most applications: communications, I/O, data layout, etc. 7 | include -- Header files for common procedures 8 | libraries -- Single processor linear algebra routines 9 | susy -- RHMC and measurements 10 | 11 | Dependences: 12 | LAPACK is required for all targets 13 | Eigenvalue measurements require PRIMME as well 14 | -------------------------------------------------------------------------------- /4d_Q16/README: -------------------------------------------------------------------------------- 1 | This directory of SUSY LATTICE contains parallel code for RHMC simulations of N=4 supersymmetric Yang--Mills theory in four dimensions, including related measurements. 2 | 3 | See susy/README for the real README! 4 | 5 | Top-level directories mostly follow the MILC layout: 6 | generic -- Procedures common to most applications: communications, I/O, data layout, etc. 7 | include -- Header files for common procedures 8 | libraries -- Single processor linear algebra routines 9 | susy -- RHMC and measurements 10 | 11 | Dependences: 12 | LAPACK is required for all targets 13 | Eigenvalue measurements require PRIMME as well 14 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_s_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Subtract result of scalar multiplication on matrix 3 | // c <-- c - s * b 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_mult_dif_matrix(matrix *b, Real s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real -= s * b->e[i][j].real; 13 | c->e[i][j].imag -= s * b->e[i][j].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /1d_Q16/README: -------------------------------------------------------------------------------- 1 | This directory of SUSY LATTICE contains parallel code for RHMC simulations of 16-supercharge Yang--Mills (BFSS/BMN) theories in one dimension, including related measurements. 2 | 3 | See susy/README for the real README! 4 | 5 | Top-level directories mostly follow the MILC layout: 6 | generic -- Procedures common to most applications: communications, I/O, data layout, etc. 7 | include -- Header files for common procedures 8 | libraries -- Single processor linear algebra routines 9 | susy -- RHMC and measurements 10 | 11 | Dependences: 12 | LAPACK is required for all targets 13 | Eigenvalue measurements require PRIMME as well 14 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_a_amat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add result of scalar multiplication on adjoint matrix 3 | // c <-- c + s * bdag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_mult_sum_adj_matrix(matrix *b, Real s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real += s * b->e[j][i].real; 13 | c->e[i][j].imag -= s * b->e[j][i].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_s_amat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Subtract result of scalar multiplication on adjoint matrix 3 | // c <-- c + s * bdag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void scalar_mult_dif_adj_matrix(matrix *b, Real s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real -= s * b->e[j][i].real; 13 | c->e[i][j].imag += s * b->e[j][i].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/r_su2_hit_a.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Multiply a matrix by the adjoint of an SU2 matrix from the right 3 | // The p and q columns of link match the 0 and 1 columns of udag, respectively 4 | // link <-- link * udag 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void right_su2_hit_a(su2_matrix *u, int p, int q, matrix *link) { 10 | register int m; 11 | for (m = 0; m < NCOL; m++) 12 | mult_su2_mat_vec_elem_a(u, &(link->e[m][p]), &(link->e[m][q])); 13 | } 14 | // ----------------------------------------------------------------- 15 | -------------------------------------------------------------------------------- /4d_Q16/libraries/subamat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Subtract two matrices using the adjoint of the second 3 | // c <-- a - bdag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void sub_adj_matrix(matrix *a, matrix *b, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real = a->e[i][j].real - b->e[j][i].real; 13 | c->e[i][j].imag = a->e[i][j].imag + b->e[j][i].imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/m_su2_mat_vec_n.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Multiply (x0, x1) column spinor by SU2 matrix u 3 | // x <-- u * x 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void mult_su2_mat_vec_elem_n(su2_matrix *u, complex *x0, complex *x1) { 9 | complex z0, z1, t0 = *x0, t1 = *x1; 10 | 11 | CMUL(u->e[0][0], t0, z0); 12 | CMUL(u->e[0][1], t1, z1); 13 | CADD(z0, z1, *x0); 14 | CMUL(u->e[1][0], t0, z0); 15 | CMUL(u->e[1][1], t1, z1); 16 | CADD(z0, z1, *x1); 17 | } 18 | // ----------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /2d_Q04/include/dirs.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Directions, links, and macros to give their opposites 3 | // MPI communications assume directions from 0 to 3 4 | #ifndef _DIRS_H 5 | #define _DIRS_H 6 | 7 | #define NDIMS 2 // Number of dimensions 8 | #define NODIR -1 // Not a direction 9 | #define XUP 0 10 | #define TUP 1 11 | #define TDOWN 2 12 | #define XDOWN 3 13 | #define OPP_DIR(dir) (3 - (dir)) // Opposite spacetime direction 14 | 15 | #define NUMLINK 2 16 | #define OPP_LDIR(dir) (3 - (dir)) // Opposite link direction 17 | 18 | #endif 19 | // ----------------------------------------------------------------- 20 | -------------------------------------------------------------------------------- /4d_Q16/susy/remez/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CXX = g++ 3 | LDFLAGS = -lmpfr -lgmp -Wl,--rpath,/usr/local/lib64 4 | 5 | INCLIST = 6 | 7 | OBJS = alg_remez.o poly.o 8 | 9 | CFLAGS= -O3 10 | CXXFLAGS= -O3 11 | DFLAGS += -DGMP 12 | 13 | # Targets 14 | 15 | poly: poly.o alg_remez.o 16 | ${CXX} alg_remez.o poly.o ${LDFLAGS} -o poly 17 | 18 | .SUFFIXES: 19 | .SUFFIXES: .o .C .c 20 | 21 | $(BIN): $(OBJS) 22 | $(CXX) $(OBJS) $(LDFLAGS) -o $(BIN) 23 | 24 | ${OBJS}: Makefile 25 | 26 | .c.o: 27 | $(CC) -o $@ $(CFLAGS) $(DFLAGS) -c $(INCLIST) $< 28 | .C.o: 29 | $(CXX) -o $@ $(CXXFLAGS) $(DFLAGS) -c $(INCLIST) $< 30 | 31 | clean: 32 | rm -f *.dat *.o *~ *\#* *.stackdump $(BIN) 33 | -------------------------------------------------------------------------------- /4d_Q16/libraries/m_su2_mat_vec_a.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Multiply (x0, x1) row spinor by adjoint of SU2 matrix u 3 | // x <-- x * udag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void mult_su2_mat_vec_elem_a(su2_matrix *u, complex *x0, complex *x1) { 9 | complex z0, z1, t0 = *x0, t1 = *x1; 10 | 11 | CMUL_J(t0, u->e[0][0], z0); 12 | CMUL_J(t1, u->e[0][1], z1); 13 | CADD(z0, z1, *x0); 14 | CMUL_J(t0, u->e[1][0], z0); 15 | CMUL_J(t1, u->e[1][1], z1); 16 | CADD(z0, z1, *x1); 17 | } 18 | // ----------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_m_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Complex scalar multiplication on matrix 3 | // c <-- s * b 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void c_scalar_mult_mat(matrix *b, complex *s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real = b->e[i][j].real * s->real - b->e[i][j].imag * s->imag; 13 | c->e[i][j].imag = b->e[i][j].imag * s->real + b->e[i][j].real * s->imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/z2rand.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Z2 distributed random number 3 | // Normalized by 1 / sqrt(2) so that x^2 = 1 / 2 4 | // This requires a random number generator, myrand(), 5 | // to return a Real uniformly distributed between zero and one 6 | #include "../include/config.h" 7 | #include 8 | #include "../include/susy.h" 9 | #include "../include/random.h" 10 | 11 | // prn_pt is a pointer passed to myrand() 12 | Real Z2_rand_no(double_prn *prn_pt) { 13 | if (myrand(prn_pt) > 0.5) 14 | return (1.0 / sqrt(2.0)); 15 | return (-1.0 / sqrt(2.0)); 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/generic/generic_includes.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Header included in all codes in this directory 3 | #include "../include/config.h" // Keep this first 4 | #include 5 | #include 6 | #include 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | #include "../include/macros.h" 10 | #include "../include/comdefs.h" 11 | #include "../include/generic.h" 12 | #include "../include/int32type.h" 13 | #include "../include/dirs.h" 14 | #include 15 | #include 16 | #include 17 | #include "../include/check_malloc.h" 18 | // ----------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_m_a_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add result of complex scalar multiplication on matrix 3 | // c <-- c + s * b 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void c_scalar_mult_sum_mat(matrix *b, complex *s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real += b->e[i][j].real * s->real - b->e[i][j].imag * s->imag; 13 | c->e[i][j].imag += b->e[i][j].imag * s->real + b->e[i][j].real * s->imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_m_s_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Subtract result of complex scalar multiplication on matrix 3 | // c <-- c - s * b 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void c_scalar_mult_dif_mat(matrix *b, complex *s, matrix *c) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) { 12 | c->e[i][j].real -= b->e[i][j].real * s->real - b->e[i][j].imag * s->imag; 13 | c->e[i][j].imag -= b->e[i][j].imag * s->real + b->e[i][j].real * s->imag; 14 | } 15 | } 16 | } 17 | // ----------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cmp_ahmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Make a compressed anti-hermitian matrix from a matrix 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | void compress_anti_hermitian(matrix *src, anti_hermitmat *dest) { 8 | int i, j, index = 0; 9 | for (i = 0; i < NCOL; i++) 10 | dest->im_diag[i] = src->e[i][i].imag; 11 | 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = i + 1; j < NCOL; j++) { 14 | dest->m[index].real = src->e[i][j].real; 15 | dest->m[index].imag = src->e[i][j].imag; 16 | index++; 17 | } 18 | } 19 | } 20 | // ----------------------------------------------------------------- 21 | -------------------------------------------------------------------------------- /4d_Q16/libraries/dump_ahmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Print the given anti-hermitian matrix 3 | #include "../include/config.h" 4 | #include 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void dump_ahmat(anti_hermitmat *ahm) { 9 | int i, j, index = 0; 10 | printf("DIAG"); 11 | for (i = 0; i < NCOL; i++) 12 | printf(" %.4g", ahm->im_diag[i]); 13 | printf("\nOFFDIAG"); 14 | for (i = 0; i < NCOL; i++) { 15 | for (j = i + 1; j < NCOL; j++) { 16 | printf(" (%.4g, %.4g)", ahm->m[index].real, ahm->m[index].imag); 17 | index++; 18 | } 19 | } 20 | printf("\n\n"); 21 | } 22 | // ----------------------------------------------------------------- 23 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_m_a_mata.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add result of complex scalar multiplication on adjoint matrix 3 | // c <-- c + s * bdag 4 | // Just flip i<-->j and negate b.imag 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void c_scalar_mult_sum_mat_adj(matrix *b, complex *s, matrix *c) { 10 | register int i, j; 11 | for (i = 0; i < NCOL; i++) { 12 | for (j = 0; j < NCOL; j++) { 13 | c->e[i][j].real += b->e[j][i].real * s->real + b->e[j][i].imag * s->imag; 14 | c->e[i][j].imag -= b->e[j][i].imag * s->real - b->e[j][i].real * s->imag; 15 | } 16 | } 17 | } 18 | // ----------------------------------------------------------------- 19 | -------------------------------------------------------------------------------- /4d_Q16/libraries/adjoint.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Adjoint of a matrix 3 | // b <-- (+/-)adag 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void adjoint(matrix *a, matrix *b) { 9 | register int i, j; 10 | for (i = 0; i < NCOL; i++) { 11 | for (j = 0; j < NCOL; j++) 12 | CONJG(a->e[j][i], b->e[i][j]); 13 | } 14 | } 15 | 16 | void neg_adjoint(matrix *a, matrix *b) { 17 | register int i, j; 18 | for (i = 0; i < NCOL; i++) { 19 | for (j = 0; j < NCOL; j++) { 20 | b->e[i][j].real = -a->e[j][i].real; 21 | b->e[i][j].imag = a->e[j][i].imag; 22 | } 23 | } 24 | } 25 | // ----------------------------------------------------------------- 26 | -------------------------------------------------------------------------------- /4d_Q16/correlators/params.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Structure for passing simulation parameters to each node 3 | #ifndef _PARAMS_H 4 | #define _PARAMS_H 5 | #include "../include/macros.h" // For MAXFILENAME 6 | 7 | typedef struct { 8 | int stopflag; // 1 if it is time to stop 9 | 10 | // Initialization parameters 11 | int nx, ny, nz, nt; // Lattice dimensions 12 | 13 | // Use Nblock blocks each containing Nmeas measurements 14 | int Nblock, Nmeas; 15 | char cfg[MAX_CFG][MAXFILENAME]; // Lattice file names 16 | 17 | #ifdef SMEAR 18 | // Parameters for APE or stout smearing 19 | int smearflag; // NONE, STOUT, APE 20 | int Nsmear; 21 | Real alpha; 22 | #endif 23 | } params; 24 | #endif 25 | // ----------------------------------------------------------------- 26 | -------------------------------------------------------------------------------- /4d_Q16/libraries/trace.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex trace of the given matrix 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | complex trace(matrix *a) { 8 | register complex tc; 9 | CADD(a->e[0][0], a->e[1][1], tc); 10 | #if (NCOL > 2) 11 | CSUM(tc, a->e[2][2]); 12 | #if (NCOL > 3) 13 | CSUM(tc, a->e[3][3]); 14 | #if (NCOL > 4) 15 | CSUM(tc, a->e[4][4]); 16 | #if (NCOL > 5) 17 | CSUM(tc, a->e[5][5]); 18 | #if (NCOL > 6) 19 | CSUM(tc, a->e[6][6]); 20 | #if (NCOL > 7) 21 | register int i; 22 | for (i = 7; i < NCOL; i++) 23 | CSUM(tc, a->e[i][i]); 24 | #endif 25 | #endif 26 | #endif 27 | #endif 28 | #endif 29 | #endif 30 | return tc; 31 | } 32 | // ----------------------------------------------------------------- 33 | -------------------------------------------------------------------------------- /4d_Q16/libraries/Make_vanilla: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | # Scalar processor compilation for library routines 3 | # Should work for all architectures with a suitable CFLAGS and CC 4 | 5 | # The "fast" variants of the code explicitly unroll loops and inline 6 | # So far, this is only implemented for NCOL=DIMF=3 7 | 8 | MAKEFILE = Make_vanilla 9 | 10 | CC = gcc 11 | OPT = -O3 -Wall 12 | CODETYPE = # -DFAST # Only works if NCOL=DIMF=3 13 | AR = ar 14 | 15 | # Also check include/config.h 16 | # ------------------------------------------------------------------ 17 | 18 | 19 | 20 | # ------------------------------------------------------------------ 21 | # Complete set of compiler flags - do not change 22 | CFLAGS = ${OPT} ${CODETYPE} 23 | 24 | include Make_template 25 | # ------------------------------------------------------------------ 26 | -------------------------------------------------------------------------------- /4d_Q16/include/dirs.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Directions, links, and macros to give their opposites 3 | // MPI communications assume directions from 0 to 7 4 | // !!! TDOWN is the same as DIR_5 -- use goffset to be safe 5 | #ifndef _DIRS_H 6 | #define _DIRS_H 7 | 8 | #define NDIMS 4 // Number of dimensions 9 | #define NODIR -1 // Not a direction 10 | #define XUP 0 11 | #define YUP 1 12 | #define ZUP 2 13 | #define TUP 3 14 | #define TDOWN 4 15 | #define ZDOWN 5 16 | #define YDOWN 6 17 | #define XDOWN 7 18 | #define OPP_DIR(dir) (7 - (dir)) // Opposite spacetime direction 19 | 20 | #define NUMLINK 5 21 | #define NPLAQ 10 // NUMLINK * (NUMLINK - 1 ) / 2 22 | #define DIR_5 4 23 | #define OPP_LDIR(dir) (9 - (dir)) // Opposite link direction 24 | 25 | #endif 26 | // ----------------------------------------------------------------- 27 | -------------------------------------------------------------------------------- /4d_Q16/include/int32type.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Define a type to ensure 32-bit integers for binary file formats 3 | #ifndef _TYPE32_H 4 | #define _TYPE32_H 5 | 6 | #include "../include/config.h" 7 | 8 | // One and only one of SHORT_IS_32BIT and INT_IS_32BIT should be defined 9 | #if defined(SHORT_IS_32BIT) && defined(INT_IS_32BIT) 10 | #error "Can't define both SHORT_IS_32BIT and INT_IS_32BIT in config.h!" 11 | #endif 12 | 13 | #if !defined(SHORT_IS_32BIT) && !defined(INT_IS_32BIT) 14 | #error "Must define one of SHORT_IS_32BIT or INT_IS_32BIT in config.h!" 15 | #endif 16 | 17 | #ifdef SHORT_IS_32BIT 18 | typedef short int32type; 19 | typedef unsigned short u_int32type; 20 | #else 21 | typedef int int32type; 22 | typedef unsigned int u_int32type; 23 | #endif 24 | 25 | #endif 26 | // ----------------------------------------------------------------- 27 | -------------------------------------------------------------------------------- /4d_Q16/libraries/uncmp_ahmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Uncompress an anti-hermitian matrix into a matrix 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | void uncompress_anti_hermitian(anti_hermitmat *src, matrix *dest) { 8 | int i, j, index = 0; 9 | Real tr; 10 | 11 | for (i = 0; i < NCOL; i++) { 12 | dest->e[i][i].imag = src->im_diag[i]; 13 | dest->e[i][i].real = 0.0; 14 | } 15 | for (i = 0; i < NCOL; i++) { 16 | for (j = i + 1; j < NCOL; j++) { 17 | dest->e[i][j].imag = src->m[index].imag; 18 | dest->e[j][i].imag = src->m[index].imag; 19 | 20 | tr = src->m[index].real; 21 | dest->e[i][j].real = tr; 22 | dest->e[j][i].real = -tr; 23 | index++; 24 | } 25 | } 26 | } 27 | // ----------------------------------------------------------------- 28 | -------------------------------------------------------------------------------- /4d_Q16/libraries/Make_mpi: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | # Library routines involve no communication 3 | # Compile as for a scalar processor 4 | # Should work for all architectures with a suitable CFLAGS and CC 5 | 6 | # The "fast" variants of the code explicitly unroll loops and inline 7 | # So far, this is only implemented for NCOL=DIMF=3 8 | 9 | MAKEFILE = Make_mpi 10 | 11 | CC = mpicc 12 | OPT = -O3 -Wall 13 | CODETYPE = # -DFAST # Only works if NCOL=DIMF=3 14 | AR = ar 15 | 16 | # Also check include/config.h 17 | # ------------------------------------------------------------------ 18 | 19 | 20 | 21 | # ------------------------------------------------------------------ 22 | # Complete set of compiler flags - do not change 23 | CFLAGS = ${OPT} ${CODETYPE} 24 | 25 | include Make_template 26 | # ------------------------------------------------------------------ 27 | -------------------------------------------------------------------------------- /4d_Q16/libraries/addmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add matrices -- unlike CSUM, output is always last 3 | // c <-- c + b 4 | // c <-- a + b 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void sum_matrix(matrix *b, matrix *c) { 10 | register int i, j; 11 | for (i = 0; i < NCOL; i++) { 12 | for (j = 0; j < NCOL; j++) { 13 | c->e[i][j].real += b->e[i][j].real; 14 | c->e[i][j].imag += b->e[i][j].imag; 15 | } 16 | } 17 | } 18 | 19 | void add_matrix(matrix *a, matrix *b, matrix *c) { 20 | register int i, j; 21 | for (i = 0; i < NCOL; i++) { 22 | for (j = 0; j < NCOL; j++) { 23 | c->e[i][j].real = a->e[i][j].real + b->e[i][j].real; 24 | c->e[i][j].imag = a->e[i][j].imag + b->e[i][j].imag; 25 | } 26 | } 27 | } 28 | // ----------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /4d_Q16/libraries/submat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Subtract two matrices -- unlike CDIF, output is always last 3 | // c <-- c - b 4 | // c <-- a - b 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void dif_matrix(matrix *b, matrix *c) { 10 | register int i, j; 11 | for (i = 0; i < NCOL; i++) { 12 | for (j = 0; j < NCOL; j++) { 13 | c->e[i][j].real -= b->e[i][j].real; 14 | c->e[i][j].imag -= b->e[i][j].imag; 15 | } 16 | } 17 | } 18 | 19 | void sub_matrix(matrix *a, matrix *b, matrix *c) { 20 | register int i, j; 21 | for (i = 0; i < NCOL; i++) { 22 | for (j = 0; j < NCOL; j++) { 23 | c->e[i][j].real = a->e[i][j].real - b->e[i][j].real; 24 | c->e[i][j].imag = a->e[i][j].imag - b->e[i][j].imag; 25 | } 26 | } 27 | } 28 | // ----------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /4d_Q16/include/loopend.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Redefinition of FORSOMEPARITY for slightly better looping 3 | // macros.h must come first 4 | #ifndef _LOOPEND_H 5 | #define _LOOPEND_H 6 | 7 | #include "../include/macros.h" 8 | #define LOOPEND // We take this as the rule for now 9 | // ----------------------------------------------------------------- 10 | 11 | 12 | 13 | // ----------------------------------------------------------------- 14 | #ifdef LOOPEND 15 | #undef FORSOMEPARITY 16 | #define FORSOMEPARITY(i,s,choice) \ 17 | { register int loopend; \ 18 | loopend= (choice)==EVEN ? even_sites_on_node : sites_on_node ; \ 19 | for( i=((choice)==ODD ? even_sites_on_node : 0 ), s= &(lattice[i]); \ 20 | ie[i][j].real += b->e[j][i].real; 14 | c->e[i][j].imag -= b->e[j][i].imag; 15 | } 16 | } 17 | } 18 | 19 | void add_adj_matrix(matrix *a, matrix *b, matrix *c) { 20 | register int i, j; 21 | for (i = 0; i < NCOL; i++) { 22 | for (j = 0; j < NCOL; j++) { 23 | c->e[i][j].real = a->e[i][j].real + b->e[j][i].real; 24 | c->e[i][j].imag = a->e[i][j].imag - b->e[j][i].imag; 25 | } 26 | } 27 | } 28 | // ----------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /4d_Q16/libraries/realtr.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return real trace of matrix products a * b and adag * b 3 | #include "../include/config.h" 4 | #include "../include/complex.h" 5 | #include "../include/susy.h" 6 | 7 | Real realtrace_nn(matrix *a, matrix *b) { 8 | register int i, j; 9 | register Real sum = 0.0; 10 | 11 | for (i = 0; i < NCOL; i++) { 12 | for(j = 0; j < NCOL; j++) { 13 | sum += a->e[i][j].real * b->e[j][i].real 14 | - a->e[i][j].imag * b->e[j][i].imag; 15 | } 16 | } 17 | return sum; 18 | } 19 | 20 | Real realtrace(matrix *a, matrix *b) { 21 | register int i, j; 22 | register Real sum = 0.0; 23 | 24 | for (i = 0; i < NCOL; i++) { 25 | for(j = 0; j < NCOL; j++) { 26 | sum += a->e[i][j].real * b->e[i][j].real 27 | + a->e[i][j].imag * b->e[i][j].imag; 28 | } 29 | } 30 | return sum; 31 | } 32 | // ----------------------------------------------------------------- 33 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_a_mat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add result of scalar multiplication on matrix 3 | // c <-- a + s * b 4 | // c <-- c + s * b 5 | #include "../include/config.h" 6 | #include "../include/complex.h" 7 | #include "../include/susy.h" 8 | 9 | void scalar_mult_sum_matrix(matrix *b, Real s, matrix *c) { 10 | register int i, j; 11 | for (i = 0; i < NCOL; i++) { 12 | for (j = 0; j < NCOL; j++) { 13 | c->e[i][j].real += s * b->e[i][j].real; 14 | c->e[i][j].imag += s * b->e[i][j].imag; 15 | } 16 | } 17 | } 18 | 19 | void scalar_mult_add_matrix(matrix *a, matrix *b, Real s, matrix *c) { 20 | register int i, j; 21 | for (i = 0; i < NCOL; i++) { 22 | for (j = 0; j < NCOL; j++) { 23 | c->e[i][j].real = a->e[i][j].real + s * b->e[i][j].real; 24 | c->e[i][j].imag = a->e[i][j].imag + s * b->e[i][j].imag; 25 | } 26 | } 27 | } 28 | // ----------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /4d_Q16/generic/io_ansi.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Wrappers for parallel file access using ANSI standard I/O 3 | // These are patterned after stdio fopen, fseek, fwrite, fread, fclose 4 | // Needed in case system doesn't use ANSI standard calls 5 | #include "generic_includes.h" 6 | #include 7 | #include 8 | #include 9 | 10 | FILE *g_open(const char *filename, const char *mode) { 11 | return fopen(filename,mode); 12 | } 13 | 14 | int g_seek(FILE *stream, off_t offset, int whence) { 15 | return fseeko(stream,offset,whence); 16 | } 17 | 18 | size_t g_write(const void *ptr, size_t size, size_t nmemb,FILE *stream) { 19 | return fwrite(ptr,size,nmemb,stream); 20 | } 21 | 22 | size_t g_read(void *ptr, size_t size, size_t nmemb, FILE *stream) { 23 | return fread(ptr,size,nmemb,stream); 24 | } 25 | 26 | int g_close(FILE *stream) { 27 | return fclose(stream); 28 | } 29 | // ----------------------------------------------------------------- 30 | -------------------------------------------------------------------------------- /4d_Q16/libraries/make_ahmat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Compute and compress the traceless anti-hermitian part of a matrix 3 | // dest = 0.5 * (src - src^dag) - Tr[0.5 * (src - src^dag)] 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | void make_anti_hermitian(matrix *src, anti_hermitmat *dest) { 9 | int i, j, index = 0; 10 | Real tr; 11 | 12 | tr = src->e[0][0].imag; 13 | for (i = 1; i < NCOL; i++) 14 | tr += src->e[i][i].imag; 15 | tr /= (Real)NCOL; 16 | 17 | for (i = 0; i < NCOL; i++) 18 | dest->im_diag[i] = src->e[i][i].imag - tr; 19 | 20 | for (i = 0; i < NCOL; i++) { 21 | for (j = i + 1; j < NCOL; j++) { 22 | dest->m[index].real = 0.5 * (src->e[i][j].real - src->e[j][i].real); 23 | dest->m[index].imag = 0.5 * (src->e[i][j].imag + src->e[j][i].imag); 24 | index++; 25 | } 26 | } 27 | } 28 | // ----------------------------------------------------------------- 29 | -------------------------------------------------------------------------------- /2d_Q04/generic/README: -------------------------------------------------------------------------------- 1 | Two-dimensional N=(2,2) supersymmetric Yang--Mills theory 2 | Procedures common to most applications: communications, I/O, data layout, etc. 3 | 4 | # Summary of files in this directory (ignoring symlinks to ../../4d_Q16/susy) 5 | # 0) Files used by all executables 6 | com_vanilla.c -- Serial communications, selected by Makefile 7 | com_mpi.c -- Parallel communications, selected by Makefile 8 | io_lat.c -- I/O modified to handle five-link lattice 9 | io_lat_utils.c -- Lower-level utilities for lattice I/O 10 | io_helpers.c -- Higher-level interface for lattice I/O 11 | make_lattice.c -- Set up lattice, neighbors, etc. 12 | gaugefix.c -- Fix to Coulomb gauge, requiring even number of sites in all directions 13 | layout_hyper_prime.c -- Handle the distribution of lattice sites across processors 14 | 15 | # 1) Additional files used only by pfaffian target (susy_phase) 16 | io_phase.c -- Primitive (for now) dump and load routines for checkpointing pfaffian computations 17 | -------------------------------------------------------------------------------- /1d_Q16/susy/scalar_trace.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure the average value of Tr[X[i] X[i]] / N 3 | // as well as the width sqrt( - ^2) of its distribution 4 | #include "susy_includes.h" 5 | 6 | double scalar_trace(double *Xtr, double *Xwidth) { 7 | register int i, j; 8 | register site *s; 9 | double Xtr_ave = 0.0, XtrSq = 0.0, td; 10 | 11 | for (j = 0; j < NSCALAR; j++) { 12 | Xtr[j] = 0.0; 13 | FORALLSITES(i, s) { 14 | // Take adjoint of first to get rid of overall negative sign 15 | td = realtrace(&(s->X[j]), &(s->X[j])); 16 | Xtr[j] += td; 17 | XtrSq += td * td; 18 | } 19 | Xtr[j] *= one_ov_N / ((double)nt); 20 | g_doublesum(&(Xtr[j])); 21 | Xtr_ave += Xtr[j]; 22 | } 23 | Xtr_ave /= (double)NSCALAR; 24 | XtrSq *= one_ov_N * one_ov_N / ((double)nt * NSCALAR); 25 | g_doublesum(&XtrSq); 26 | *Xwidth = sqrt(XtrSq - Xtr_ave * Xtr_ave); 27 | 28 | return Xtr_ave; 29 | } 30 | // ----------------------------------------------------------------- 31 | -------------------------------------------------------------------------------- /4d_Q16/libraries/gaussrand.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Gaussian distributed random number 3 | // Probability distribution exp(-x * x), so = 1 / 2 4 | // This requires a random number generator, myrand(), 5 | // to return a Real uniformly distributed between zero and one 6 | #include "../include/config.h" 7 | #include 8 | #include "../include/susy.h" 9 | #include "../include/random.h" 10 | 11 | // prn_pt is a pointer passed to myrand() 12 | Real gaussian_rand_no(double_prn *prn_pt) { 13 | static int iset = 0; 14 | static Real gset; 15 | Real fac, r, v1, v2; 16 | 17 | if (iset == 0) { 18 | do { 19 | v1 = 2.0 * myrand(prn_pt) - 1.0; // [-1, 1] 20 | v2 = 2.0 * myrand(prn_pt) - 1.0; 21 | r = v1 * v1 + v2 * v2; 22 | } while (r >= 1.0); 23 | fac = sqrt(-log((double)r) / (double)r); 24 | gset = v1 * fac; 25 | iset = 1; 26 | return v2 * fac; 27 | } 28 | else { 29 | iset = 0; 30 | return gset; 31 | } 32 | } 33 | // ----------------------------------------------------------------- 34 | -------------------------------------------------------------------------------- /4d_Q16/generic/remap_stdio_from_args.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // In case input and output redirection is not an option 3 | // Usage: cmd [stdin [stdout [stderr]]] 4 | #include "generic_includes.h" 5 | 6 | int remap_stdio_from_args(int argc, char *argv[]) { 7 | FILE *fp; 8 | 9 | // stdin is remapped only on node 0 on any machine 10 | if (argc > 1 && mynode() == 0) { 11 | fp = freopen(argv[1], "r", stdin); 12 | if (fp == NULL) { 13 | node0_printf("Can't open stdin file %s for reading.\n", argv[1]); 14 | return 1; 15 | } 16 | } 17 | if (argc > 2) { 18 | fp = freopen(argv[2], "w", stdout); 19 | if (fp == NULL) { 20 | node0_printf("Can't open stdout file %s for writing\n", argv[2]); 21 | return 1; 22 | } 23 | } 24 | if (argc > 3) { 25 | fp = freopen(argv[3], "w", stderr); 26 | if (fp == NULL) { 27 | node0_printf("Can't open stderr file %s for writing\n", argv[3]); 28 | return 1; 29 | } 30 | } 31 | return 0; 32 | } 33 | // ----------------------------------------------------------------- 34 | -------------------------------------------------------------------------------- /4d_Q16/include/check_malloc.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | #ifndef CHECK_MALLOC_H 3 | #define CHECK_MALLOC_H 4 | 5 | #ifdef CHECK_MALLOC 6 | static void * _malloc_ptr; 7 | 8 | #define malloc(_size) \ 9 | (( (_malloc_ptr = malloc(_size)), \ 10 | (this_node == 0 ? \ 11 | printf("%x = malloc(%d) %s:%d\n",_malloc_ptr,_size,__func__,__LINE__) \ 12 | && fflush(stdout) : 0 )), _malloc_ptr) 13 | 14 | #define realloc(_ptr,_size) \ 15 | (( (_malloc_ptr = realloc(_ptr,_size)), \ 16 | (this_node == 0 ? \ 17 | printf("%x = realloc(%x,%d) %s:%d\n",_malloc_ptr,_ptr,_size,__func__,__LINE__) \ 18 | && fflush(stdout) : 0 )), _malloc_ptr) 19 | 20 | #define calloc(_nelem,_elsize) \ 21 | (( (_malloc_ptr = calloc(_nelem,_elsize)), \ 22 | (this_node == 0 ? \ 23 | printf("%x = calloc(%d,%d) %s:%d\n",_malloc_ptr,_nelem,_elsize,__func__,__LINE__) \ 24 | && fflush(stdout) : 0 )), _malloc_ptr) 25 | 26 | #define free(_ptr) {\ 27 | node0_printf("free(%x) %s:%d\n",_ptr,__func__,__LINE__); \ 28 | fflush(stdout); \ 29 | free(_ptr); } 30 | #endif 31 | 32 | #endif 33 | // ----------------------------------------------------------------- 34 | -------------------------------------------------------------------------------- /4d_Q16/susy/remez/README: -------------------------------------------------------------------------------- 1 | This directory contains a SUSY LATTICE interface to an implementation of the Remez algorithm. 2 | It is adapted from an interface written by Doug Toussaint (dated 5/10/06) based on ``test'' code by Kate Clark using alg_remez.C. 3 | A more recent version of this code (to consult for information about the algorithm and implementation itself, including its current caveats and limitations) may be found at 4 | https://github.com/maddyscientist/AlgRemez 5 | 6 | This software requires GMP, the GNU Multiple Precision Library. 7 | The Makefile may need to be modified to link against GMP. 8 | 9 | The main program is in poly.C, and calls the function generateApprox in alg_remez.C. 10 | As detailed by the inline documentation, poly.C calculates and prints rational approximations to the fourth- and eighth-root functions we need, divided into Nroot number of additional roots. 11 | 12 | Compilation: Run `make`. Only compile and run in serial. 13 | 14 | Usage: poly < [params_in_file] > [params_rhmc_file] 15 | 16 | Where params_in_file contains 17 | Nroot MD_order action_order eval_min eval_max precision 18 | Example: 19 | 2 15 15 0.0000001 1500 65 20 | -------------------------------------------------------------------------------- /4d_Q16/susy/ploop_corr.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Compute Polyakov loop at each spatial site, for correlator 3 | // Use tempmat, tempmat2 and staple for temporary storage 4 | #include "susy_includes.h" 5 | 6 | void ploop_c() { 7 | #ifdef PL_CORR 8 | register int i; 9 | register site *s; 10 | int t; 11 | 12 | FORALLSITES(i, s) 13 | mat_copy(&(s->link[TUP]), &(tempmat[i])); 14 | 15 | for (t = 1; t < nt; t++) { 16 | shiftmat(tempmat, tempmat2, goffset[TUP]); 17 | FORALLSITES(i, s) { 18 | mat_copy(&(tempmat2[i]), &(tempmat[i])); 19 | if (s->t != 0) 20 | continue; 21 | if (t == 1) 22 | mult_nn(&(s->link[TUP]), (matrix *)gen_pt[0][i], &(staple[i])); 23 | else { 24 | mult_nn(&(staple[i]), (matrix *)gen_pt[0][i], &(tempmat[i])); 25 | mat_copy(&(tempmat[i]), &(staple[i])); 26 | } 27 | } 28 | } 29 | FORALLSITES(i, s) { 30 | if (s->t != 0) 31 | continue; 32 | 33 | s->ploop_corr = trace(&(staple[i])); 34 | CMULREAL((s->ploop_corr), one_ov_N, (s->ploop_corr)); 35 | } 36 | #endif 37 | } 38 | // ----------------------------------------------------------------- 39 | -------------------------------------------------------------------------------- /1d_Q16/generic/README: -------------------------------------------------------------------------------- 1 | One-dimensional 16-supercharge Yang--Mills (BFSS/BMN) theories 2 | Procedures common to most applications: communications, I/O, data layout, etc. 3 | 4 | # Summary of files in this directory (ignoring symlinks to ../../4d_Q16/susy) 5 | # 0) Files used by all executables 6 | com_vanilla.c -- Serial communications, selected by Makefile 7 | com_mpi.c -- Parallel communications, selected by Makefile 8 | io_lat.c -- I/O modified to handle five-link lattice 9 | io_lat_utils.c -- Lower-level utilities for lattice I/O 10 | io_helpers.c -- Higher-level interface for lattice I/O 11 | make_lattice.c -- Set up lattice, neighbors, etc. 12 | nersc_cksum.c -- Compute link trace sum for lattice I/O (cksum itself set to zero) 13 | layout_hyper_prime.c -- Handle the distribution of lattice sites across processors 14 | check_antihermity.c -- Check anti-hermiticity of the scalar matrices 15 | reantihermize.c -- Reanti-hermitize the scalar matrices 16 | check_unitarity.c -- Check unitarity of the link matrices 17 | reunitarize.c -- Reunitarize the link matrices 18 | 19 | # 1) Additional files used only by pfaffian target (susy_phase) 20 | io_phase.c -- Primitive (for now) dump and load routines for checkpointing pfaffian computations 21 | -------------------------------------------------------------------------------- /4d_Q16/libraries/cs_m_a_amat.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Add or subtract result of adjoint of complex scalar multiplication on matrix 3 | // c <-- c + (s * b)dag 4 | // c <-- c - (s * b)dag 5 | // (s * b).real = s.real * b.real - s.imag * b.imag 6 | // (s * b).imag = s.imag * b.real + s.real * b.imag 7 | // Then flip i<-->j and negate (s * b).imag 8 | #include "../include/config.h" 9 | #include "../include/complex.h" 10 | #include "../include/susy.h" 11 | 12 | void c_scalar_mult_sum_adj_mat(matrix *b, complex *s, matrix *c) { 13 | register int i, j; 14 | for (i = 0; i < NCOL; i++) { 15 | for (j = 0; j < NCOL; j++) { 16 | c->e[i][j].real += b->e[j][i].real * s->real - b->e[j][i].imag * s->imag; 17 | c->e[i][j].imag -= b->e[j][i].imag * s->real + b->e[j][i].real * s->imag; 18 | } 19 | } 20 | } 21 | 22 | void c_scalar_mult_dif_adj_mat(matrix *b, complex *s, matrix *c) { 23 | register int i, j; 24 | for (i = 0; i < NCOL; i++) { 25 | for (j = 0; j < NCOL; j++) { 26 | c->e[i][j].real -= b->e[j][i].real * s->real - b->e[j][i].imag * s->imag; 27 | c->e[i][j].imag += b->e[j][i].imag * s->real + b->e[j][i].real * s->imag; 28 | } 29 | } 30 | } 31 | // ----------------------------------------------------------------- 32 | -------------------------------------------------------------------------------- /4d_Q16/susy/block_mcrg.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Blocking function for MCRG 3 | // Just multiplies together "neighboring" links separated by 2^block sites 4 | // Saves all 2^d products in sub-lattices of original gauge configuration 5 | // Overwrite links, use site->mom for temporary storage 6 | #include "susy_includes.h" 7 | 8 | void block_mcrg(int block) { 9 | register int dir, i; 10 | register site *s; 11 | int disp[NDIMS], j, bl = 1; 12 | msg_tag *tag; 13 | 14 | // Set number of links to stride, bl = 2^(block - 1) 15 | for (j = 1; j < block; j++) 16 | bl *= 2; 17 | FORALLDIR(dir) { 18 | for (j = 0; j < NDIMS; j++) 19 | disp[j] = bl * offset[dir][j]; 20 | 21 | tag = start_general_gather_site(F_OFFSET(link[dir]), sizeof(matrix), 22 | disp, EVENANDODD, gen_pt[0]); 23 | wait_general_gather(tag); 24 | 25 | FORALLSITES(i, s) 26 | mult_nn(&(s->link[dir]), (matrix *)(gen_pt[0][i]), &(s->mom[dir])); 27 | cleanup_general_gather(tag); 28 | } 29 | 30 | // Overwrite original links 31 | FORALLSITES(i, s) { 32 | FORALLDIR(dir) 33 | mat_copy(&(s->mom[dir]), &(s->link[dir])); 34 | } 35 | } 36 | // ----------------------------------------------------------------- 37 | -------------------------------------------------------------------------------- /4d_Q16/correlators/defines.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Compiler macros common to all targets in this application 3 | #ifndef _DEFINES_H 4 | #define _DEFINES_H 5 | 6 | //#define TIMING // Not currently used 7 | // ----------------------------------------------------------------- 8 | 9 | 10 | 11 | // ----------------------------------------------------------------- 12 | // Susy stuff 13 | //#define DEBUG_CHECK // Print lambdas, offsets, etc. 14 | 15 | // Whether or not to project determinant out of given observable 16 | #define NODET 0 17 | #define YESDET 1 18 | // ----------------------------------------------------------------- 19 | 20 | 21 | 22 | // ----------------------------------------------------------------- 23 | // Measurement stuff 24 | // Threshold to print warning about non-zero imaginary components 25 | // of quantities expected to be real 26 | #define IMAG_TOL 1.0e-8 27 | #define SQ_TOL 1.0e-16 28 | 29 | // Maximum time value and spatial distance for Wilson loops 30 | #define MAX_T (nt / 2) 31 | #define MAX_X (nx / 2 - 1) 32 | 33 | // Enough for 16^4, but would need to be increased for larger L 34 | #define MAX_pts 48 35 | 36 | // Maximum number of lattices we can load 37 | #define MAX_CFG 512 38 | #endif 39 | // ----------------------------------------------------------------- 40 | -------------------------------------------------------------------------------- /1d_Q16/susy/ploop.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Evaluate the Polyakov loop using repeated single-timeslice gathers 3 | // Use tempmat and tempmat2 for temporary storage 4 | #include "susy_includes.h" 5 | 6 | complex ploop() { 7 | register int i, index = node_index(0); 8 | register site *s; 9 | int t; 10 | complex plp = cmplx(0.0, 0.0); 11 | matrix tmat; 12 | 13 | // Special case: nt == 1 (i.e., a single-site 'lattice', s=0) 14 | if (nt == 1) { 15 | plp = trace(&(lattice[index].link)); 16 | return plp; 17 | } 18 | 19 | // Compute line by steadily shifting links to hyperplane 0 20 | FORALLSITES(i, s) 21 | mat_copy(&(s->link), &(tempmat[i])); 22 | 23 | for (t = 1; t < nt; t++) { 24 | shiftmat(tempmat, tempmat2, TUP); 25 | if (t == 1) 26 | mult_nn(&(lattice[index].link), &(tempmat[index]), &tmat); 27 | else { 28 | mult_nn(&tmat, &(tempmat[index]), &(tempmat2[index])); 29 | mat_copy(&(tempmat2[index]), &tmat); 30 | } 31 | } 32 | if (mynode() == node_number(0)) 33 | plp = trace(&tmat); 34 | g_sync(); 35 | g_complexsum(&plp); // Broadcast same value to all nodes 36 | 37 | // Kill off roundoff for NCOL=2 38 | if (fabs(plp.imag) < IMAG_TOL) 39 | plp.imag = 0.0; 40 | 41 | return plp; 42 | } 43 | // ----------------------------------------------------------------- 44 | -------------------------------------------------------------------------------- /1d_Q16/generic/nersc_cksum.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Computes the mean global sum of the trace of the gauge links 3 | // Used to aid checking lattice file integrity 4 | // chksum itself is set to zero 5 | #include "generic_includes.h" 6 | // ----------------------------------------------------------------- 7 | 8 | 9 | 10 | // ----------------------------------------------------------------- 11 | u_int32type nersc_cksum() { 12 | u_int32type chksum = 0; 13 | return chksum; 14 | } 15 | // ----------------------------------------------------------------- 16 | 17 | 18 | 19 | // ----------------------------------------------------------------- 20 | void sum_linktr(double_complex *linktrsum) { 21 | int i; 22 | site *s; 23 | matrix *a; 24 | 25 | linktrsum->real = 0.0; 26 | linktrsum->imag = 0.0; 27 | 28 | FORALLSITES(i, s) { 29 | a = &(s->link); 30 | CSUM(*linktrsum, a->e[0][0]); 31 | CSUM(*linktrsum, a->e[1][1]); 32 | #if (NCOL > 2) 33 | CSUM(*linktrsum, a->e[2][2]); 34 | #if (NCOL > 3) 35 | CSUM(*linktrsum, a->e[3][3]); 36 | #if (NCOL > 4) 37 | int j; 38 | for (j = 4; j < NCOL; j++) 39 | CSUM(*linktrsum, a->e[j][j]); 40 | #endif 41 | #endif 42 | #endif 43 | } 44 | 45 | g_dcomplexsum(linktrsum); 46 | CDIVREAL(*linktrsum, nt, *linktrsum); 47 | } 48 | // ----------------------------------------------------------------- 49 | -------------------------------------------------------------------------------- /2d_Q04/susy/plaq.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure average space--space and space--time plaquettes 3 | // Use tempmat for temporary storage 4 | #include "susy_includes.h" 5 | 6 | void plaquette(double *plaq) { 7 | register int i; 8 | register site *s; 9 | double sum = 0.0; 10 | msg_tag *mtag0, *mtag1; 11 | matrix tmat; 12 | 13 | // We can exploit a symmetry under TUP<-->XUP 14 | // gen_pt[0] is U_b(x+a), gen_pt[1] is U_a(x+b) 15 | mtag0 = start_gather_site(F_OFFSET(link[XUP]), sizeof(matrix), 16 | goffset[TUP], EVENANDODD, gen_pt[0]); 17 | mtag1 = start_gather_site(F_OFFSET(link[TUP]), sizeof(matrix), 18 | goffset[XUP], EVENANDODD, gen_pt[1]); 19 | 20 | // tempmat = Udag_b(x) U_a(x) 21 | FORALLSITES(i, s) 22 | mult_an(&(s->link[XUP]), &(s->link[TUP]), &(tempmat)[i]); 23 | 24 | // Compute tr[Udag_a(x+b) Udag_b(x) U_a(x) U_b(x+a)] 25 | wait_gather(mtag0); 26 | wait_gather(mtag1); 27 | FORALLSITES(i, s) { 28 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 29 | sum += (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 30 | } 31 | cleanup_gather(mtag0); 32 | cleanup_gather(mtag1); 33 | g_doublesum(&sum); 34 | 35 | // Average over volume 36 | *plaq = sum / ((double)volume); 37 | } 38 | // ----------------------------------------------------------------- 39 | -------------------------------------------------------------------------------- /4d_Q16/generic/README: -------------------------------------------------------------------------------- 1 | Four-dimensional N=4 supersymmetric Yang--Mills theory 2 | Procedures common to most applications: communications, I/O, data layout, etc. 3 | 4 | # Summary of files in this directory 5 | # 0) Files used by all executables 6 | com_vanilla.c -- Serial communications, selected by Makefile 7 | com_mpi.c -- Parallel communications, selected by Makefile 8 | io_lat.c -- I/O modified to handle five-link lattice 9 | io_lat_utils.c -- Lower-level utilities for lattice I/O 10 | io_helpers.c -- Higher-level interface for lattice I/O 11 | make_lattice.c -- Set up lattice, neighbors, etc. 12 | nersc_cksum.c -- Compute link trace sum for lattice I/O (cksum itself set to zero) 13 | ranstuff.c -- Random number stuff, both for serial and parallel running 14 | gaugefix.c -- Fix to Coulomb gauge, requiring even number of sites in all directions 15 | remap_stdio_from_args.c -- For reading input parameters 16 | layout_hyper_prime.c -- Handle the distribution of lattice sites across processors 17 | 18 | # 1) Additional files used only by pfaffian target (susy_phase) 19 | io_phase.c -- Primitive (for now) dump and load routines for checkpointing pfaffian computations 20 | 21 | # 2) Files not currently used, retained for potential future testing 22 | restrict_fourier.c -- Fast Fourier transform (FFT) routine used with ploop_corr.c 23 | -------------------------------------------------------------------------------- /1d_Q16/susy/defines.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Compiler macros common to all targets in this application 3 | #ifndef _DEFINES_H 4 | #define _DEFINES_H 5 | 6 | #define SITERAND // Use site-based random number generators 7 | //#define TIMING // Not currently used 8 | // ----------------------------------------------------------------- 9 | 10 | 11 | 12 | // ----------------------------------------------------------------- 13 | // Integrator stuff 14 | // Omelyan lambda, 2lambda and 1 - 2lambda 15 | #define LAMBDA 0.193 16 | #define TWO_LAMBDA 0.386 17 | #define LAMBDA_MID 0.614 18 | // ----------------------------------------------------------------- 19 | 20 | 21 | 22 | // ----------------------------------------------------------------- 23 | // Susy stuff 24 | #define BMN 25 | //#define DEBUG_CHECK // Print lambdas, offsets, etc. 26 | // ----------------------------------------------------------------- 27 | 28 | 29 | 30 | // ----------------------------------------------------------------- 31 | // Measurement stuff 32 | // Threshold to print warning about non-zero imaginary components 33 | // of quantities expected to be real 34 | #define IMAG_TOL 1.0e-8 35 | #define SQ_TOL 1.0e-16 36 | 37 | // Maximum time value and spatial distance for Wilson loops 38 | #define MAX_T (nt / 2) 39 | #endif 40 | // ----------------------------------------------------------------- 41 | -------------------------------------------------------------------------------- /4d_Q16/generic/nersc_cksum.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Computes the mean global sum of the trace of the gauge links 3 | // Used to aid checking lattice file integrity 4 | // chksum itself is set to zero 5 | #include "generic_includes.h" 6 | // ----------------------------------------------------------------- 7 | 8 | 9 | 10 | // ----------------------------------------------------------------- 11 | u_int32type nersc_cksum() { 12 | u_int32type chksum = 0; 13 | return chksum; 14 | } 15 | // ----------------------------------------------------------------- 16 | 17 | 18 | 19 | // ----------------------------------------------------------------- 20 | void sum_linktr(double_complex *linktrsum) { 21 | int i, dir; 22 | site *s; 23 | matrix *a; 24 | 25 | linktrsum->real = 0.0; 26 | linktrsum->imag = 0.0; 27 | 28 | FORALLSITES(i, s) { 29 | FORALLUPDIR(dir) { 30 | a = &(s->link[dir]); 31 | CSUM(*linktrsum, a->e[0][0]); 32 | CSUM(*linktrsum, a->e[1][1]); 33 | #if (NCOL > 2) 34 | CSUM(*linktrsum, a->e[2][2]); 35 | #if (NCOL > 3) 36 | CSUM(*linktrsum, a->e[3][3]); 37 | #if (NCOL > 4) 38 | int j; 39 | for (j = 4; j < NCOL; j++) 40 | CSUM(*linktrsum, a->e[j][j]); 41 | #endif 42 | #endif 43 | #endif 44 | } 45 | } 46 | 47 | g_dcomplexsum(linktrsum); 48 | CDIVREAL(*linktrsum, (NDIMS * volume), *linktrsum); 49 | } 50 | // ----------------------------------------------------------------- 51 | -------------------------------------------------------------------------------- /4d_Q16/libraries/byterevn.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Byte reversal routines 3 | // WARNING: Must be compiled with appropriate short32 flag! 4 | #include "../include/config.h" 5 | #include "../include/int32type.h" 6 | #include 7 | // ----------------------------------------------------------------- 8 | 9 | 10 | 11 | // ----------------------------------------------------------------- 12 | // Byte reversal on n contiguous 32-bit words 13 | void byterevn(int32type w[], int n) { 14 | register int32type old,newv; 15 | int j; 16 | 17 | assert(sizeof(int32type) == 4); 18 | for (j = 0; j < n; j++) { 19 | old = w[j]; 20 | newv = old >> 24 & 0x000000ff; 21 | newv |= old >> 8 & 0x0000ff00; 22 | newv |= old << 8 & 0x00ff0000; 23 | newv |= old << 24 & 0xff000000; 24 | w[j] = newv; 25 | } 26 | } 27 | // ----------------------------------------------------------------- 28 | 29 | 30 | 31 | // ----------------------------------------------------------------- 32 | // Byte reversal on n contiguous 32-bit words 33 | void byterevn64(int32type w[], int n) { 34 | int32type tmp; 35 | int j; 36 | 37 | assert(sizeof(int32type) == 4); 38 | // First swap pairs of 32-bit words 39 | for (j = 0; j < n; j++) { 40 | tmp = w[2 * j]; 41 | w[2 * j] = w[2 * j + 1]; 42 | w[2 * j + 1] = tmp; 43 | } 44 | 45 | // Then swap bytes in 32-bit words 46 | byterevn(w, 2 * n); 47 | } 48 | // ----------------------------------------------------------------- 49 | -------------------------------------------------------------------------------- /4d_Q16/include/config.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Collect macros for preprocessor tweaks 3 | // Accommodate differences in compilers, architecture and OS 4 | // NOT generated automatically by configure 5 | #ifndef _CONFIG_H 6 | #define _CONFIG_H 7 | // ----------------------------------------------------------------- 8 | 9 | 10 | 11 | // ----------------------------------------------------------------- 12 | // Compiler/processor-dependent macros 13 | /* Specify the unsigned 32 bit integer base type for this compiler */ 14 | /* Run the script "getint.sh" to find out what to use */ 15 | /* One and only one of these should be defined */ 16 | #define INT_IS_32BIT 1 /* Most present systems */ 17 | #undef SHORT_IS_32BIT /* Needed on T3E UNICOS, for example */ 18 | // ----------------------------------------------------------------- 19 | 20 | 21 | 22 | // ----------------------------------------------------------------- 23 | // Compiler/OS-dependent macros 24 | // Define if ieeefp.h exists 25 | // Most systems don't have this 26 | //#define HAVE_IEEEFP_H 1 27 | 28 | // Define if unistd.h exists 29 | // Most systems have this (exception: NT) 30 | #define HAVE_UNISTD_H 1 31 | 32 | // Define if exists 33 | // Most systems have this 34 | #define HAVE_SYS_TIME_H 1 35 | 36 | // Define if ANSI "fseeko" present 37 | // Most systems have this (exceptions: T3E UNICOS) 38 | #define HAVE_FSEEKO 1 39 | 40 | #endif 41 | // ----------------------------------------------------------------- 42 | -------------------------------------------------------------------------------- /4d_Q16/correlators/Make_mpi: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | MAKEFILE = Make_mpi 3 | 4 | MPP = true 5 | PRECISION = 2 6 | CC = mpicc 7 | OPT = -O3 -Wall -fno-strict-aliasing 8 | CLFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE64 9 | # Large files gcc only 10 | MACHINE_DEP_IO = io_ansi.o 11 | 12 | LD = ${CC} 13 | LIBADD = 14 | INLINEOPT = -DINLINE # -DC_GLOBAL_INLINE # -DSSE_GLOBAL_INLINE -DC_INLINE 15 | CTIME = # -DCGTIME -DFFTIME -DLLTIME -DGFTIME -DREMAP 16 | CPROF = 17 | CDEBUG = 18 | CODETYPE = ${CTIME} ${CPROF} ${CDEBUG} 19 | 20 | MAKELIBRARIES = Make_mpi 21 | 22 | # Also check include/config.h 23 | # ------------------------------------------------------------------ 24 | 25 | 26 | 27 | # ------------------------------------------------------------------ 28 | # Stuff below shouldn't change 29 | ifeq ($(strip ${MPP}),true) 30 | COMMTYPE = MPI 31 | COMMPKG = com_mpi.o 32 | else 33 | COMMTYPE = SINGLE 34 | COMMPKG = com_vanilla.o 35 | endif 36 | 37 | PREC = -DPRECISION=${PRECISION} 38 | 39 | # Complete set of compiler flags - do not change 40 | CFLAGS = ${OPT} -D${COMMTYPE} ${CODETYPE} ${INLINEOPT} \ 41 | ${PREC} ${CLFS} -I${MYINCLUDEDIR} ${DEFINES} ${DARCH} 42 | 43 | ILIB = ${LIBADD} 44 | 45 | check: 46 | make -f Make_test check 47 | 48 | test_clean: 49 | make -f Make_test test_clean 50 | 51 | include Make_template 52 | # ------------------------------------------------------------------ 53 | -------------------------------------------------------------------------------- /4d_Q16/correlators/Make_scalar: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | MAKEFILE = Make_scalar 3 | 4 | MPP = 5 | PRECISION = 2 6 | CC = gcc #-pg 7 | OPT = -O3 -DP4 -Wall -fno-strict-aliasing 8 | CLFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE64 9 | # Large files gcc only 10 | MACHINE_DEP_IO = io_ansi.o 11 | 12 | LD = ${CC} 13 | LIBADD = 14 | INLINEOPT = # -DC_GLOBAL_INLINE # -DSSE_GLOBAL_INLINE -DC_INLINE 15 | CTIME = # -DCGTIME -DFFTIME -DLLTIME -DGFTIME -DREMAP 16 | CPROF = 17 | CDEBUG = 18 | CODETYPE = ${CTIME} ${CPROF} ${CDEBUG} 19 | 20 | MAKELIBRARIES = Make_vanilla 21 | 22 | # Also check include/config.h 23 | # ------------------------------------------------------------------ 24 | 25 | 26 | 27 | # ------------------------------------------------------------------ 28 | # Stuff below shouldn't change 29 | ifeq ($(strip ${MPP}),true) 30 | COMMTYPE = MPI 31 | COMMPKG = com_mpi.o 32 | else 33 | COMMTYPE = SINGLE 34 | COMMPKG = com_vanilla.o 35 | endif 36 | 37 | PREC = -DPRECISION=${PRECISION} 38 | 39 | # Complete set of compiler flags - do not change 40 | CFLAGS = ${OPT} -D${COMMTYPE} ${CODETYPE} ${INLINEOPT} \ 41 | ${PREC} ${CLFS} -I${MYINCLUDEDIR} ${DEFINES} ${DARCH} 42 | 43 | ILIB = ${LIBADD} 44 | 45 | check: 46 | make -f Make_test check 47 | 48 | test_clean: 49 | make -f Make_test test_clean 50 | 51 | include Make_template 52 | # ------------------------------------------------------------------ 53 | -------------------------------------------------------------------------------- /2d_Q04/susy/tr_xsq.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure Tr[X^2] / N and Tr([X_t, X_x]^2) / N 3 | // Here X is the scalar field 4 | // from the log of hermitian part of the polar decomposition 5 | // Seems surprisingly sensitive to stout smearing 6 | #include "susy_includes.h" 7 | 8 | void tr_xsq() { 9 | register int i, dir; 10 | register site *s; 11 | double norm = 1.0 / ((double)(NUMLINK * volume * NCOL)); 12 | double norm_comm = 1.0 / ((double)(volume * NCOL)); 13 | complex tc, tr_xsq = cmplx(0.0, 0.0), tr_x_comm = cmplx(0.0, 0.0); 14 | matrix X[NDIMS], tmat; 15 | 16 | FORALLSITES(i, s) { 17 | FORALLDIR(dir) { 18 | polar(&(s->link[dir]), &(X[dir]), &tmat); 19 | matrix_log(&tmat, &(X[dir])); 20 | tc = complextrace_nn(&(X[dir]), &(X[dir])); 21 | CSUM(tr_xsq, tc); 22 | } 23 | mult_nn(&(X[0]), &(X[1]), &tmat); 24 | mult_nn_dif(&(X[1]), &(X[0]), &tmat); 25 | tc = complextrace_nn(&tmat, &tmat); 26 | CSUM(tr_x_comm, tc); 27 | } 28 | CMULREAL(tr_xsq, norm, tr_xsq); 29 | g_complexsum(&tr_xsq); 30 | CMULREAL(tr_x_comm, norm_comm, tr_x_comm); 31 | g_complexsum(&tr_x_comm); 32 | 33 | if (fabs(tr_xsq.imag) > IMAG_TOL) 34 | node0_printf("WARNING Im(tr_xsq) = %.4g\n", tr_xsq.imag); 35 | if (fabs(tr_x_comm.imag) > IMAG_TOL) 36 | node0_printf("WARNING Im(tr_x_comm) = %.4g\n", tr_x_comm.imag); 37 | 38 | node0_printf("TR_XSQ %.8g\n", tr_xsq.real); 39 | node0_printf("TR_X_COMM %.8g\n", tr_x_comm.real); 40 | } 41 | // ----------------------------------------------------------------- 42 | -------------------------------------------------------------------------------- /4d_Q16/susy/Make_mpi: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | MAKEFILE = Make_mpi 3 | 4 | MPP = true 5 | PRECISION = 2 6 | CC = mpicc 7 | OPT = -O3 -Wall -fno-strict-aliasing 8 | CLFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE64 9 | # Large files gcc only 10 | MACHINE_DEP_IO = io_ansi.o 11 | 12 | LD = ${CC} 13 | PLIB = ../PRIMME/libzprimme.a 14 | LIBADD = 15 | INLINEOPT = -DINLINE # -DC_GLOBAL_INLINE # -DSSE_GLOBAL_INLINE -DC_INLINE 16 | CTIME = # -DCGTIME -DFFTIME -DLLTIME -DGFTIME -DREMAP 17 | CPROF = 18 | CDEBUG = 19 | CODETYPE = ${CTIME} ${CPROF} ${CDEBUG} 20 | 21 | MAKELIBRARIES = Make_mpi 22 | 23 | # Also check include/config.h 24 | # ------------------------------------------------------------------ 25 | 26 | 27 | 28 | # ------------------------------------------------------------------ 29 | # Stuff below shouldn't change 30 | ifeq ($(strip ${MPP}),true) 31 | COMMTYPE = MPI 32 | COMMPKG = com_mpi.o 33 | else 34 | COMMTYPE = SINGLE 35 | COMMPKG = com_vanilla.o 36 | endif 37 | 38 | PREC = -DPRECISION=${PRECISION} 39 | 40 | # Complete set of compiler flags - do not change 41 | CFLAGS = ${OPT} -D${COMMTYPE} ${CODETYPE} ${INLINEOPT} \ 42 | ${PREC} ${CLFS} -I${MYINCLUDEDIR} ${DEFINES} ${DARCH} 43 | 44 | ILIB = ${LIBADD} 45 | 46 | check: 47 | make -f Make_test check 48 | 49 | test_clean: 50 | make -f Make_test test_clean 51 | 52 | include Make_template 53 | # ------------------------------------------------------------------ 54 | -------------------------------------------------------------------------------- /4d_Q16/susy/Make_scalar: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------ 2 | MAKEFILE = Make_scalar 3 | 4 | MPP = 5 | PRECISION = 2 6 | CC = gcc #-pg 7 | OPT = -O3 -DP4 -Wall -fno-strict-aliasing 8 | CLFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE64 9 | # Large files gcc only 10 | MACHINE_DEP_IO = io_ansi.o 11 | 12 | LD = ${CC} 13 | PLIB = ../PRIMME/libzprimme.a 14 | LIBADD = 15 | INLINEOPT = # -DC_GLOBAL_INLINE # -DSSE_GLOBAL_INLINE -DC_INLINE 16 | CTIME = # -DCGTIME -DFFTIME -DLLTIME -DGFTIME -DREMAP 17 | CPROF = 18 | CDEBUG = 19 | CODETYPE = ${CTIME} ${CPROF} ${CDEBUG} 20 | 21 | MAKELIBRARIES = Make_vanilla 22 | 23 | # Also check include/config.h 24 | # ------------------------------------------------------------------ 25 | 26 | 27 | 28 | # ------------------------------------------------------------------ 29 | # Stuff below shouldn't change 30 | ifeq ($(strip ${MPP}),true) 31 | COMMTYPE = MPI 32 | COMMPKG = com_mpi.o 33 | else 34 | COMMTYPE = SINGLE 35 | COMMPKG = com_vanilla.o 36 | endif 37 | 38 | PREC = -DPRECISION=${PRECISION} 39 | 40 | # Complete set of compiler flags - do not change 41 | CFLAGS = ${OPT} -D${COMMTYPE} ${CODETYPE} ${INLINEOPT} \ 42 | ${PREC} ${CLFS} -I${MYINCLUDEDIR} ${DEFINES} ${DARCH} 43 | 44 | ILIB = ${LIBADD} 45 | 46 | check: 47 | make -f Make_test check 48 | 49 | test_clean: 50 | make -f Make_test test_clean 51 | 52 | include Make_template 53 | # ------------------------------------------------------------------ 54 | -------------------------------------------------------------------------------- /4d_Q16/susy/z2source.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // For mode number computations, at all sites 3 | // construct a simple Z2 random Twist_Fermion z_rand 4 | #include "susy_includes.h" 5 | 6 | void Z2source() { 7 | register int i, j, mu; 8 | register site *s; 9 | complex rand; 10 | 11 | FORALLSITES(i, s) { 12 | clear_TF(&(z_rand[i])); 13 | for (j = 0; j < DIMF; j++) { // Site fermions 14 | #ifdef SITERAND 15 | rand.real = Z2_rand_no(&(s->site_prn)); 16 | rand.imag = Z2_rand_no(&(s->site_prn)); 17 | #else 18 | rand.real = Z2_rand_no(&node_prn); 19 | rand.imag = Z2_rand_no(&node_prn); 20 | #endif 21 | c_scalar_mult_sum_mat(&(Lambda[j]), &rand, &(z_rand[i].Fsite)); 22 | FORALLDIR(mu) { // Link fermions 23 | #ifdef SITERAND 24 | rand.real = Z2_rand_no(&(s->site_prn)); 25 | rand.imag = Z2_rand_no(&(s->site_prn)); 26 | #else 27 | rand.real = Z2_rand_no(&node_prn); 28 | rand.imag = Z2_rand_no(&node_prn); 29 | #endif 30 | c_scalar_mult_sum_mat(&(Lambda[j]), &rand, &(z_rand[i].Flink[mu])); 31 | } 32 | for (mu = 0; mu < NPLAQ; mu++) { // Plaquette fermions 33 | #ifdef SITERAND 34 | rand.real = Z2_rand_no(&(s->site_prn)); 35 | rand.imag = Z2_rand_no(&(s->site_prn)); 36 | #else 37 | rand.real = Z2_rand_no(&node_prn); 38 | rand.imag = Z2_rand_no(&node_prn); 39 | #endif 40 | c_scalar_mult_sum_mat(&(Lambda[j]), &rand, &(z_rand[i].Fplaq[mu])); 41 | } 42 | } 43 | } 44 | } 45 | // ----------------------------------------------------------------- 46 | -------------------------------------------------------------------------------- /2d_Q04/testsuite/README: -------------------------------------------------------------------------------- 1 | This directory provides a suite of tests for the SUSY LATTICE code to simulate two-dimensional N=(2,2) supersymmetric Yang--Mills theory. 2 | 3 | Reference input and output files are provided for the following compilation targets (which are described in ../susy/README): 4 | susy_hmc 5 | susy_meas 6 | susy_hmc_meas 7 | susy_eig 8 | susy_phase 9 | 10 | Every target may be tested for U(N) gauge theory with N=2, 3 or 4 colors. The gauge configurations loaded by each test are also provided. The susy_phase target is tested with and without checkpointing. 11 | 12 | The scripts scalar/run_tests and mpi/run_tests automate the process of compiling, running and checking the given target for the given gauge group. Each script must be run from its respective directory. Given the two arguments 13 | $ ./run_tests 14 | the script will compile the target susy_$tag for gauge group U($N), run the susy_$tag executable using the appropriate input file in this directory, save the output to $tag.U$N.out and check for differences between this output and the reference file $tag.U$N.ref. 15 | 16 | Currently the MPI tests are customized for the HEP-TH cluster at the University of Colorado. Adjusting the $makefile and $run variables at the start of mpi/run_tests may suffice to adjust the tests for other systems. 17 | 18 | Alternately, if run_tests is run with no arguments it will test every target for every N=2, 3 and 4. This should be pretty quick, just a few minutes to run and almost as long to compile. 19 | 20 | Current limitations: 21 | Only anti-periodic temporal boundary conditions for the fermions are tested. 22 | Only a conservative (15-pole) rational approximation is tested. 23 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/README: -------------------------------------------------------------------------------- 1 | This directory provides a suite of tests for the SUSY LATTICE code to simulate one-dimensional 16-supercharge Yang--Mills (BFSS/BMN) theories 2 | 3 | Reference input and output files are provided for the following compilation targets (which are described in ../susy/README): 4 | susy_hmc 5 | susy_meas 6 | susy_hmc_meas 7 | susy_eig 8 | susy_phase 9 | 10 | Every target may be tested for SU(N) gauge theory with N=2, 3 or 4 colors. The gauge configurations loaded by each test are also provided. The susy_phase target is tested with and without checkpointing. For the susy_eig tests we just make sure the extremal eigenvalues are doubled, without trying to obtain the full degeneracies expected for these theories. 11 | 12 | The scripts scalar/run_tests and mpi/run_tests automate the process of compiling, running and checking the given target for the given gauge group. Each script must be run from its respective directory. Given the two arguments 13 | $ ./run_tests 14 | the script will compile the target susy_$tag for gauge group SU($N), run the susy_$tag executable using the appropriate input file in this directory, save the output to $tag.SU$N.out and check for differences between this output and the reference file $tag.SU$N.ref. 15 | 16 | The $makefile and $run variables at the start of mpi/run_tests may need to be adjusted to run on a given system. 17 | 18 | Alternately, if run_tests is run with no arguments it will test every target for every N=2, 3 and 4. This should be pretty quick, just a few minutes to run and almost as long to compile. 19 | 20 | Current limitations: 21 | Only anti-periodic temporal boundary conditions for the fermions are tested. 22 | Only a conservative (15-pole) rational approximation is tested. 23 | -------------------------------------------------------------------------------- /2d_Q04/susy/control_spill.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Main procedure for N=(2,2) SYM lattice printing 3 | #define CONTROL 4 | #include "susy_includes.h" 5 | 6 | int main(int argc, char *argv[]) { 7 | int prompt, s, x, t, mu, i, j; 8 | Real re, im; 9 | 10 | // Setup 11 | setlinebuf(stdout); // DEBUG 12 | initialize_machine(&argc, &argv); 13 | // Remap standard I/O 14 | if (remap_stdio_from_args(argc, argv) == 1) 15 | terminate(1); 16 | 17 | g_sync(); 18 | prompt = setup(); 19 | setup_lambda(); 20 | setup_PtoP(); 21 | setup_FQ(); 22 | 23 | // Load input and run (loop removed) 24 | if (readin(prompt) != 0) { 25 | node0_printf("ERROR in readin, aborting\n"); 26 | terminate(1); 27 | } 28 | 29 | // Serial code! 30 | if (this_node != 0) { 31 | printf("ERROR: run this thing in serial!\n"); 32 | terminate(1); 33 | } 34 | 35 | // Spill lattice in format expected by serial code 36 | // (cf. read_in.cpp, loop_over_lattice and << overloading for Umatrix) 37 | // Also need to add first line: nx\t nt\t kappa\t f_eps\t N 38 | for (t = 0; t < nt; t++) { 39 | for (x = 0; x < nx; x++) { 40 | s = node_index(x, t); 41 | FORALLDIR(mu) { 42 | for (i = 0; i < NCOL; i++) { 43 | for (j = 0; j < NCOL; j++) { 44 | re = lattice[s].link[mu].e[i][j].real; 45 | im = lattice[s].link[mu].e[i][j].imag; 46 | printf("%g\t%g\t", re, im); 47 | } 48 | } 49 | printf("\n"); 50 | } 51 | } 52 | } 53 | fflush(stdout); 54 | normal_exit(0); // Needed by at least some clusters 55 | return 0; 56 | } 57 | // ----------------------------------------------------------------- 58 | -------------------------------------------------------------------------------- /4d_Q16/susy/blocked_ops.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Konishi and SUGRA operators integrated over lattice volume 3 | #include "susy_includes.h" 4 | 5 | void blocked_ops(int Nsmear, int block) { 6 | register int i; 7 | register site *s; 8 | int a, b, j, bl = 2; 9 | double norm, OK[N_K], OS[N_K]; 10 | 11 | // Initialize Konishi and SUGRA operators 12 | for (j = 0; j < N_K; j++) { 13 | OK[j] = 0.0; 14 | OS[j] = 0.0; 15 | } 16 | 17 | // Compute traces of bilinears of scalar field interpolating ops 18 | compute_Ba(); 19 | 20 | // Now sum operators over lattice volume 21 | FORALLSITES(i, s) { 22 | FORALLDIR(a) { 23 | for (j = 0; j < N_K; j++) { 24 | OK[j] += traceBB[j][a][a][i]; // Konishi 25 | 26 | // Now SUGRA, averaged over 20 off-diagonal components 27 | FORALLDIR(b) { 28 | if (a == b) 29 | continue; 30 | OS[j] += 0.05 * traceBB[j][a][b][i]; 31 | } 32 | } 33 | } 34 | } 35 | for (j = 0; j < N_K; j++) { 36 | g_doublesum(&(OK[j])); 37 | g_doublesum(&(OS[j])); 38 | } 39 | 40 | // Print each operator summed over volume 41 | // Have to divide by number of blocked lattices: 2^(4block) = bl^4 42 | // Format: TAG smearing block a op[a] 43 | for (j = 1; j < block; j++) 44 | bl *= 2; 45 | if (block <= 0) 46 | bl = 1; 47 | norm = (Real)(bl * bl * bl * bl); 48 | for (j = 0; j < N_K; j++) // Konishi 49 | node0_printf("OK %d %d %d %.8g\n", Nsmear, block, j, OK[j] / norm); 50 | for (j = 0; j < N_K; j++) // SUGRA 51 | node0_printf("OS %d %d %d %.8g\n", Nsmear, block, j, OS[j] / norm); 52 | } 53 | // ----------------------------------------------------------------- 54 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/mpi/meas.SU2.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 2, DIMF = 3, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:02:44 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 2 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.0 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 6 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU2.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=50 33 | Restored binary gauge and scalar configuration serially from file config.SU2.4 34 | Time stamp Sun Sep 29 21:17:28 2019 35 | Checksums 692efb07 d22e9404 OK 36 | Time to reload gauge configuration = 2.789497e-04 37 | CHECK NERSC LINKTR: -1.7945235595107079e-01 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 1.9e-08 changed to 1.6e-16 39 | Reantihermized for double precision. Max deviation 0 changed to 0 40 | Time to check unitarity and anti-hermiticity = 0.000349 seconds 41 | START 14.329448 42 | SCALAR SQUARES 0.0463778 0.0315837 0.0220554 0.00332564 0.027864 0.0142333 0.00500791 0.0095236 0.172861 0.0369814 0.0519536 43 | LINES_EIG -0.3398 0.3398 44 | GMES 1.8856657 0 0 14.329448 0.011594462 0.0078959365 0.0055138572 45 | SCALAR_EIG 0 -0.122352 0.100475 -0.460972 -0.0219805 46 | SCALAR_EIG 1 0.122352 0.100475 0.0219805 0.460972 47 | RUNNING COMPLETED 48 | 49 | Time = 0.0004048 seconds 50 | exit: Fri Nov 13 13:02:44 2020 51 | 52 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/scalar/meas.SU2.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 2, DIMF = 3, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:16:00 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 4 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.0 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 6 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU2.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=50 33 | Restored binary gauge and scalar configuration serially from file config.SU2.4 34 | Time stamp Sun Sep 29 21:17:28 2019 35 | Checksums 692efb07 d22e9404 OK 36 | Time to reload gauge configuration = 1.430511e-04 37 | CHECK NERSC LINKTR: -1.7945235595107079e-01 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 1.9e-08 changed to 1.6e-16 39 | Reantihermized for double precision. Max deviation 0 changed to 0 40 | Time to check unitarity and anti-hermiticity = 0.000222 seconds 41 | START 14.329448 42 | SCALAR SQUARES 0.0463778 0.0315837 0.0220554 0.00332564 0.027864 0.0142333 0.00500791 0.0095236 0.172861 0.0369814 0.0519536 43 | LINES_EIG -0.3398 0.3398 44 | GMES 1.8856657 0 0 14.329448 0.011594462 0.0078959365 0.0055138572 45 | SCALAR_EIG 0 -0.122352 0.100475 -0.460972 -0.0219805 46 | SCALAR_EIG 1 0.122352 0.100475 0.0219805 0.460972 47 | RUNNING COMPLETED 48 | 49 | Time = 0.0002131 seconds 50 | exit: Fri Nov 13 13:16:00 2020 51 | 52 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/README: -------------------------------------------------------------------------------- 1 | This directory provides a suite of tests for the SUSY LATTICE code to simulate four-dimensional N=4 supersymmetric Yang--Mills theory. 2 | 3 | Reference input and output files are provided for the following compilation targets (which are described in ../susy/README): 4 | susy_hmc 5 | susy_meas 6 | susy_hmc_meas 7 | susy_eig 8 | susy_phase 9 | 10 | Every target may be tested for U(N) gauge theory with N=2, 3 or 4 colors. The gauge configurations loaded by each test are also provided. The susy_phase target is tested with and without checkpointing. 11 | 12 | The scripts scalar/run_tests and mpi/run_tests automate the process of compiling, running and checking the given target for the given gauge group. Each script must be run from its respective directory. Given the two arguments 13 | $ ./run_tests 14 | the script will compile the target susy_$tag for gauge group U($N), run the susy_$tag executable using the appropriate input file in this directory, save the output to $tag.U$N.out and check for differences between this output and the reference file $tag.U$N.ref. 15 | 16 | Currently the MPI tests are customized for the HEP-TH cluster at the University of Colorado. Adjusting the $makefile and $run variables at the start of mpi/run_tests may suffice to adjust the tests for other systems. 17 | 18 | Alternately, if run_tests is run with no arguments it will test every target for every N=2, 3 and 4. This may take some time to complete! Typical total serial runtimes are about 2 minutes for N=2, about 14 minutes for N=3 and about 90 minutes for N=4, dominated by pfaffian computations. 19 | 20 | Current limitations: 21 | Only anti-periodic temporal boundary conditions for the fermions are tested. 22 | Only a conservative 15-pole rational approximation is tested. 23 | -------------------------------------------------------------------------------- /1d_Q16/generic/make_lattice.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Allocate space for lattice fields in the site struct 3 | // Fill in coordinates, parity, index 4 | // Allocate gen_pt pointers for gather results 5 | // Initialize site-based random number generator if SITERAND defined 6 | #include "generic_includes.h" 7 | #include // For SITERAND 8 | 9 | void make_lattice() { 10 | register int i; 11 | int t; 12 | 13 | // Allocate space for lattice 14 | node0_printf("Mallocing %.1f MBytes per core for lattice\n", 15 | (double)sites_on_node * sizeof(site) / 1e6); 16 | lattice = malloc(sizeof *lattice * sites_on_node); 17 | if (lattice == NULL) { 18 | printf("node%d: no room for lattice\n", this_node); 19 | terminate(1); 20 | } 21 | 22 | // Allocate address vectors 23 | for (i = 0; i < N_POINTERS; i++) { 24 | gen_pt[i] = malloc(sizeof(char*) * sites_on_node); 25 | if (gen_pt[i] == NULL) { 26 | printf("node%d: no room for pointer array\n", this_node); 27 | terminate(1); 28 | } 29 | } 30 | 31 | // Fill in parity, coordinates and index 32 | for (t = 0; t < nt; t++) { 33 | if (node_number(t) == mynode()) { 34 | i = node_index(t); 35 | lattice[i].t = t; 36 | lattice[i].index = t; 37 | if (t % 2 == 0) 38 | lattice[i].parity = EVEN; 39 | else 40 | lattice[i].parity = ODD; 41 | #ifdef SITERAND 42 | initialize_prn(&(lattice[i].site_prn), iseed, lattice[i].index); 43 | #endif 44 | } 45 | } 46 | } 47 | 48 | void free_lattice() { 49 | int i; 50 | 51 | for (i = 0; i < N_POINTERS; i++) 52 | free(gen_pt[i]); 53 | 54 | free(lattice); 55 | } 56 | // ----------------------------------------------------------------- 57 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | SUSY LATTICE is parallel code for RHMC simulations of extended-supersymmetric Yang--Mills theories in various dimensions, including related measurements. 2 | This package evolved from the MILC code, and supersedes the serial C++ code presented in arXiv:1108.1503. 3 | Extension to additional theories is currently underway in development branches. 4 | 5 | See subdirectories for more detailed READMEs: 6 | 1d_Q16 -- One-dimensional 16-supercharge Yang--Mills (BFSS/BMN) theories 7 | 2d_Q04 -- Two-dimensional N=(2,2) supersymmetric Yang--Mills theory 8 | 4d_Q16 -- Four-dimensional N=4 supersymmetric Yang--Mills theory 9 | 10 | Please contact David Schaich with any questions, requests for new features, or (especially) bug reports: 11 | http://www.davidschaich.net 12 | 13 | Contributors: David Schaich, Thomas DeGrand, Raghav Jha, Anosh Joseph, Georg Bergner, Simon Catterall, Joel Giedt 14 | 15 | Reference: A summary of useful information appears in the following paper, which we ask that you cite if you find SUSY LATTICE useful in your work: 16 | David Schaich and Thomas DeGrand, 17 | "Parallel software for lattice N=4 supersymmetric Yang--Mills theory", 18 | Comput. Phys. Commun. 190:200--212 (2015) 19 | [doi:10.1016/j.cpc.2014.12.025, arXiv:1410.6971]. 20 | 21 | Support: Development was supported in part by Syracuse University, the University of Colorado Boulder, the University of Bern, Friedrich Schiller University Jena, the International Centre for Theoretical Sciences Bangalore, the Indian Institute of Science Education and Research Mohali, Rensselaer Polytechnic Institute and the University of Liverpool, as well as by the U.S. Department of Energy under grants DE-FG02-04ER41290, DE-SC0010005, DE-SC0008669 and DE-SC0009998, and UK Research and Innovation Future Leader Fellowship MR/S015418/1. 22 | -------------------------------------------------------------------------------- /1d_Q16/susy/library_util.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // A couple of library-like routines that loop over all sites 3 | #include "susy_includes.h" 4 | // ----------------------------------------------------------------- 5 | 6 | 7 | 8 | // ----------------------------------------------------------------- 9 | // Copy the gauge field and scalars on all sites 10 | #ifdef HMC_ALGORITHM 11 | void copy_bosons(int sign) { 12 | register int i, j; 13 | register site *s; 14 | 15 | if (sign == 1) { 16 | FORALLSITES(i, s) { 17 | mat_copy(&(s->link), &(s->old_link)); 18 | for (j = 0; j < NSCALAR; j++) 19 | mat_copy(&(s->X[j]), &(s->old_X[j])); 20 | } 21 | } 22 | else if (sign == -1) { 23 | FORALLSITES(i, s) { 24 | mat_copy(&(s->old_link), &(s->link)); 25 | for (j = 0; j < NSCALAR; j++) 26 | mat_copy(&(s->old_X[j]), &(s->X[j])); 27 | } 28 | } 29 | else { 30 | node0_printf("Error: incorrect sign in copy_boson: %d\n", sign); 31 | terminate(1); 32 | } 33 | } 34 | #endif 35 | // ----------------------------------------------------------------- 36 | 37 | 38 | 39 | // ----------------------------------------------------------------- 40 | // Shift a matrix without parallel transport 41 | // The dir should come from goffset 42 | void shiftmat(matrix *dat, matrix *temp, int dir) { 43 | register int i; 44 | register site *s; 45 | msg_tag *mtag; 46 | 47 | mtag = start_gather_field(dat, sizeof(matrix), 48 | dir, EVENANDODD, gen_pt[0]); 49 | wait_gather(mtag); 50 | FORALLSITES(i, s) 51 | mat_copy((matrix *)gen_pt[0][i], &(temp[i])); 52 | cleanup_gather(mtag); 53 | FORALLSITES(i, s) 54 | mat_copy(&(temp[i]), &(dat[i])); 55 | } 56 | // ----------------------------------------------------------------- 57 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/mpi/meas.SU3.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 3, DIMF = 8, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:03:26 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 2 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.0 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 10 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU3.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=75 33 | Restored binary gauge and scalar configuration serially from file config.SU3.4 34 | Time stamp Sat Sep 28 19:14:13 2019 35 | Checksums edd70b30 3f7ea8c3 OK 36 | Time to reload gauge configuration = 2.839565e-04 37 | CHECK NERSC LINKTR: -1.2406824886177976e-01 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 3.2e-08 changed to 8.1e-16 39 | Reantihermized for double precision. Max deviation 3e-17 changed to 3e-17 40 | Time to check unitarity and anti-hermiticity = 0.000402 seconds 41 | START 33.011562 42 | SCALAR SQUARES 0.0228359 0.0155877 0.0323563 0.0138573 0.0139883 0.0298187 0.0383374 0.0151963 0.0615708 0.0270609 0.016776 43 | LINES_EIG -0.3275 0.1191 0.2043 44 | GMES 2.9189493 0.0040145058 0 33.011562 0.0057089634 0.003896924 0.0080890627 45 | SCALAR_EIG 0 -0.163795 0.060108 -0.316574 -0.0670221 46 | SCALAR_EIG 1 0.00202537 0.032707 -0.0779376 0.065046 47 | SCALAR_EIG 2 0.16177 0.0566345 0.0644116 0.267216 48 | RUNNING COMPLETED 49 | 50 | Time = 0.0004699 seconds 51 | exit: Fri Nov 13 13:03:26 2020 52 | 53 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/scalar/meas.SU3.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 3, DIMF = 8, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:16:39 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 4 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.0 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 10 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU3.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=75 33 | Restored binary gauge and scalar configuration serially from file config.SU3.4 34 | Time stamp Sat Sep 28 19:14:13 2019 35 | Checksums edd70b30 3f7ea8c3 OK 36 | Time to reload gauge configuration = 1.480579e-04 37 | CHECK NERSC LINKTR: -1.2406824886177976e-01 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 3.2e-08 changed to 8.1e-16 39 | Reantihermized for double precision. Max deviation 3e-17 changed to 3e-17 40 | Time to check unitarity and anti-hermiticity = 0.0002971 seconds 41 | START 33.011562 42 | SCALAR SQUARES 0.0228359 0.0155877 0.0323563 0.0138573 0.0139883 0.0298187 0.0383374 0.0151963 0.0615708 0.0270609 0.016776 43 | LINES_EIG -0.3275 0.1191 0.2043 44 | GMES 2.9189493 0.0040145058 0 33.011562 0.0057089634 0.003896924 0.0080890627 45 | SCALAR_EIG 0 -0.163795 0.060108 -0.316574 -0.0670221 46 | SCALAR_EIG 1 0.00202537 0.032707 -0.0779376 0.065046 47 | SCALAR_EIG 2 0.16177 0.0566345 0.0644116 0.267216 48 | RUNNING COMPLETED 49 | 50 | Time = 0.000329 seconds 51 | exit: Fri Nov 13 13:16:39 2020 52 | 53 | -------------------------------------------------------------------------------- /1d_Q16/susy/params.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Structure for passing simulation parameters to each node 3 | #ifndef _PARAMS_H 4 | #define _PARAMS_H 5 | #include "../include/macros.h" // For MAXFILENAME 6 | 7 | typedef struct { 8 | int stopflag; // 1 if it is time to stop 9 | 10 | // Initialization parameters 11 | int nt; // Lattice dimensions 12 | int PBC; // Temporal fermion boundary condition 13 | int iseed; // For random numbers 14 | 15 | // RHMC and multi-mass CG parameters 16 | // Number of Nth roots and polynomial order 17 | int Nroot, Norder; 18 | 19 | int warms; // The number of warmup trajectories 20 | int trajecs; // The number of real trajectories 21 | Real traj_length; // The length of each trajectory 22 | int nsteps[2]; // Fermion and gauge steps 23 | int propinterval; // Number of trajectories between measurements 24 | int startflag; // What to do for beginning lattice 25 | int fixflag; // Whether to gauge fix to Coulomb gauge 26 | int saveflag; // What to do with lattice at end 27 | Real lambda, kappa; // 't Hooft coupling and Nc/(4lambda) 28 | Real mu; // BMN mass or BFSS regulator 29 | 30 | // Inversion parameters 31 | int niter; // Maximum number of CG iterations 32 | Real rsqmin; // For deciding on convergence 33 | char startfile[MAXFILENAME], savefile[MAXFILENAME]; 34 | 35 | #ifdef BILIN 36 | int nsrc; 37 | #endif 38 | 39 | #ifdef EIG 40 | // Eigenvalue parameters 41 | int Nvec, maxIter; 42 | Real eig_tol; 43 | #endif 44 | 45 | #ifdef PHASE 46 | // Pfaffian parameters 47 | int ckpt_load, ckpt_save; 48 | #endif 49 | } params; 50 | #endif 51 | // ----------------------------------------------------------------- 52 | -------------------------------------------------------------------------------- /4d_Q16/susy/control_spill.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Main procedure for N=4 SYM lattice printing 3 | #define CONTROL 4 | #include "susy_includes.h" 5 | 6 | int main(int argc, char *argv[]) { 7 | int prompt, s, x, y, z, t, mu, i, j; 8 | Real re, im; 9 | 10 | // Setup 11 | setlinebuf(stdout); // DEBUG 12 | initialize_machine(&argc, &argv); 13 | // Remap standard I/O 14 | if (remap_stdio_from_args(argc, argv) == 1) 15 | terminate(1); 16 | 17 | g_sync(); 18 | prompt = setup(); 19 | setup_lambda(); 20 | setup_PtoP(); 21 | setup_FQ(); 22 | 23 | // Load input and run (loop removed) 24 | if (readin(prompt) != 0) { 25 | node0_printf("ERROR in readin, aborting\n"); 26 | terminate(1); 27 | } 28 | 29 | // Serial code! 30 | if (this_node != 0) { 31 | printf("ERROR: run this thing in serial!\n"); 32 | terminate(1); 33 | } 34 | 35 | // Spill lattice in format expected by serial code 36 | // (cf. read_in.cpp, loop_over_lattice and << overloading for Umatrix) 37 | // Also need to add first line: nx\t nt\t kappa\t f_eps\t N 38 | for (t = 0; t < nt; t++) { 39 | for (z = 0; z < nz; z++) { 40 | for (y = 0; y < ny; y++) { 41 | for (x = 0; x < nx; x++) { 42 | s = node_index(x, y, z, t); 43 | FORALLDIR(mu) { 44 | for (i = 0; i < NCOL; i++) { 45 | for (j = 0; j < NCOL; j++) { 46 | re = lattice[s].link[mu].e[i][j].real; 47 | im = lattice[s].link[mu].e[i][j].imag; 48 | printf("%g\t%g\t", re, im); 49 | } 50 | } 51 | printf("\n"); 52 | } 53 | } 54 | } 55 | } 56 | } 57 | fflush(stdout); 58 | normal_exit(0); // Needed by at least some clusters 59 | return 0; 60 | } 61 | // ----------------------------------------------------------------- 62 | -------------------------------------------------------------------------------- /2d_Q04/generic/make_lattice.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Allocate space for lattice fields in the site struct 3 | // Fill in coordinates, parity, index 4 | // Allocate gen_pt pointers for gather results 5 | // Initialize site-based random number generator if SITERAND defined 6 | #include "generic_includes.h" 7 | #include // For SITERAND 8 | 9 | void make_lattice() { 10 | register int i; 11 | int x, t; 12 | 13 | // Allocate space for lattice 14 | node0_printf("Mallocing %.1f MBytes per core for lattice\n", 15 | (double)sites_on_node * sizeof(site) / 1e6); 16 | lattice = malloc(sizeof *lattice * sites_on_node); 17 | if (lattice == NULL) { 18 | printf("node%d: no room for lattice\n", this_node); 19 | terminate(1); 20 | } 21 | 22 | // Allocate address vectors 23 | for (i = 0; i < N_POINTERS; i++) { 24 | gen_pt[i] = malloc(sizeof(char*) * sites_on_node); 25 | if (gen_pt[i] == NULL) { 26 | printf("node%d: no room for pointer array\n", this_node); 27 | terminate(1); 28 | } 29 | } 30 | 31 | // Fill in parity, coordinates and index 32 | for (t = 0; t < nt; t++) { 33 | for (x = 0; x < nx; x++) { 34 | if (node_number(x, t) == mynode()) { 35 | i = node_index(x, t); 36 | lattice[i].x = x; 37 | lattice[i].t = t; 38 | lattice[i].index = x + nx * t; 39 | if ((x + t) % 2 == 0) 40 | lattice[i].parity = EVEN; 41 | else 42 | lattice[i].parity = ODD; 43 | #ifdef SITERAND 44 | initialize_prn(&(lattice[i].site_prn), iseed, lattice[i].index); 45 | #endif 46 | } 47 | } 48 | } 49 | } 50 | 51 | void free_lattice() { 52 | int i; 53 | 54 | for (i = 0; i < N_POINTERS; i++) 55 | free(gen_pt[i]); 56 | 57 | free(lattice); 58 | } 59 | // ----------------------------------------------------------------- 60 | -------------------------------------------------------------------------------- /4d_Q16/libraries/complextr.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Return complex trace of matrix products 3 | // a * b, adag * b and a * bdag, respectively 4 | #include "../include/config.h" 5 | #include "../include/complex.h" 6 | #include "../include/susy.h" 7 | 8 | complex complextrace_nn(matrix *a, matrix *b) { 9 | register int i, j; 10 | register Real sumr = 0.0, sumi = 0.0; 11 | complex sum; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | sumr += a->e[i][j].real * b->e[j][i].real 15 | - a->e[i][j].imag * b->e[j][i].imag; 16 | sumi += a->e[i][j].real * b->e[j][i].imag 17 | + a->e[i][j].imag * b->e[j][i].real; 18 | } 19 | } 20 | sum.real = sumr; 21 | sum.imag = sumi; 22 | return sum; 23 | } 24 | 25 | complex complextrace_an(matrix *a, matrix *b) { 26 | register int i, j; 27 | register Real sumr = 0.0, sumi = 0.0; 28 | complex sum; 29 | for (i = 0; i < NCOL; i++) { 30 | for (j = 0; j < NCOL; j++) { 31 | sumr += a->e[i][j].real * b->e[i][j].real 32 | + a->e[i][j].imag * b->e[i][j].imag; 33 | sumi += a->e[i][j].real * b->e[i][j].imag 34 | - a->e[i][j].imag * b->e[i][j].real; 35 | } 36 | } 37 | sum.real = sumr; 38 | sum.imag = sumi; 39 | return sum; 40 | } 41 | 42 | complex complextrace_na(matrix *a, matrix *b) { 43 | register int i, j; 44 | register Real sumr = 0.0, sumi = 0.0; 45 | complex sum; 46 | for (i = 0; i < NCOL; i++) { 47 | for (j = 0; j < NCOL; j++) { 48 | sumr += a->e[i][j].real * b->e[i][j].real 49 | + a->e[i][j].imag * b->e[i][j].imag; 50 | sumi += a->e[i][j].imag * b->e[i][j].real 51 | - a->e[i][j].real * b->e[i][j].imag; 52 | } 53 | } 54 | sum.real = sumr; 55 | sum.imag = sumi; 56 | return sum; 57 | } 58 | // ----------------------------------------------------------------- 59 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/mpi/meas.SU4.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 4, DIMF = 15, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:04:12 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 2 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.0 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 12 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU4.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=100 33 | Restored binary gauge and scalar configuration serially from file config.SU4.4 34 | Time stamp Sat Sep 28 17:32:20 2019 35 | Checksums 9562f535 cf013137 OK 36 | Time to reload gauge configuration = 7.190704e-04 37 | CHECK NERSC LINKTR: 1.0411885334178805e-02 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 2.7e-08 changed to 1e-15 39 | Reantihermized for double precision. Max deviation 6.3e-17 changed to 6.3e-17 40 | Time to check unitarity and anti-hermiticity = 0.0004001 seconds 41 | START 56.768541 42 | SCALAR SQUARES 0.0205791 0.0288134 0.0142873 0.0344982 0.0162123 0.0449562 0.0306819 0.0290862 0.0281342 0.0274721 0.0113749 43 | LINES_EIG -0.386 0.3509 0.169 -0.1358 44 | GMES 3.8420364 0.0018984802 0 56.768541 0.0051447745 0.0072033404 0.0035718256 45 | SCALAR_EIG 0 -0.189536 0.0484223 -0.31167 -0.12184 46 | SCALAR_EIG 1 -0.0649677 0.0336957 -0.159738 0.00011707 47 | SCALAR_EIG 2 0.0686932 0.0323317 0.00215776 0.135921 48 | SCALAR_EIG 3 0.18581 0.043779 0.0924671 0.279557 49 | RUNNING COMPLETED 50 | 51 | Time = 0.000572 seconds 52 | exit: Fri Nov 13 13:04:12 2020 53 | 54 | -------------------------------------------------------------------------------- /1d_Q16/testsuite/scalar/meas.SU4.ref: -------------------------------------------------------------------------------- 1 | BMN, Nc = 4, DIMF = 15, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 13:17:24 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nt 4 9 | PBC -1 10 | iseed 41 11 | Nroot 1 12 | Norder 15 13 | LAYOUT = Hypercubes, options = hyper_prime 14 | ON EACH NODE 4 15 | Mallocing 0.0 MBytes per core for lattice 16 | Antiperiodic temporal boundary conditions 17 | Mallocing 0.1 MBytes per core for fields 18 | 19 | 20 | warms 0 21 | trajecs 3 22 | traj_length 1.000000e+00 23 | nstep 12 24 | nstep_gauge 4 25 | traj_between_meas 2 26 | lambda 1.000000e-02 27 | mu 1.000000e+00 28 | max_cg_iterations 500 29 | error_per_site 1.000000e-05 30 | reload_serial config.SU4.4 31 | forget 32 | lambda=0.01 --> kappa=Nc/(4lambda)=100 33 | Restored binary gauge and scalar configuration serially from file config.SU4.4 34 | Time stamp Sat Sep 28 17:32:20 2019 35 | Checksums 9562f535 cf013137 OK 36 | Time to reload gauge configuration = 1.609325e-04 37 | CHECK NERSC LINKTR: 1.0411885334178805e-02 CKSUM: 0 38 | Reunitarized for double precision. Max deviation 2.7e-08 changed to 1e-15 39 | Reantihermized for double precision. Max deviation 6.3e-17 changed to 6.3e-17 40 | Time to check unitarity and anti-hermiticity = 0.0003309 seconds 41 | START 56.768541 42 | SCALAR SQUARES 0.0205791 0.0288134 0.0142873 0.0344982 0.0162123 0.0449562 0.0306819 0.0290862 0.0281342 0.0274721 0.0113749 43 | LINES_EIG -0.386 0.3509 0.169 -0.1358 44 | GMES 3.8420364 0.0018984802 0 56.768541 0.0051447745 0.0072033404 0.0035718256 45 | SCALAR_EIG 0 -0.189536 0.0484223 -0.31167 -0.12184 46 | SCALAR_EIG 1 -0.0649677 0.0336957 -0.159738 0.00011707 47 | SCALAR_EIG 2 0.0686932 0.0323317 0.00215776 0.135921 48 | SCALAR_EIG 3 0.18581 0.043779 0.0924671 0.279557 49 | RUNNING COMPLETED 50 | 51 | Time = 0.000463 seconds 52 | exit: Fri Nov 13 13:17:24 2020 53 | 54 | -------------------------------------------------------------------------------- /4d_Q16/susy/plaq.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure average space--space and space--time plaquettes 3 | // Use tempmat for temporary storage 4 | #include "susy_includes.h" 5 | 6 | void plaquette(double *ss_plaq, double *st_plaq) { 7 | register int i, dir, dir2; 8 | register site *s; 9 | double ss_sum = 0.0, st_sum = 0.0; 10 | msg_tag *mtag0, *mtag1; 11 | matrix tmat; 12 | 13 | // We can exploit a symmetry under dir<-->dir2 14 | for (dir = YUP; dir < NUMLINK; dir++) { 15 | for (dir2 = XUP; dir2 < dir; dir2++) { 16 | // gen_pt[0] is U_b(x+a), gen_pt[1] is U_a(x+b) 17 | mtag0 = start_gather_site(F_OFFSET(link[dir2]), sizeof(matrix), 18 | goffset[dir], EVENANDODD, gen_pt[0]); 19 | mtag1 = start_gather_site(F_OFFSET(link[dir]), sizeof(matrix), 20 | goffset[dir2], EVENANDODD, gen_pt[1]); 21 | 22 | // tempmat = Udag_b(x) U_a(x) 23 | FORALLSITES(i, s) 24 | mult_an(&(s->link[dir2]), &(s->link[dir]), &(tempmat)[i]); 25 | wait_gather(mtag0); 26 | wait_gather(mtag1); 27 | 28 | // Compute tr[Udag_a(x+b) Udag_b(x) U_a(x) U_b(x+a)] 29 | if (dir == TUP || dir2 == TUP) { 30 | FORALLSITES(i, s) { 31 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 32 | st_sum += (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 33 | } 34 | } 35 | else { 36 | FORALLSITES(i, s) { 37 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 38 | ss_sum += (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 39 | } 40 | } 41 | cleanup_gather(mtag0); 42 | cleanup_gather(mtag1); 43 | } 44 | } 45 | g_doublesum(&ss_sum); 46 | g_doublesum(&st_sum); 47 | 48 | // Average over four plaquettes that involve the temporal link 49 | // and six that do not 50 | *ss_plaq = ss_sum / ((double)(6.0 * volume)); 51 | *st_plaq = st_sum / ((double)(4.0 * volume)); 52 | } 53 | // ----------------------------------------------------------------- 54 | -------------------------------------------------------------------------------- /4d_Q16/correlators/plaq.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure average space--space and space--time plaquettes 3 | // Use tempmat for temporary storage 4 | #include "corr_includes.h" 5 | 6 | void plaquette(double *ss_plaq, double *st_plaq) { 7 | register int i, dir, dir2; 8 | register site *s; 9 | double ss_sum = 0.0, st_sum = 0.0; 10 | msg_tag *mtag0, *mtag1; 11 | matrix tmat; 12 | 13 | // We can exploit a symmetry under dir<-->dir2 14 | for (dir = YUP; dir < NUMLINK; dir++) { 15 | for (dir2 = XUP; dir2 < dir; dir2++) { 16 | // gen_pt[0] is U_b(x+a), gen_pt[1] is U_a(x+b) 17 | mtag0 = start_gather_site(F_OFFSET(link[dir2]), sizeof(matrix), 18 | goffset[dir], EVENANDODD, gen_pt[0]); 19 | mtag1 = start_gather_site(F_OFFSET(link[dir]), sizeof(matrix), 20 | goffset[dir2], EVENANDODD, gen_pt[1]); 21 | 22 | // tempmat = Udag_b(x) U_a(x) 23 | FORALLSITES(i, s) 24 | mult_an(&(s->link[dir2]), &(s->link[dir]), &(tempmat)[i]); 25 | wait_gather(mtag0); 26 | wait_gather(mtag1); 27 | 28 | // Compute tr[Udag_a(x+b) Udag_b(x) U_a(x) U_b(x+a)] 29 | if (dir == TUP || dir2 == TUP) { 30 | FORALLSITES(i, s) { 31 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 32 | st_sum += (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 33 | } 34 | } 35 | else { 36 | FORALLSITES(i, s) { 37 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 38 | ss_sum += (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 39 | } 40 | } 41 | cleanup_gather(mtag0); 42 | cleanup_gather(mtag1); 43 | } 44 | } 45 | g_doublesum(&ss_sum); 46 | g_doublesum(&st_sum); 47 | 48 | // Average over four plaquettes that involve the temporal link 49 | // and six that do not 50 | *ss_plaq = ss_sum / ((double)(6.0 * volume)); 51 | *st_plaq = st_sum / ((double)(4.0 * volume)); 52 | } 53 | // ----------------------------------------------------------------- 54 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/mpi/cheb.U2.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 2, DIMF = 4, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 23:47:58 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 2 x 4 x 4 x 4 18 | Mallocing 1.3 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 1.3 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 25 42 | reload_serial config.U2.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=0.5 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U2.4444 47 | Time stamp Sun Oct 8 07:57:07 2017 48 | Checksums 632f69a0 bb8becc OK 49 | Time to reload gauge configuration = 4.858971e-04 50 | CHECK PLAQ: 1.9591170386368122e+00 1.9387730551508811e+00 51 | CHECK NERSC LINKTR: -5.3727121771416364e-03 CKSUM: 0 52 | START 1.959117 1.9387731 3.8978901 14.998133 53 | FLINK 1.12202 1.11849 1.19757 1.13141 1.18887 1.15167 0.221792 54 | FLINK_DET -0.311655 -0.316585 -0.466819 -0.327039 -0.422255 -0.36887 0.313824 55 | GMES 0.47956751 0.16301621 0 1.959117 1.9387731 14.998133 1.1964925 56 | BACTION 14.998133 57 | CHEBYSHEV c[0] 1 0 58 | CHEBYSHEV c[1] -0.052180675 0.00158 59 | CHEBYSHEV c[2] -0.54469274 0.001447 60 | CHEBYSHEV c[3] 0.2074749 0.001998 61 | CHEBYSHEV c[4] 0.27830087 0.006793 62 | CHEBYSHEV c[5] 0.42059875 0.02166 63 | CHEBYSHEV c[6] 1.0540792 0.0563 64 | CHEBYSHEV c[7] 2.4732846 0.1454 65 | CHEBYSHEV c[8] 6.1304521 0.4085 66 | CHEBYSHEV c[9] 15.478953 1.18 67 | RUNNING COMPLETED 68 | 69 | Time = 0.1269 seconds 70 | exit: Fri Nov 13 23:47:58 2020 71 | 72 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/scalar/cheb.U4.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 4, DIMF = 16, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Sat Nov 14 02:16:38 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 4 x 4 x 4 x 4 18 | Mallocing 3.3 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 9.5 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 30 42 | reload_serial config.U4.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=1 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U4.4444 47 | Time stamp Sun Oct 8 19:11:38 2017 48 | Checksums b42f2d5f cbf74541 OK 49 | Time to reload gauge configuration = 1.380205e-03 50 | CHECK PLAQ: 4.1944677203246705e+00 4.3618804001854894e+00 51 | CHECK NERSC LINKTR: -6.6924965564520988e-03 CKSUM: 0 52 | START 4.1944677 4.3618804 8.5563481 69.318071 53 | FLINK 1.1881 1.20636 1.19337 1.25722 1.21416 1.21184 0.118836 54 | FLINK_DET 0.0527206 0.0544836 0.0645982 0.0947051 0.0747196 0.0682454 0.0906727 55 | GMES 4.6030493 0.73341625 0 4.1944677 4.3618804 69.318071 4.7317149 56 | BACTION 69.318071 57 | CHEBYSHEV c[0] 1 0 58 | CHEBYSHEV c[1] -0.17299059 0.0005449 59 | CHEBYSHEV c[2] -0.53886129 0.000947 60 | CHEBYSHEV c[3] 0.64751069 0.003928 61 | CHEBYSHEV c[4] 2.3803633 0.02901 62 | CHEBYSHEV c[5] 13.346818 0.2025 63 | CHEBYSHEV c[6] 82.591773 1.461 64 | CHEBYSHEV c[7] 531.41936 10.93 65 | CHEBYSHEV c[8] 3534.998 85.01 66 | CHEBYSHEV c[9] 24162.686 683.8 67 | RUNNING COMPLETED 68 | 69 | Time = 0.6085 seconds 70 | exit: Sat Nov 14 02:16:39 2020 71 | 72 | -------------------------------------------------------------------------------- /2d_Q04/susy/blocked_ploop.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Evaluate the Polyakov loop after block RG blocking steps 3 | // Use general_gathers; lattice must be divisible by 2^block in all dirs 4 | // Use tempmat and tempmat2 for temporary storage 5 | #include "susy_includes.h" 6 | 7 | void blocked_ploop(int Nsmear, int block) { 8 | register int i; 9 | register site *s; 10 | int j, bl = 2, d[NDIMS] = {0, 0}; 11 | complex sum = cmplx(0.0, 0.0), plp; 12 | msg_tag *tag; 13 | 14 | // Allow sanity check of reproducing ploop() with this routine 15 | if (block <= 0) 16 | bl = 1; 17 | 18 | // Set number of links to stride, bl = 2^block 19 | for (j = 1; j < block; j++) 20 | bl *= 2; 21 | 22 | // Copy temporal links to tempmat 23 | FORALLSITES(i, s) 24 | mat_copy(&(s->link[TUP]), &(tempmat[i])); 25 | 26 | // Compute the bl-strided Polyakov loop "at" ALL the sites 27 | // on the first bl = 2^block timeslices 28 | for (j = bl; j < nt; j += bl) { 29 | d[TUP] = j; // Path from which to gather 30 | tag = start_general_gather_field(tempmat, sizeof(matrix), 31 | d, EVENANDODD, gen_pt[0]); 32 | wait_general_gather(tag); 33 | 34 | // Overwrite tempmat on the first bl time slices 35 | // Leave the others undisturbed so we can still gather them 36 | FORALLSITES(i, s) { 37 | if (s->t >= bl) 38 | continue; 39 | mult_nn(&(tempmat[i]), (matrix *)gen_pt[0][i], &(tempmat2[i])); 40 | mat_copy(&(tempmat2[i]), &(tempmat[i])); 41 | } 42 | cleanup_general_gather(tag); 43 | } 44 | FORALLSITES(i, s) { 45 | if (s->t >= bl) 46 | continue; 47 | plp = trace(&(tempmat[i])); 48 | CSUM(sum, plp); 49 | } 50 | 51 | // Average all the loops we just calculated 52 | g_complexsum(&sum); 53 | plp.real = sum.real / ((Real)(nx * bl)); 54 | plp.imag = sum.imag / ((Real)(nx * bl)); 55 | node0_printf("BPLOOP %d %d %.8g %.8g\n", Nsmear, block, plp.real, plp.imag); 56 | } 57 | // ----------------------------------------------------------------- 58 | -------------------------------------------------------------------------------- /4d_Q16/susy/link_trace.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure the average value of Tr[U.Ubar] / N 3 | // as well as the width sqrt( - ^2) of its distribution 4 | // At the same time, measure (real) determinants of traceless parts 5 | #include "susy_includes.h" 6 | 7 | double link_trace(double *linktr, double *width, 8 | double *link_det, double *det_ave, double *det_width) { 9 | 10 | register int i, j, dir; 11 | register site *s; 12 | double ave = 0.0, linktrSq = 0.0, td, detSq = 0.0;//, im_check = 0.0; 13 | complex tc; 14 | matrix tmat; 15 | 16 | *det_ave = 0.0; 17 | FORALLDIR(dir) { 18 | linktr[dir] = 0.0; 19 | link_det[dir] = 0.0; 20 | FORALLSITES(i, s) { 21 | mult_na(&(s->link[dir]), &(s->link[dir]), &tmat); 22 | tc = trace(&tmat); 23 | linktr[dir] += tc.real; 24 | linktrSq += tc.real * tc.real; 25 | 26 | // Determinant of traceless part 27 | tc.real *= one_ov_N; 28 | for (j = 0; j < NCOL; j++) 29 | tmat.e[j][j].real -= tc.real; 30 | tc = find_det(&tmat); 31 | link_det[dir] += tc.real; 32 | detSq += tc.real * tc.real; 33 | // im_check += tc.imag; 34 | } 35 | linktr[dir] *= one_ov_N / ((double)volume); 36 | g_doublesum(&(linktr[dir])); 37 | ave += linktr[dir]; 38 | 39 | link_det[dir] /= (double)volume; 40 | g_doublesum(&(link_det[dir])); 41 | *det_ave += link_det[dir]; 42 | } 43 | ave /= (double)NUMLINK; 44 | linktrSq *= one_ov_N * one_ov_N / ((double)volume * NUMLINK); 45 | g_doublesum(&linktrSq); 46 | *width = sqrt(linktrSq - ave * ave); 47 | 48 | *det_ave /= (double)NUMLINK; 49 | detSq /= ((double)volume * NUMLINK); 50 | g_doublesum(&detSq); 51 | td = *det_ave; 52 | *det_width = sqrt(detSq - td * td); 53 | 54 | // Check that imaginary parts of determinants vanish 55 | // im_check /= (double)volume; 56 | // g_doublesum(&im_check); 57 | // node0_printf("FLINK_IM %.6g\n", im_check); 58 | 59 | return ave; 60 | } 61 | // ----------------------------------------------------------------- 62 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/mpi/cheb.U3.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 3, DIMF = 9, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Fri Nov 13 23:53:59 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 2 x 4 x 4 x 4 18 | Mallocing 1.4 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 2.7 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 25 42 | reload_serial config.U3.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=0.75 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U3.4444 47 | Time stamp Sun Oct 8 10:56:41 2017 48 | Checksums 3fbef447 1a43c79a OK 49 | Time to reload gauge configuration = 5.891323e-04 50 | CHECK PLAQ: 3.0604476902737061e+00 3.0664742087345997e+00 51 | CHECK NERSC LINKTR: -1.6976032105162631e-03 CKSUM: 0 52 | START 3.0604477 3.0664742 6.1269219 36.827191 53 | FLINK 1.18421 1.1836 1.17128 1.17032 1.19413 1.18071 0.155041 54 | FLINK_DET 0.0867436 0.0590808 0.0553273 0.0525081 0.0778652 0.066305 0.153596 55 | GMES -2.3033198 1.3795486 0 3.0604477 3.0664742 36.827191 2.7556572 56 | BACTION 36.827191 57 | CHEBYSHEV c[0] 1 5.268e-09 58 | CHEBYSHEV c[1] -0.032557022 0.0009981 59 | CHEBYSHEV c[2] -0.49209252 0.001534 60 | CHEBYSHEV c[3] 0.41038389 0.005207 61 | CHEBYSHEV c[4] 1.3501167 0.02322 62 | CHEBYSHEV c[5] 5.4253875 0.1047 63 | CHEBYSHEV c[6] 24.026986 0.4968 64 | CHEBYSHEV c[7] 109.93388 2.567 65 | CHEBYSHEV c[8] 519.87664 14.12 66 | CHEBYSHEV c[9] 2526.4537 81.14 67 | RUNNING COMPLETED 68 | 69 | Time = 0.2207 seconds 70 | exit: Fri Nov 13 23:54:00 2020 71 | 72 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/mpi/cheb.U4.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 4, DIMF = 16, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = MPI (portable), with 2 nodes 4 | Phi algorithm 5 | start: Sat Nov 14 00:18:37 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 2 x 4 x 4 x 4 18 | Mallocing 1.6 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 4.8 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 30 42 | reload_serial config.U4.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=1 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U4.4444 47 | Time stamp Sun Oct 8 19:11:38 2017 48 | Checksums b42f2d5f cbf74541 OK 49 | Time to reload gauge configuration = 7.531643e-04 50 | CHECK PLAQ: 4.1944677203246785e+00 4.3618804001854983e+00 51 | CHECK NERSC LINKTR: -6.6924965564520988e-03 CKSUM: 0 52 | START 4.1944677 4.3618804 8.5563481 69.318071 53 | FLINK 1.1881 1.20636 1.19337 1.25722 1.21416 1.21184 0.118836 54 | FLINK_DET 0.0527206 0.0544836 0.0645982 0.0947051 0.0747196 0.0682454 0.0906727 55 | GMES 4.6030493 0.73341625 0 4.1944677 4.3618804 69.318071 4.7317149 56 | BACTION 69.318071 57 | CHEBYSHEV c[0] 1 7.451e-09 58 | CHEBYSHEV c[1] -0.17299059 0.0005449 59 | CHEBYSHEV c[2] -0.53886129 0.000947 60 | CHEBYSHEV c[3] 0.64751069 0.003928 61 | CHEBYSHEV c[4] 2.3803633 0.02901 62 | CHEBYSHEV c[5] 13.346818 0.2025 63 | CHEBYSHEV c[6] 82.591773 1.461 64 | CHEBYSHEV c[7] 531.41936 10.93 65 | CHEBYSHEV c[8] 3534.998 85.01 66 | CHEBYSHEV c[9] 24162.686 683.8 67 | RUNNING COMPLETED 68 | 69 | Time = 0.4212 seconds 70 | exit: Sat Nov 14 00:18:37 2020 71 | 72 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/scalar/cheb.U2.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 2, DIMF = 4, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Sat Nov 14 01:47:11 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 4 x 4 x 4 x 4 18 | Mallocing 2.5 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 2.6 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 25 42 | reload_serial config.U2.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=0.5 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U2.4444 47 | Time stamp Sun Oct 8 07:57:07 2017 48 | Checksums 632f69a0 bb8becc OK 49 | Time to reload gauge configuration = 3.509521e-04 50 | CHECK PLAQ: 1.9591170386368091e+00 1.9387730551508786e+00 51 | CHECK NERSC LINKTR: -5.3727121771416364e-03 CKSUM: 0 52 | START 1.959117 1.9387731 3.8978901 14.998133 53 | FLINK 1.12202 1.11849 1.19757 1.13141 1.18887 1.15167 0.221792 54 | FLINK_DET -0.311655 -0.316585 -0.466819 -0.327039 -0.422255 -0.36887 0.313824 55 | GMES 0.47956751 0.16301621 0 1.959117 1.9387731 14.998133 1.1964925 56 | BACTION 14.998133 57 | CHEBYSHEV c[0] 1 0 58 | CHEBYSHEV c[1] -0.052180675 0.00158 59 | CHEBYSHEV c[2] -0.54469274 0.001447 60 | CHEBYSHEV c[3] 0.2074749 0.001998 61 | CHEBYSHEV c[4] 0.27830087 0.006793 62 | CHEBYSHEV c[5] 0.42059875 0.02166 63 | CHEBYSHEV c[6] 1.0540792 0.0563 64 | CHEBYSHEV c[7] 2.4732846 0.1454 65 | CHEBYSHEV c[8] 6.1304521 0.4085 66 | CHEBYSHEV c[9] 15.478953 1.18 67 | RUNNING COMPLETED 68 | 69 | Time = 0.1182 seconds 70 | exit: Sat Nov 14 01:47:11 2020 71 | 72 | -------------------------------------------------------------------------------- /4d_Q16/testsuite/scalar/cheb.U3.ref: -------------------------------------------------------------------------------- 1 | N=4 SYM, Nc = 3, DIMF = 9, fermion rep = adjoint 2 | Microcanonical simulation with refreshing 3 | Machine = Scalar processor, with 1 nodes 4 | Phi algorithm 5 | start: Sat Nov 14 01:52:52 2020 6 | 7 | type 0 for no prompts or 1 for prompts 8 | nx 4 9 | ny 4 10 | nz 4 11 | nt 4 12 | PBC -1 13 | iseed 41 14 | Nroot 1 15 | Norder 15 16 | LAYOUT = Hypercubes, options = hyper_prime 17 | ON EACH NODE 4 x 4 x 4 x 4 18 | Mallocing 2.9 MBytes per core for lattice 19 | Antiperiodic temporal boundary conditions 20 | Double-trace scalar potential 21 | Rescaled fermion operator 22 | Mallocing 5.5 MBytes per core for fields 23 | 24 | 25 | warms 0 26 | trajecs 3 27 | traj_length 1 28 | nstep 5 29 | nstep_gauge 4 30 | traj_between_meas 3 31 | lambda 1 32 | kappa_u1 1 33 | bmass 1 34 | fmass 0 35 | G 0.1 36 | max_cg_iterations 5000 37 | error_per_site 1e-05 38 | Nstoch 5 39 | cheb_order 10 40 | lambda_min -0.02 41 | lambda_max 25 42 | reload_serial config.U3.4444 43 | forget 44 | lambda=1 --> kappa=Nc/(4lambda)=0.75 45 | C2=1 46 | Restored binary gauge configuration serially from file config.U3.4444 47 | Time stamp Sun Oct 8 10:56:41 2017 48 | Checksums 3fbef447 1a43c79a OK 49 | Time to reload gauge configuration = 4.420280e-04 50 | CHECK PLAQ: 3.0604476902737061e+00 3.0664742087346011e+00 51 | CHECK NERSC LINKTR: -1.6976032105162631e-03 CKSUM: 0 52 | START 3.0604477 3.0664742 6.1269219 36.827191 53 | FLINK 1.18421 1.1836 1.17128 1.17032 1.19413 1.18071 0.155041 54 | FLINK_DET 0.0867436 0.0590808 0.0553273 0.0525081 0.0778652 0.066305 0.153596 55 | GMES -2.3033198 1.3795486 0 3.0604477 3.0664742 36.827191 2.7556572 56 | BACTION 36.827191 57 | CHEBYSHEV c[0] 1 5.268e-09 58 | CHEBYSHEV c[1] -0.032557022 0.0009981 59 | CHEBYSHEV c[2] -0.49209252 0.001534 60 | CHEBYSHEV c[3] 0.41038389 0.005207 61 | CHEBYSHEV c[4] 1.3501167 0.02322 62 | CHEBYSHEV c[5] 5.4253875 0.1047 63 | CHEBYSHEV c[6] 24.026986 0.4968 64 | CHEBYSHEV c[7] 109.93388 2.567 65 | CHEBYSHEV c[8] 519.87664 14.12 66 | CHEBYSHEV c[9] 2526.4537 81.14 67 | RUNNING COMPLETED 68 | 69 | Time = 0.2869 seconds 70 | exit: Sat Nov 14 01:52:53 2020 71 | 72 | -------------------------------------------------------------------------------- /4d_Q16/susy/print_var3.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Write out all values of NBPAVRG correlators 3 | // The label is the member of the site structure 4 | // The data is printed for each three-dimensional spatial separation 5 | // Write only for t=0 6 | #include "susy_includes.h" 7 | // ----------------------------------------------------------------- 8 | 9 | 10 | 11 | // ----------------------------------------------------------------- 12 | void print_var3(char *label) { 13 | #ifdef PL_CORR 14 | int currentnode = 0, newnode; 15 | int l, x, y, z, t, node0 = 0; 16 | complex lbuf; 17 | 18 | g_sync(); 19 | t = 0; 20 | for (z = 0; z < nx; z++) { 21 | for (y = 0; y < ny; y++) { 22 | for (x = 0; x < nx; x++) { 23 | newnode = node_number(x, y, z, t); 24 | if (newnode != currentnode) { // Switch to another node 25 | g_sync(); 26 | currentnode = newnode; 27 | } 28 | if (this_node == 0) { 29 | if (currentnode == 0) { 30 | l = node_index(x, y, z, t); 31 | lbuf = lattice[l].print_var; 32 | } 33 | else 34 | get_field((char *)&lbuf, sizeof(complex), currentnode); 35 | 36 | // See defines for avg[] above 37 | // for the order of the output correlation values 38 | if ((printf("%s %d %d %d %.6g %.6g\n",label, x, y, z, 39 | (double)lbuf.real, (double)lbuf.imag) == EOF)) { 40 | printf("print_var: Write error\n"); 41 | terminate(1); 42 | } 43 | } 44 | else { // For nodes other than 0 45 | if (this_node == currentnode) { 46 | node0_printf("This node is zero\n"); 47 | l = node_index(x, y, z, t); 48 | lbuf = lattice[l].print_var; 49 | send_field((char *)&lbuf, sizeof(complex), node0); 50 | } 51 | } 52 | } 53 | } 54 | } 55 | g_sync(); 56 | if (this_node == 0) 57 | fflush(stdout); 58 | #endif 59 | } 60 | // ----------------------------------------------------------------- 61 | -------------------------------------------------------------------------------- /4d_Q16/susy/blocked_ploop.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Evaluate the Polyakov loop after block RG blocking steps 3 | // Use general_gathers; lattice must be divisible by 2^block in all dirs 4 | // Use tempmat and tempmat2 for temporary storage 5 | #include "susy_includes.h" 6 | 7 | void blocked_ploop(int Nsmear, int block) { 8 | register int i; 9 | register site *s; 10 | int j, bl = 2, d[NDIMS] = {0, 0, 0, 0}; 11 | complex sum = cmplx(0.0, 0.0), plp; 12 | msg_tag *tag; 13 | 14 | // Allow sanity check of reproducing ploop() with this routine 15 | if (block <= 0) 16 | bl = 1; 17 | 18 | // Set number of links to stride, bl = 2^block 19 | for (j = 1; j < block; j++) 20 | bl *= 2; 21 | 22 | // Copy temporal links to tempmat 23 | FORALLSITES(i, s) 24 | mat_copy(&(s->link[TUP]), &(tempmat[i])); 25 | 26 | // Compute the bl-strided Polyakov loop "at" ALL the sites 27 | // on the first bl = 2^block timeslices 28 | for (j = bl; j < nt; j += bl) { 29 | d[TUP] = j; // Path from which to gather 30 | tag = start_general_gather_field(tempmat, sizeof(matrix), 31 | d, EVENANDODD, gen_pt[0]); 32 | wait_general_gather(tag); 33 | 34 | // Overwrite tempmat on the first bl time slices 35 | // Leave the others undisturbed so we can still gather them 36 | FORALLSITES(i, s) { 37 | if (s->t >= bl) 38 | continue; 39 | mult_nn(&(tempmat[i]), (matrix *)gen_pt[0][i], &(tempmat2[i])); 40 | mat_copy(&(tempmat2[i]), &(tempmat[i])); 41 | } 42 | cleanup_general_gather(tag); 43 | } 44 | FORALLSITES(i, s) { 45 | if (s->t >= bl) 46 | continue; 47 | plp = trace(&(tempmat[i])); 48 | CSUM(sum, plp); 49 | } 50 | 51 | // Average all the loops we just calculated 52 | g_complexsum(&sum); 53 | plp.real = sum.real / ((Real)(nx * ny * nz * bl)); 54 | plp.imag = sum.imag / ((Real)(nx * ny * nz * bl)); 55 | node0_printf("BPLOOP %d %d %.8g %.8g\n", Nsmear, block, plp.real, plp.imag); 56 | } 57 | // ----------------------------------------------------------------- 58 | -------------------------------------------------------------------------------- /4d_Q16/libraries/m_mat_nn.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Matrix multiplication with no adjoints 3 | // c <-- c + a * b 4 | // c <-- c - a * b 5 | // c <-- a * b 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void mult_nn_sum(matrix *a, matrix *b, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += a->e[i][k].real * b->e[k][j].real 16 | - a->e[i][k].imag * b->e[k][j].imag; 17 | c->e[i][j].imag += a->e[i][k].imag * b->e[k][j].real 18 | + a->e[i][k].real * b->e[k][j].imag; 19 | } 20 | } 21 | } 22 | } 23 | 24 | void mult_nn_dif(matrix *a, matrix *b, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= a->e[i][k].real * b->e[k][j].real 30 | - a->e[i][k].imag * b->e[k][j].imag; 31 | c->e[i][j].imag -= a->e[i][k].imag * b->e[k][j].real 32 | + a->e[i][k].real * b->e[k][j].imag; 33 | } 34 | } 35 | } 36 | } 37 | 38 | void mult_nn(matrix *a, matrix *b, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[i][0].real * b->e[0][j].real 44 | - a->e[i][0].imag * b->e[0][j].imag; 45 | c->e[i][j].imag = a->e[i][0].imag * b->e[0][j].real 46 | + a->e[i][0].real * b->e[0][j].imag; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[i][k].real * b->e[k][j].real 49 | - a->e[i][k].imag * b->e[k][j].imag; 50 | c->e[i][j].imag += a->e[i][k].imag * b->e[k][j].real 51 | + a->e[i][k].real * b->e[k][j].imag; 52 | } 53 | } 54 | } 55 | } 56 | // ----------------------------------------------------------------- 57 | -------------------------------------------------------------------------------- /4d_Q16/libraries/m_mat_an.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Matrix multiplication with adjoint of first matrix 3 | // c <-- c + adag * b 4 | // c <-- c - adag * b 5 | // c <-- adag * b 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void mult_an_sum(matrix *a, matrix *b, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += a->e[k][i].real * b->e[k][j].real 16 | + a->e[k][i].imag * b->e[k][j].imag; 17 | c->e[i][j].imag += a->e[k][i].real * b->e[k][j].imag 18 | - a->e[k][i].imag * b->e[k][j].real; 19 | } 20 | } 21 | } 22 | } 23 | 24 | void mult_an_dif(matrix *a, matrix *b, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= a->e[k][i].real * b->e[k][j].real 30 | + a->e[k][i].imag * b->e[k][j].imag; 31 | c->e[i][j].imag -= a->e[k][i].real * b->e[k][j].imag 32 | - a->e[k][i].imag * b->e[k][j].real; 33 | } 34 | } 35 | } 36 | } 37 | 38 | void mult_an(matrix *a, matrix *b, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[0][i].real * b->e[0][j].real 44 | + a->e[0][i].imag * b->e[0][j].imag; 45 | c->e[i][j].imag = a->e[0][i].real * b->e[0][j].imag 46 | - a->e[0][i].imag * b->e[0][j].real; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[k][i].real * b->e[k][j].real 49 | + a->e[k][i].imag * b->e[k][j].imag; 50 | c->e[i][j].imag += a->e[k][i].real * b->e[k][j].imag 51 | - a->e[k][i].imag * b->e[k][j].real; 52 | } 53 | } 54 | } 55 | } 56 | // ----------------------------------------------------------------- 57 | -------------------------------------------------------------------------------- /4d_Q16/libraries/m_mat_na.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Matrix multiplication with adjoint of second matrix 3 | // c <-- c + a * bdag 4 | // c <-- c - a * bdag 5 | // c <-- a * bdag 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void mult_na_sum(matrix *a, matrix *b, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += a->e[i][k].real * b->e[j][k].real 16 | + a->e[i][k].imag * b->e[j][k].imag; 17 | c->e[i][j].imag += a->e[i][k].imag * b->e[j][k].real 18 | - a->e[i][k].real * b->e[j][k].imag; 19 | } 20 | } 21 | } 22 | } 23 | 24 | void mult_na_dif(matrix *a, matrix *b, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= a->e[i][k].real * b->e[j][k].real 30 | + a->e[i][k].imag * b->e[j][k].imag; 31 | c->e[i][j].imag -= a->e[i][k].imag * b->e[j][k].real 32 | - a->e[i][k].real * b->e[j][k].imag; 33 | } 34 | } 35 | } 36 | } 37 | 38 | void mult_na(matrix *a, matrix *b, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[i][0].real * b->e[j][0].real 44 | + a->e[i][0].imag * b->e[j][0].imag; 45 | c->e[i][j].imag = a->e[i][0].imag * b->e[j][0].real 46 | - a->e[i][0].real * b->e[j][0].imag; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[i][k].real * b->e[j][k].real 49 | + a->e[i][k].imag * b->e[j][k].imag; 50 | c->e[i][j].imag += a->e[i][k].imag * b->e[j][k].real 51 | - a->e[i][k].real * b->e[j][k].imag; 52 | } 53 | } 54 | } 55 | } 56 | // ----------------------------------------------------------------- 57 | -------------------------------------------------------------------------------- /4d_Q16/generic/make_lattice.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Allocate space for lattice fields in the site struct 3 | // Fill in coordinates, parity, index 4 | // Allocate gen_pt pointers for gather results 5 | // Initialize site-based random number generator if SITERAND defined 6 | #include "generic_includes.h" 7 | #include // For SITERAND 8 | 9 | void make_lattice() { 10 | register int i; 11 | int x, y, z, t; 12 | 13 | // Allocate space for lattice 14 | node0_printf("Mallocing %.1f MBytes per core for lattice\n", 15 | (double)sites_on_node * sizeof(site) / 1e6); 16 | lattice = malloc(sizeof *lattice * sites_on_node); 17 | if (lattice == NULL) { 18 | printf("node%d: no room for lattice\n", this_node); 19 | terminate(1); 20 | } 21 | 22 | // Allocate address vectors 23 | for (i = 0; i < N_POINTERS; i++) { 24 | gen_pt[i] = malloc(sizeof(char*) * sites_on_node); 25 | if (gen_pt[i] == NULL) { 26 | printf("node%d: no room for pointer array\n", this_node); 27 | terminate(1); 28 | } 29 | } 30 | 31 | // Fill in parity, coordinates and index 32 | for (t = 0; t < nt; t++) { 33 | for (z = 0; z < nz; z++) { 34 | for (y = 0; y < ny; y++) { 35 | for (x = 0; x < nx; x++) { 36 | if (node_number(x, y, z, t) == mynode()) { 37 | i = node_index(x, y, z, t); 38 | lattice[i].x = x; 39 | lattice[i].y = y; 40 | lattice[i].z = z; 41 | lattice[i].t = t; 42 | lattice[i].index = x + nx * (y + ny * (z + nz * t)); 43 | if ((x + y + z + t) % 2 == 0) 44 | lattice[i].parity = EVEN; 45 | else 46 | lattice[i].parity = ODD; 47 | #ifdef SITERAND 48 | initialize_prn(&(lattice[i].site_prn), iseed, lattice[i].index); 49 | #endif 50 | } 51 | } 52 | } 53 | } 54 | } 55 | } 56 | 57 | void free_lattice() { 58 | int i; 59 | 60 | for (i = 0; i < N_POINTERS; i++) 61 | free(gen_pt[i]); 62 | 63 | free(lattice); 64 | } 65 | // ----------------------------------------------------------------- 66 | -------------------------------------------------------------------------------- /2d_Q04/susy/defines.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Compiler macros common to all targets in this application 3 | #ifndef _DEFINES_H 4 | #define _DEFINES_H 5 | 6 | #define SITERAND // Use site-based random number generators 7 | #define GAUGE_FIX_TOL 1.0e-7 // For gauge fixing 8 | //#define TIMING // Not currently used 9 | // ----------------------------------------------------------------- 10 | 11 | 12 | 13 | // ----------------------------------------------------------------- 14 | // Integrator stuff 15 | // Omelyan lambda, 2lambda and 1 - 2lambda 16 | #define LAMBDA 0.193 17 | #define TWO_LAMBDA 0.386 18 | #define LAMBDA_MID 0.614 19 | // ----------------------------------------------------------------- 20 | 21 | 22 | 23 | // ----------------------------------------------------------------- 24 | // Susy stuff 25 | //#define EIG_POT // Single rather than double-trace scalar potential 26 | // Single-trace case is minimally tested!!! 27 | #define SV // Site/vector terms in action 28 | #define VP // Vector/plaquette terms in action 29 | //#define DEBUG_CHECK // Print lambdas, offsets, etc. 30 | 31 | // Tunable parameter in gauge action 32 | #define C2 1.0 33 | 34 | // Whether or not to project determinant out of given observable 35 | #define NODET 0 36 | #define YESDET 1 37 | // ----------------------------------------------------------------- 38 | 39 | 40 | 41 | // ----------------------------------------------------------------- 42 | // Measurement stuff 43 | // Gauge fixing options 44 | #define NO_GAUGE_FIX 30 45 | #define COULOMB_GAUGE_FIX 31 46 | 47 | // Smearing options 48 | #define NO_SMEAR 40 49 | #define STOUT_SMEAR 41 50 | #define APE_SMEAR 42 51 | 52 | // Threshold to print warning about non-zero imaginary components 53 | // of quantities expected to be real 54 | #define IMAG_TOL 1.0e-8 55 | #define SQ_TOL 1.0e-16 56 | 57 | // Maximum time value and spatial distance for Wilson loops 58 | #define MAX_T (nt / 2) 59 | #define MAX_X (nx / 2 - 1) 60 | #endif 61 | // ----------------------------------------------------------------- 62 | -------------------------------------------------------------------------------- /1d_Q16/susy/control_phase.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Main procedure for BFSS/BMN pfaffian phase 3 | #define CONTROL 4 | #include "susy_includes.h" 5 | 6 | int main(int argc, char *argv[]) { 7 | int prompt, j; 8 | double b_act, dtime, Xtr[NSCALAR], Xtr_ave, Xtr_width; 9 | complex plp = cmplx(99.0, 99.0); 10 | #ifndef PHASE 11 | node0_printf("Don't use control_phase unless compiling with -DPHASE!\n"); 12 | terminate(1); 13 | #endif 14 | 15 | // Setup 16 | setlinebuf(stdout); // DEBUG 17 | initialize_machine(&argc, &argv); 18 | // Remap standard I/O 19 | if (remap_stdio_from_args(argc, argv) == 1) 20 | terminate(1); 21 | 22 | g_sync(); 23 | prompt = setup(); 24 | setup_lambda(); 25 | setup_gamma(); 26 | 27 | // Load input and run 28 | if (readin(prompt) != 0) { 29 | node0_printf("ERROR in readin, aborting\n"); 30 | terminate(1); 31 | } 32 | dtime = -dclock(); 33 | 34 | // Compute bosonic action, scalar squares and Polyakov loop to check config 35 | b_act = bosonic_action(&(Xtr[0]), &(Xtr[1]), &(Xtr[2]), &(Xtr[3])); 36 | node0_printf("START %.8g\n", b_act / (double)nt); 37 | 38 | Xtr_ave = scalar_trace(Xtr, &Xtr_width); 39 | node0_printf("SCALAR SQUARES"); 40 | for (j = 0; j < NSCALAR; j++) 41 | node0_printf(" %.6g", Xtr[j]); 42 | node0_printf(" %.6g %.6g\n", Xtr_ave, Xtr_width); 43 | 44 | // Print Polyakov loop eigenvalues followed by trace itself 45 | // Format: GMES Re(Polyakov) Im(Poyakov) cg_iters 46 | plp = ploop_eig(); 47 | node0_printf("GMES %.8g %.8g 0 ", plp.real, plp.imag); 48 | 49 | // More details of bosonic action (to match expected GMES output format) 50 | node0_printf("%.8g %.8g %.8g %.8g\n", 51 | b_act / (double)nt, Xtr[0] / (double)nt, 52 | Xtr[1] / (double)nt, Xtr[2] / (double)nt); 53 | 54 | // Main measurement: pfaffian 55 | phase(); 56 | 57 | node0_printf("RUNNING COMPLETED\n"); 58 | dtime += dclock(); 59 | node0_printf("\nTime = %.4g seconds\n", dtime); 60 | fflush(stdout); 61 | normal_exit(0); // Needed by at least some clusters 62 | return 0; 63 | } 64 | // ----------------------------------------------------------------- 65 | -------------------------------------------------------------------------------- /2d_Q04/susy/params.h: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Structure for passing simulation parameters to each node 3 | #ifndef _PARAMS_H 4 | #define _PARAMS_H 5 | #include "../include/macros.h" // For MAXFILENAME 6 | 7 | typedef struct { 8 | int stopflag; // 1 if it is time to stop 9 | 10 | // Initialization parameters 11 | int nx, nt; // Lattice dimensions 12 | int PBC; // Temporal fermion boundary condition 13 | int iseed; // For random numbers 14 | 15 | // RHMC and multi-mass CG parameters 16 | // Number of Nth roots and polynomial order 17 | int Nroot, Norder; 18 | 19 | int warms; // The number of warmup trajectories 20 | int trajecs; // The number of real trajectories 21 | Real traj_length; // The length of each trajectory 22 | int nsteps[2]; // Fermion and gauge steps 23 | int propinterval; // Number of trajectories between measurements 24 | int startflag; // What to do for beginning lattice 25 | int fixflag; // Whether to gauge fix to Coulomb gauge 26 | int saveflag; // What to do with lattice at end 27 | Real lambda, kappa; // 't Hooft coupling and Nc/(4lambda) 28 | Real bmass, fmass; // Bosonic and fermion masses 29 | Real kappa_u1; // Plaquette determinant coupling 30 | Real G; // Q-invariant plaquette determinant coupling 31 | 32 | // Inversion parameters 33 | int niter; // Maximum number of CG iterations 34 | Real rsqmin; // For deciding on convergence 35 | char startfile[MAXFILENAME], savefile[MAXFILENAME]; 36 | 37 | #ifdef BILIN 38 | int nsrc; // Number of stochastic sources 39 | #endif 40 | 41 | #ifdef SMEAR 42 | // Parameters for APE or stout smearing 43 | int smearflag; // NONE, STOUT, APE 44 | int Nsmear; 45 | Real alpha; 46 | #endif 47 | 48 | #ifdef EIG 49 | // Eigenvalue parameters 50 | int Nvec, maxIter; 51 | Real eig_tol; 52 | #endif 53 | 54 | #ifdef PHASE 55 | // Pfaffian parameters 56 | int ckpt_load, ckpt_save; 57 | #endif 58 | } params; 59 | #endif 60 | // ----------------------------------------------------------------- 61 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_mat_nn.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Scaled matrix multiplication with no adjoints 3 | // c <-- c + s * a * b 4 | // c <-- c - s * a * b 5 | // c <-- s * a * b 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void scalar_mult_nn_sum(matrix *a, matrix *b, Real s, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += s * (a->e[i][k].real * b->e[k][j].real 16 | - a->e[i][k].imag * b->e[k][j].imag); 17 | c->e[i][j].imag += s * (a->e[i][k].imag * b->e[k][j].real 18 | + a->e[i][k].real * b->e[k][j].imag); 19 | } 20 | } 21 | } 22 | } 23 | 24 | void scalar_mult_nn_dif(matrix *a, matrix *b, Real s, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= s * (a->e[i][k].real * b->e[k][j].real 30 | - a->e[i][k].imag * b->e[k][j].imag); 31 | c->e[i][j].imag -= s * (a->e[i][k].imag * b->e[k][j].real 32 | + a->e[i][k].real * b->e[k][j].imag); 33 | } 34 | } 35 | } 36 | } 37 | 38 | void scalar_mult_nn(matrix *a, matrix *b, Real s, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[i][0].real * b->e[0][j].real 44 | - a->e[i][0].imag * b->e[0][j].imag; 45 | c->e[i][j].imag = a->e[i][0].imag * b->e[0][j].real 46 | + a->e[i][0].real * b->e[0][j].imag; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[i][k].real * b->e[k][j].real 49 | - a->e[i][k].imag * b->e[k][j].imag; 50 | c->e[i][j].imag += a->e[i][k].imag * b->e[k][j].real 51 | + a->e[i][k].real * b->e[k][j].imag; 52 | } 53 | c->e[i][j].real *= s; 54 | c->e[i][j].imag *= s; 55 | } 56 | } 57 | } 58 | // ----------------------------------------------------------------- 59 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_mat_na.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Scaled matrix multiplication with adjoint of second matrix 3 | // c <-- c + a * bdag 4 | // c <-- c - a * bdag 5 | // c <-- a * bdag 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void scalar_mult_na_sum(matrix *a, matrix *b, Real s, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += s * (a->e[i][k].real * b->e[j][k].real 16 | + a->e[i][k].imag * b->e[j][k].imag); 17 | c->e[i][j].imag += s * (a->e[i][k].imag * b->e[j][k].real 18 | - a->e[i][k].real * b->e[j][k].imag); 19 | } 20 | } 21 | } 22 | } 23 | 24 | void scalar_mult_na_dif(matrix *a, matrix *b, Real s, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= s * (a->e[i][k].real * b->e[j][k].real 30 | + a->e[i][k].imag * b->e[j][k].imag); 31 | c->e[i][j].imag -= s * (a->e[i][k].imag * b->e[j][k].real 32 | - a->e[i][k].real * b->e[j][k].imag); 33 | } 34 | } 35 | } 36 | } 37 | 38 | void scalar_mult_na(matrix *a, matrix *b, Real s, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[i][0].real * b->e[j][0].real 44 | + a->e[i][0].imag * b->e[j][0].imag; 45 | c->e[i][j].imag = a->e[i][0].imag * b->e[j][0].real 46 | - a->e[i][0].real * b->e[j][0].imag; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[i][k].real * b->e[j][k].real 49 | + a->e[i][k].imag * b->e[j][k].imag; 50 | c->e[i][j].imag += a->e[i][k].imag * b->e[j][k].real 51 | - a->e[i][k].real * b->e[j][k].imag; 52 | } 53 | c->e[i][j].real *= s; 54 | c->e[i][j].imag *= s; 55 | } 56 | } 57 | } 58 | // ----------------------------------------------------------------- 59 | -------------------------------------------------------------------------------- /2d_Q04/susy/local_plaq.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Measure average space--space and space--time plaquettes 3 | // Use tempmat for temporary storage 4 | 5 | // #define MIN_PLAQ turns on measurement of minimum plaquette per config 6 | // #define PLAQ_DIST prints out all plaquettes for plotting distribution 7 | // CAUTION: Do not run PLAQ_DIST with MPI! 8 | 9 | #define MIN_PLAQ 10 | //#define PLAQ_DIST 11 | #include "susy_includes.h" 12 | 13 | double local_plaquette(double *plaq) { 14 | register int i; 15 | register site *s; 16 | double sum = 0.0, cur_plaq, max_plaq = 0.0; 17 | #ifdef MIN_PLAQ 18 | double min_plaq = 200.0 * NCOL; 19 | #endif 20 | msg_tag *mtag0, *mtag1; 21 | matrix tmat; 22 | 23 | #ifdef PLAQ_DIST 24 | if (this_node != 0) { 25 | printf("plaquette: don't run PLAQ_DIST in parallel\n"); 26 | fflush(stdout); 27 | terminate(1); 28 | } 29 | #endif 30 | 31 | mtag0 = start_gather_site(F_OFFSET(link[XUP]), sizeof(matrix), 32 | goffset[TUP], EVENANDODD, gen_pt[0]); 33 | mtag1 = start_gather_site(F_OFFSET(link[TUP]), sizeof(matrix), 34 | goffset[XUP], EVENANDODD, gen_pt[1]); 35 | 36 | FORALLSITES(i, s) 37 | mult_an(&(s->link[XUP]), &(s->link[TUP]), &(tempmat[i])); 38 | wait_gather(mtag0); 39 | wait_gather(mtag1); 40 | 41 | FORALLSITES(i, s) { 42 | mult_nn(&(tempmat[i]), (matrix *)(gen_pt[0][i]), &tmat); 43 | cur_plaq = (double)realtrace((matrix *)(gen_pt[1][i]), &tmat); 44 | if (cur_plaq > max_plaq) 45 | max_plaq = cur_plaq; 46 | #ifdef MIN_PLAQ 47 | if (cur_plaq < min_plaq) 48 | min_plaq = cur_plaq; 49 | #endif 50 | #ifdef PLAQ_DIST 51 | printf("PLAQ_DIST %d %d %.4g\n", s->x, s->t, cur_plaq); 52 | #endif 53 | sum += cur_plaq; 54 | } 55 | cleanup_gather(mtag0); 56 | cleanup_gather(mtag1); 57 | g_doublesum(&sum); 58 | 59 | // Average over volume 60 | *plaq = sum / ((double)(volume)); 61 | 62 | g_doublemax(&max_plaq); 63 | #ifdef MIN_PLAQ 64 | // Somewhat hacky since we don't have g_doublemin... 65 | min_plaq = -min_plaq; 66 | g_doublemax(&min_plaq); 67 | min_plaq = -min_plaq; 68 | node0_printf("MIN_PLAQ %.8g", min_plaq); 69 | #endif 70 | return max_plaq; 71 | } 72 | // ----------------------------------------------------------------- 73 | -------------------------------------------------------------------------------- /4d_Q16/libraries/s_m_mat_an.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Scaled matrix multiplication with adjoint of first matrix 3 | // c <-- s * c + adag * b 4 | // c <-- s * c - adag * b 5 | // c <-- s * adag * b 6 | #include "../include/config.h" 7 | #include "../include/complex.h" 8 | #include "../include/susy.h" 9 | 10 | void scalar_mult_an_sum(matrix *a, matrix *b, Real s, matrix *c) { 11 | register int i, j, k; 12 | for (i = 0; i < NCOL; i++) { 13 | for (j = 0; j < NCOL; j++) { 14 | for (k = 0; k < NCOL; k++) { 15 | c->e[i][j].real += s * (a->e[k][i].real * b->e[k][j].real 16 | + a->e[k][i].imag * b->e[k][j].imag); 17 | c->e[i][j].imag += s * (a->e[k][i].real * b->e[k][j].imag 18 | - a->e[k][i].imag * b->e[k][j].real); 19 | } 20 | } 21 | } 22 | } 23 | 24 | void scalar_mult_an_dif(matrix *a, matrix *b, Real s, matrix *c) { 25 | register int i, j, k; 26 | for (i = 0; i < NCOL; i++) { 27 | for (j = 0; j < NCOL; j++) { 28 | for (k = 0; k < NCOL; k++) { 29 | c->e[i][j].real -= s * (a->e[k][i].real * b->e[k][j].real 30 | + a->e[k][i].imag * b->e[k][j].imag); 31 | c->e[i][j].imag -= s * (a->e[k][i].real * b->e[k][j].imag 32 | - a->e[k][i].imag * b->e[k][j].real); 33 | } 34 | } 35 | } 36 | } 37 | 38 | void scalar_mult_an(matrix *a, matrix *b, Real s, matrix *c) { 39 | register int i, j, k; 40 | for (i = 0; i < NCOL; i++) { 41 | for (j = 0; j < NCOL; j++) { 42 | // Initialize 43 | c->e[i][j].real = a->e[0][i].real * b->e[0][j].real 44 | + a->e[0][i].imag * b->e[0][j].imag; 45 | c->e[i][j].imag = a->e[0][i].real * b->e[0][j].imag 46 | - a->e[0][i].imag * b->e[0][j].real; 47 | for (k = 1; k < NCOL; k++) { 48 | c->e[i][j].real += a->e[k][i].real * b->e[k][j].real 49 | + a->e[k][i].imag * b->e[k][j].imag; 50 | c->e[i][j].imag += a->e[k][i].real * b->e[k][j].imag 51 | - a->e[k][i].imag * b->e[k][j].real; 52 | } 53 | c->e[i][j].real *= s; 54 | c->e[i][j].imag *= s; 55 | } 56 | } 57 | } 58 | // ----------------------------------------------------------------- 59 | -------------------------------------------------------------------------------- /2d_Q04/susy/hvy_pot_loop.c: -------------------------------------------------------------------------------- 1 | // ----------------------------------------------------------------- 2 | // Wilson loops for static potential using path 3 | // This version computes simple rectangular loops so gauge fixing has no effect 4 | // Use tempmat for temporary storage 5 | #include "susy_includes.h" 6 | 7 | void hvy_pot_loop(int do_det) { 8 | register int i; 9 | register site *s; 10 | int t_dist, x_dist, length; 11 | int dir[2 * (MAX_T + MAX_X)], sign[2 * (MAX_T + MAX_X)]; 12 | double wloop; 13 | complex tc; 14 | matrix tmat; 15 | 16 | node0_printf("hvy_pot_loop: MAX_T = %d, MAX_X = %d\n", MAX_T, MAX_X); 17 | 18 | // Use tempmat to hold loop product at each site 19 | for (t_dist = 1; t_dist <= MAX_T; t_dist++) { 20 | // Set up rectangular path as list of dir * sign 21 | for (x_dist = 0; x_dist <= MAX_X; x_dist++) { 22 | length = 2 * (x_dist + t_dist); 23 | for (i = 0; i < x_dist; i++) { 24 | dir[i] = XUP; 25 | sign[i] = 1; 26 | } 27 | for (i = x_dist; i < x_dist + t_dist; i++) { 28 | dir[i] = TUP; 29 | sign[i] = 1; 30 | } 31 | for (i = x_dist + t_dist; i < 2 * x_dist + t_dist; i++) { 32 | dir[i] = XUP; 33 | sign[i] = -1; 34 | } 35 | for (i = 2 * x_dist + t_dist; i < length; i++) { 36 | dir[i] = TUP; 37 | sign[i] = -1; 38 | } 39 | #ifdef DEBUG_CHECK 40 | node0_printf("path %d %d length %d: ", x_dist, t_dist, length); 41 | for (i = 0; i < length; i++) 42 | node0_printf(" %d", dir[i] * sign[i]); 43 | node0_printf("\n"); 44 | #endif 45 | 46 | // path accumulates the product in tempmat 47 | path(dir, sign, length); 48 | wloop = 0.0; 49 | FORALLSITES(i, s) { 50 | if (do_det == 1) 51 | det_project(&(tempmat[i]), &tmat); 52 | else 53 | mat_copy(&(tempmat[i]), &tmat); 54 | 55 | tc = trace(&tmat); 56 | wloop += tc.real; 57 | } 58 | g_doublesum(&wloop); 59 | if (do_det == 1) { // Braces suppress compiler complaint 60 | node0_printf("DL_LOOP "); 61 | } 62 | else 63 | node0_printf("PLOT_LOOP "); 64 | node0_printf("%d %d %.6g\n", x_dist, t_dist, wloop / volume); 65 | } 66 | } 67 | } 68 | // ----------------------------------------------------------------- 69 | --------------------------------------------------------------------------------