[ghemical-devel] support for MPQC v2 was added
Michael Banck
mbanck@gmx.net
Mon, 20 May 2002 17:41:28 +0200
--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Mon, May 20, 2002 at 04:11:07PM +0300, Tommi Hassinen wrote:
> Could you still send me an another patch with all these changes?
attached. Hopefully I didn't miss anything. I didn't include the changes
autoconf did to configure in order to keep the diff small.
I've run quite low on diskspace, so I could only see if it looks
alright and compiles with 2.0.4 (just the common directory, I didn't
link and therefore couldn't test), which was the case.
Trying to persuade ghemical that I've had mpqc-2.1.0 installed, the
namespace error happened again, so I guess qm1e_mpqc.h is not totally
broken...
If I've got the time, I'll test some more (I'll have to built Debian
pacakges out of mpqc-2.1.1 anyway sometime)
bye,
Michael
--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ghemical_mpqc2.diff"
diff -Naur ghemical/aclocal.m4 ghemical-test/aclocal.m4
--- ghemical/aclocal.m4 Mon May 20 16:53:26 2002
+++ ghemical-test/aclocal.m4 Mon May 20 11:12:27 2002
@@ -586,7 +586,7 @@
exit(1);
}
- if (/*($sc_major_version > major) || * libsc is not backwards compatible ATM */
+ if (($sc_major_version > major) ||
(($sc_major_version == major) && ($sc_minor_version > minor)) ||
(($sc_major_version == major) && ($sc_minor_version == minor) && ($sc_micro_version >= micro)))
{
@@ -666,6 +666,12 @@
SC_LIBS=""
ifelse([$3], , :, [$3])
fi
+ SC_MAJOR_VERSION="$sc_major_version"
+ SC_MINOR_VERSION="$sc_minor_version"
+ SC_MICRO_VERSION="$sc_micro_version"
+ AC_SUBST(SC_MAJOR_VERSION)
+ AC_SUBST(SC_MINOR_VERSION)
+ AC_SUBST(SC_MICRO_VERSION)
AC_SUBST(SC_CPPFLAGS)
AC_SUBST(SC_LIBS)
rm -f conf.sctest
diff -Naur ghemical/configure.in ghemical-test/configure.in
--- ghemical/configure.in Mon May 20 16:53:26 2002
+++ ghemical-test/configure.in Mon May 20 17:16:46 2002
@@ -57,6 +57,9 @@
AM_PATH_SC(1.2.5, HAVE_MPQC="yes", HAVE_MPQC="no")
if test "${HAVE_MPQC}" = "yes"; then
AC_DEFINE(ENABLE_MPQC)
+ AC_DEFINE_UNQUOTED(SC_MAJOR_VERSION, $SC_MAJOR_VERSION)
+ AC_DEFINE_UNQUOTED(SC_MINOR_VERSION, $SC_MINOR_VERSION)
+ AC_DEFINE_UNQUOTED(SC_MICRO_VERSION, $SC_MICRO_VERSION)
else AC_MSG_ERROR([Cannot find proper SC version])
fi
fi
diff -Naur ghemical/src/common/qm1e_mpqc.h ghemical-test/src/common/qm1e_mpqc.h
--- ghemical/src/common/qm1e_mpqc.h Mon May 20 16:53:25 2002
+++ ghemical-test/src/common/qm1e_mpqc.h Mon May 20 17:05:29 2002
@@ -16,10 +16,6 @@
class qm1_eng_mpqc;
- // THIS IS A TEMPORARY SETTING - DISABLE WHEN CONFIGURATION SYSTEM IS UPDATED!!!
-#define MPQC_VERSION = 1 // THIS IS A TEMPORARY SETTING - DISABLE WHEN CONFIGURATION SYSTEM IS UPDATED!!!
- // THIS IS A TEMPORARY SETTING - DISABLE WHEN CONFIGURATION SYSTEM IS UPDATED!!!
-
/*################################################################################################*/
#include "qm1eng.h"
@@ -39,11 +35,11 @@
#include "math/scmat/abstract.h" // SCMatrix
-#if(MPQC_VERSION > 1)
+#if(SC_MAJOR_VERSION > 1 && SC_MINOR_VERSION > 0)
using namespace sc; // the namespace "sc" was added in version 2...
-#endif // MPQC_VERSION > 1
+#endif // SC_MAJOR_VERSION > 1
/*################################################################################################*/
@@ -63,7 +59,7 @@
static i32u ifile_name_counter;
-#if(MPQC_VERSION == 1)
+#if(SC_MAJOR_VERSION == 1)
RefMessageGrp grp;
RefThreadGrp thread;
@@ -76,7 +72,7 @@
RefOneBodyWavefunction obwfn; // for plotting...
RefWavefunction wfn; // for plotting...
-#else // assume MPQC_VERSION == 2
+#else // assume SC_MAJOR_VERSION == 2
Ref<MessageGrp> grp;
Ref<ThreadGrp> thread;
diff -Naur ghemical/src/config.h.in ghemical-test/src/config.h.in
--- ghemical/src/config.h.in Mon May 20 16:53:26 2002
+++ ghemical-test/src/config.h.in Mon May 20 17:01:42 2002
@@ -18,6 +18,13 @@
/* Define if you are building a version that interfaces directly with MPQC */
#undef ENABLE_MPQC
+/* This is the version of SC (MPQC's underlying library) found by configure */
+/* For example in 1.2.5, '1' is MAJOR, '2' MINOR and '5' MICRO */
+
+#undef SC_MAJOR_VERSION
+#undef SC_MINOR_VERSION
+#undef SC_MICRO_VERSION
+
/* This is the version of Ghemical to be built--it is set in the configure.in */
#undef VERSION
diff -Naur ghemical/stamp.h ghemical-test/stamp.h
--- ghemical/stamp.h Thu Jan 1 01:00:00 1970
+++ ghemical-test/stamp.h Mon May 20 17:21:48 2002
@@ -0,0 +1 @@
+timestamp
--/04w6evG8XlLl3ft--