Skip to content

Commit

Permalink
debugging autoconf
Browse files Browse the repository at this point in the history
  • Loading branch information
azrael417 committed Aug 20, 2014
1 parent ae6d8bf commit c4b671e
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 46 deletions.
8 changes: 4 additions & 4 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ dnl - set the parallel compiler environment
[pac_hdf5_working=yes],
[pac_hdf5_working=no]
)
dnl CFLAGS="$pac_saved_CFLAGS"
dnl CXXFLAGS="$pac_saved_CXXFLAGS"
dnl LDFLAGS="$pac_saved_LDFLAGS"
dnl LIBS="$pac_saved_LIBS"
CFLAGS="$pac_saved_CFLAGS"
CXXFLAGS="$pac_saved_CXXFLAGS"
LDFLAGS="$pac_saved_LDFLAGS"
LIBS="$pac_saved_LIBS"
AC_LANG_RESTORE
if test "X${pac_hdf5_working}X" = "XyesX" ; then
ifelse([$6],,:,[$6])
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ if test "X${with_libxml2}X" = "XnoX" ; then
AC_MSG_NOTICE([Disabling Libxml])
AC_SUBST(LIBXML2_CXXFLAGS, "")
AC_SUBST(LIBXML2_LIBS,"")
AC_DEFINE(QDP_NO_LIBXML2, [1], [ Dont use LIBXML2 ])

else

if test "X${LIBXML2_HOME}X" = "XX" ; then
Expand All @@ -453,6 +453,7 @@ else
AC_MSG_NOTICE([libxml2 compile flags: ${LIBXML2_CXXFLAGS}])
AC_SUBST(LIBXML2_LIBS, "`${LIBXML2_CONFIG} --libs`")
AC_MSG_NOTICE([libxml2 libraries flags: ${LIBXML2_LIBS}])
AC_DEFINE_UNQUOTED(QDP_USE_LIBXML2, [1], [Enable LIBXML2 support])

dnl This function is defined in acinclude.m4
dnl it tries to try to compile the program
Expand Down Expand Up @@ -498,7 +499,6 @@ if test "X${ac_build_hdf5}X" = "XnoX"; then
AC_SUBST(HDF5_CFLAGS, "")
AC_SUBST(HDF5_CXXFLAGS, "")
AC_SUBST(HDF5_LIBS,"")
AC_DEFINE(QDP_NO_HDF5, [1], [ Dont use HDF5 ])

else
if test "X${HDF5_HOME}X" = "XX" ; then
Expand Down
4 changes: 2 additions & 2 deletions examples/examples.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void reunit(LatticeColorMatrix& xa);
void reunit(LatticeColorMatrix& xa, LatticeBoolean& bad, int& numbad, enum Reunitarize ruflag);


#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
void junk(XMLWriter&, LatticeColorMatrix& b3, const LatticeColorMatrix& b1, const LatticeColorMatrix& b2, const Subset& s);
#endif

Expand All @@ -45,7 +45,7 @@ void dslash(LatticeFermion& chi, const multi1d<LatticeColorMatrix>& u, const Lat
void dslash2(LatticeFermion& chi, const multi1d<LatticeColorMatrix>& u, const LatticeFermion& psi,
int isign, int cb);

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
void FormFac(const multi1d<LatticeColorMatrix>& u, const LatticePropagator& quark_propagator,
const LatticePropagator& seq_quark_prop, const multi1d<int>& t_source,
int t_sink, int j_decay, XMLWriter& xml);
Expand Down
42 changes: 21 additions & 21 deletions examples/t_linalg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char *argv[])
Layout::setLattSize(nrow);
Layout::create();

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
XMLFileWriter xml("t_linalg.xml");
push(xml, "linalgTest");

