Skip to content

Commit

Permalink
Merge pull request #621 from etmc/gkanwar_fixes
Browse files Browse the repository at this point in the history
Some fixes required to build TMLQCD on Daint with libsmear
  • Loading branch information
kostrzewa authored Feb 18, 2025
2 parents 3467944 + fb5ff1a commit fbaf220
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 13 deletions.
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ LDFLAGS="$LDFLAGS -L\${HOME}/lib -L\${top_builddir}/lib"
CCLD=${CC}

# compilation in operator is slowest so we do it first, saves time in parallel compiles
USESUBDIRS="operator linalg solver monomial buffers cu io meas xchange init rational wrapper"
USESUBDIRS="operator linalg solver monomial buffers cu io meas xchange init rational smearing wrapper"

AC_CHECK_HEADERS([stdint.h],
[ dnl for inttypes.h and stdint.h for uint_xxx types
Expand Down
2 changes: 1 addition & 1 deletion monomial/poly_monomial.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@



inline void setPhmcVars(monomial *mnl){
static inline void setPhmcVars(monomial *mnl){
phmc_invmaxev=1.0/mnl->MDPolyLmax;
phmc_dop_n_cheby=(mnl->MDPolyDegree/2)+1;
phmc_Cpol=mnl->MDPolyLocNormConst;
Expand Down
4 changes: 2 additions & 2 deletions smearing/ape.ih
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <ranlxd.h>
#include <sse.h>
#include <get_staples.h>
#include <xchange_gauge.h>
#include <xchange.h>
#include <xchange/xchange_gauge.h>
#include <xchange/xchange.h>
#include <io/gauge.h>
#include <update_backward_gauge.h>

Expand Down
11 changes: 11 additions & 0 deletions smearing/hex.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@
/* Just to have a consistent look to the interface */
typedef struct hyp_parameters hex_parameters;

/* NOTE(gkanwar): Temporarily disable the new gauge_field_t interfaces to enable
* compilation with old su3_tuple array signatures. */
#if 0
/* All defined in terms of arrays of tuples -- needed to allow for g_gauge_field as input */
void stout_exclude_none(gauge_field_t buff_out, double const coeff, gauge_field_array_t staples, gauge_field_t buff_in);
void stout_exclude_one (gauge_field_array_t buff_out, double const coeff, gauge_field_array_t staples, gauge_field_t buff_in);
void stout_exclude_two (gauge_field_array_t buff_out, double const coeff, gauge_field_array_t staples, gauge_field_t buff_in);

int hex_smear(gauge_field_t m_field_out, hex_parameters const *params, gauge_field_t m_field_in); /* 4 components in, 4 components out */
#endif


void stout_exclude_one(su3_tuple **buff_out, double const coeff, su3_tuple **staples, su3_tuple *buff_in);
void stout_exclude_two(su3_tuple **buff_out, double const coeff, su3_tuple **staples, su3_tuple *buff_in);
void stout_exclude_none(su3_tuple *buff_out, double const coeff, su3_tuple **staples, su3_tuple *buff_in);

int hex_smear(su3_tuple *m_field_out, hex_parameters const *params, su3_tuple *m_field_in);
4 changes: 2 additions & 2 deletions smearing/hex.ih
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <ranlxd.h>
#include <sse.h>
#include <get_staples.h>
#include <xchange_gauge.h>
#include <xchange.h>
#include <xchange/xchange_gauge.h>
#include <xchange/xchange.h>
#include <io/gauge.h>
#include <update_backward_gauge.h>

Expand Down
4 changes: 2 additions & 2 deletions smearing/hyp.ih
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <ranlxd.h>
#include <sse.h>
#include <get_staples.h>
#include <xchange_gauge.h>
#include <xchange.h>
#include <xchange/xchange_gauge.h>
#include <xchange/xchange.h>
#include <io/gauge.h>
#include <update_backward_gauge.h>

Expand Down
4 changes: 2 additions & 2 deletions smearing/stout.ih
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <ranlxd.h>
#include <sse.h>
#include <get_staples.h>
#include <xchange_gauge.h>
#include <xchange.h>
#include <xchange/xchange_gauge.h>
#include <xchange/xchange.h>
#include <io/gauge.h>
#include <update_backward_gauge.h>

Expand Down
5 changes: 5 additions & 0 deletions smearing/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ enum I2
I2_3_02 = 10, I2_3_20 = 10, I2_3_12 = 11, I2_3_21 = 11
};

/* NOTE(gkanwar): Temporarily disable the new gauge_field_t interface to enable
* compilation with old su3_tuple array signatures. */
#if 0
void generic_staples(gauge_field_t buff_out, int x, int mu, gauge_field_t buff_in);
#endif
void generic_staples(su3 *buff_out, int x, int mu, su3_tuple *buff_in);
void generic_exchange(void *field_in, int bytes_per_site);
void project_antiherm(su3 *omega);
void project_herm(su3 *omega);
Expand Down
4 changes: 2 additions & 2 deletions smearing/utils.ih
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <ranlxd.h>
#include <sse.h>
#include <get_staples.h>
#include <xchange_gauge.h>
#include <xchange.h>
#include <xchange/xchange_gauge.h>
#include <xchange/xchange.h>
#include <io/gauge.h>
#include <update_backward_gauge.h>

Expand Down
2 changes: 1 addition & 1 deletion smearing/utils_project_antiherm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
void project_antiherm(su3 *omega)
{
static const double fac_3 = 1.00 / 3.00;
double tr_omega = creal(-I * fac_3 * (omega->c00 + omega->c11 + omega->c22);
double tr_omega = creal(-I * fac_3 * (omega->c00 + omega->c11 + omega->c22));


omega->c00 = (cimag(omega->c00) - tr_omega) * I;
Expand Down

0 comments on commit fbaf220

Please sign in to comment.