Expand Down Expand Up @@ -119,7 +119,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_eq_M_times_M");
write(xml,"c", c);
pop(xml);
Expand All @@ -135,7 +135,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_eq_Ma_times_M");
write(xml,"a",a);
write(xml,"b",b);
Expand All @@ -152,7 +152,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_eq_M_times_Ma");
write(xml,"a",a);
write(xml,"b",b);
Expand All @@ -170,7 +170,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_eq_Ma_times_Ma");
write(xml,"a",a);
write(xml,"b",b);
Expand All @@ -189,7 +189,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_peq_M_times_M");
write(xml,"c",c);
pop(xml);
Expand All @@ -205,7 +205,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_peq_Ma_times_M");
write(xml,"c",c);
pop(xml);
Expand All @@ -221,7 +221,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_peq_M_times_Ma");
write(xml,"c",c);
pop(xml);
Expand All @@ -237,7 +237,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_peq_Ma_times_Ma");
write(xml,"c",c);
pop(xml);
Expand All @@ -253,7 +253,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_meq_M_times_M");
write(xml,"c",c);
pop(xml);
Expand All @@ -269,7 +269,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_meq_Ma_times_M");
write(xml,"c",c);
pop(xml);
Expand All @@ -285,7 +285,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_meq_M_times_Ma");
write(xml,"c",c);
pop(xml)
Expand All @@ -301,7 +301,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << Nflops / tt << " Mflops" << endl;
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_M_meq_Ma_times_Ma");
write(xml,"c",c);
pop(xml);
Expand Down Expand Up @@ -337,7 +337,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 66 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_V_eq_M_times_V");
write(xml,"lv2",lv2);
pop(xml)
Expand All @@ -353,7 +353,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 66 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_V_eq_Ma_times_V");
write(xml,"lv2",lv2);
pop(xml);
Expand Down Expand Up @@ -384,7 +384,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 6 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_V_eq_V_plus_V");
write(xml,"lv3",lv3);
pop(xml);
Expand Down Expand Up @@ -420,7 +420,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 264 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_D_eq_M_times_D");
write(xml,"lf2",lf2);
pop(xml);
Expand All @@ -435,7 +435,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 264 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_D_eq_Ma_times_D");
write(xml,"lf2",lf2);
pop(xml);
Expand Down Expand Up @@ -470,7 +470,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 132 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_H_eq_M_times_H");
write(xml,"lh2", lh2);
pop(xml);
Expand All @@ -486,7 +486,7 @@ int main(int argc, char *argv[])
<< " micro-secs/site/iteration"
<< " , " << 132 / tt << " Mflops" << endl; // check the flop count
#else
#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
push(xml,"QDP_H_eq_Ma_times_H");
write(xml,"lh2", lh2);
pop(xml);
Expand All @@ -495,7 +495,7 @@ int main(int argc, char *argv[])
#endif


#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
pop(xml);
xml.close();
#endif
Expand Down
4 changes: 2 additions & 2 deletions examples/t_mesplq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ int main(int argc, char *argv[])
Layout::setLattSize(nrow);
Layout::create();

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
XMLFileWriter xml("t_mesplq.xml");
push(xml,"t_mesplq");

Expand Down Expand Up @@ -53,7 +53,7 @@ int main(int argc, char *argv[])
QDPIO::cout << "w_plaq = " << w_plaq << endl;
QDPIO::cout << "link = " << link << endl;

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
// Write out the results
push(xml,"observables");
write(xml,"w_plaq",w_plaq);
Expand Down
4 changes: 2 additions & 2 deletions include/qdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ namespace QDP {
#include "qdp_io.h"
#include "qdp_stdio.h"

#ifdef QDP_NO_LIBXML2
#ifndef QDP_USE_LIBXML2
#warning not using libxml2
#else
#include "qdp_xmlio.h"
#include "qdp_qdpio.h"
#endif

#ifdef QDP_NO_HDF5
#ifndef QDP_USE_HDF5
#warning not using hdf5
#else
#include "qdp_hdf5.h"
Expand Down
4 changes: 2 additions & 2 deletions include/qdp_config_internal.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
#undef QDP_ND

/* Dont use HDF5 */
#undef QDP_NO_HDF5
#undef QDP_USE_HDF5

/* Dont use LIBXML2 */
#undef QDP_NO_LIBXML2
#undef QDP_USE_LIBXML2

/* Number of spin components */
#undef QDP_NS
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_inner.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ TextWriter& operator<<(TextWriter& s, const IScalar<T>& d)
return s << d.elem();
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_outer.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ StandardOutputStream& operator<<(StandardOutputStream& s, const QDPExpr<RHS, OSc
return s << C1(l);
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
/*! Supports also having an inner grid */
template<class T>
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_primmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ TextWriter& operator<<(TextWriter& txt, const PMatrix<T,N,C>& d)
return txt;
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T, int N, template<class,int> class C>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_primscalar.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ TextWriter& operator<<(TextWriter& txt, const PScalar<T>& d)
return txt << d.elem();
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_primseed.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TextWriter& operator<<(TextWriter& txt, const PSeed<T>& d)
return txt;
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_primspinvec.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TextWriter& operator<<(TextWriter& txt, const PSpinVector<T,N>& d)
return txt;
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T, int N>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_primvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ TextWriter& operator<<(TextWriter& txt, const PVector<T,N,C>& d)
return txt;
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T, int N, template<class,int> class C>
inline
Expand Down
4 changes: 2 additions & 2 deletions include/qdp_reality.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ TextWriter& operator<<(TextWriter& s, const RScalar<T>& d)
return s << d.elem();
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
inline
Expand Down Expand Up @@ -422,7 +422,7 @@ TextWriter& operator<<(TextWriter& s, const RComplex<T>& d)
return s << d.real() << d.imag();
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
inline
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_scalar_specific.h
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ class ArrayBiDirectionalMap
//! Decompose a lexicographic site into coordinates
multi1d<int> crtesn(int ipos, const multi1d<int>& latt_size);

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
//! XML output
template<class T>
XMLWriter& operator<<(XMLWriter& xml, const OLattice<T>& d)
Expand Down
2 changes: 1 addition & 1 deletion include/qdp_specializations.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ toBool(const Boolean& s)
return toBool(s.elem());
}

#ifndef QDP_NO_LIBXML2
#ifdef QDP_USE_LIBXML2
// XML readers
template<>
void read(XMLReader& xml, const string& s, multi1d<Integer>& d);
Expand Down

0 comments on commit c4b671e

Please sign in to comment.