Update of /cvsroot/mpqc/mpqc/src/lib/util/group
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25527/src/lib/util/group
Modified Files:
Tag: Libint2-branch
memmtmpi.cc memory.cc memamsg.cc Makefile mstate.h linkage.h
messtest.cc message.h memmsg.cc reduce.cc messproc.cc
mstate.cc memtest.cc messmpi.h memmtmpi.h memarmci.h
messimpl.cc messmpi.cc memamsg.h memarmci.cc memrdma.h
Added Files:
Tag: Libint2-branch
actmsgtest.cc actmsg.cc actmsg.h
Removed Files:
Tag: Libint2-branch
messshm.cc messint.cc messshm.h
Log Message:
Synced up with HEAD. See sync-with-Libint2-branch-1 .
Index: messtest.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/messtest.cc,v
retrieving revision 2.3
retrieving revision 2.3.10.1
diff -u -d -r2.3 -r2.3.10.1
--- messtest.cc 3 Apr 2002 06:44:39 -0000 2.3
+++ messtest.cc 4 Mar 2008 22:45:42 -0000 2.3.10.1
@@ -39,10 +39,6 @@
[...28 lines suppressed...]
@@ -280,8 +279,8 @@
//si.set_buffer_size(5);
si.source(source);
b << SavableState::restore_state(si);
- if (source != target) grp->send(source, ca, nca);
grp->recv(source, ca, nca);
+ grp->send(source, ca, nca);
}
if (grp->me() == target) {
Index: messmpi.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/messmpi.cc,v
retrieving revision 2.13
retrieving revision 2.13.2.1
diff -u -d -r2.13 -r2.13.2.1
--- messmpi.cc 19 Dec 2004 18:17:57 -0000 2.13
+++ messmpi.cc 4 Mar 2008 22:46:05 -0000 2.13.2.1
@@ -43,10 +43,6 @@
using namespace std;
[...280 lines suppressed...]
else {
- rnode = rtag = rlen = 0;
+ if (info) {
+ set_sender(info,-1);
+ set_type(info,-1);
+ set_nbyte(info,0);
+ }
}
return 0;
Index: Makefile
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/Makefile,v
retrieving revision 2.5.8.2
retrieving revision 2.5.8.3
diff -u -d -r2.5.8.2 -r2.5.8.3
--- Makefile 4 May 2006 04:03:44 -0000 2.5.8.2
+++ Makefile 4 Mar 2008 22:45:38 -0000 2.5.8.3
@@ -32,19 +32,20 @@
include $(SRCDIR)/$(TOPDIR)/lib/GlobalMakefile
[...47 lines suppressed...]
+ libSCmisc.$(LIBSUF) \
+ libSCstate.$(LIBSUF) \
+ libSCclass.$(LIBSUF) \
+ libSCcontainer.$(LIBSUF) \
+ libSCref.$(LIBSUF)
+ $(LTLINK) $(LD) $(LDFLAGS) -o actmsgtest $^ $(SYSLIBS) $(LTLINKBINOPTS)
+
thrtest.$(OBJSUF): thrtest.cc
$(LTCOMP) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -DSRCDIR=\"$(SRCDIR)\" -c $<
Index: linkage.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/linkage.h,v
retrieving revision 2.4.8.1
retrieving revision 2.4.8.2
diff -u -d -r2.4.8.1 -r2.4.8.2
--- linkage.h 29 Dec 2005 01:36:38 -0000 2.4.8.1
+++ linkage.h 4 Mar 2008 22:45:42 -0000 2.4.8.2
@@ -39,13 +39,6 @@
static ForceLink<ProcMemoryGrp> group_force_link_1_;
}
-# ifdef HAVE_SYSV_IPC
-# include <util/group/messshm.h>
-namespace sc {
- static ForceLink<ShmMessageGrp> group_force_link_a_;
-}
-# endif
-
# if defined(HAVE_PTHREAD)
# include <util/group/thpthd.h>
namespace sc {
Index: mstate.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/mstate.h,v
retrieving revision 2.1
retrieving revision 2.1.10.1
diff -u -d -r2.1 -r2.1.10.1
--- mstate.h 3 Apr 2002 06:44:39 -0000 2.1
+++ mstate.h 4 Mar 2008 22:45:40 -0000 2.1.10.1
@@ -160,6 +160,7 @@
StateSend(const StateSend&);
[...32 lines suppressed...]
void source(int);
+ /// Specify the message type.
+ void type(int);
+ /// Return the source of the last message received.
+ int last_source();
+ /// Return the type of the last message received.
+ int last_type();
};
/** BcastStateSend does the send part of a broadcast of an object
Index: memamsg.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memamsg.cc,v
retrieving revision 2.5
retrieving revision 2.5.2.1
diff -u -d -r2.5 -r2.5.2.1
--- memamsg.cc 19 Dec 2004 18:17:57 -0000 2.5
+++ memamsg.cc 4 Mar 2008 22:45:36 -0000 2.5.2.1
@@ -64,7 +64,7 @@
// The MemoryDataRequest class
[...31 lines suppressed...]
void
MemoryDataRequest::operator =(const MemoryDataRequest &r)
{
- for (int i=0; i<NData; i++) {
- data_[i] = r.data_[i];
- }
+ data_ = r.data_;
}
///////////////////////////////////////////////////////////////////////
Index: memory.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memory.cc,v
retrieving revision 2.13.2.1
retrieving revision 2.13.2.2
diff -u -d -r2.13.2.1 -r2.13.2.2
--- memory.cc 13 Jun 2006 16:39:52 -0000 2.13.2.1
+++ memory.cc 4 Mar 2008 22:45:35 -0000 2.13.2.2
@@ -41,7 +41,6 @@
#include <util/group/memproc.h>
#ifdef HAVE_SYSV_IPC
-# include <util/group/messshm.h>
# include <util/group/memshm.h>
#endif
@@ -338,12 +337,6 @@
return default_memorygrp.pointer();
}
#endif
-#ifdef HAVE_SYSV_IPC
- else if (msg->class_desc() == ::class_desc<ShmMessageGrp>()) {
- default_memorygrp = new ShmMemoryGrp(msg);
- return default_memorygrp.pointer();
- }
-#endif
else if (msg->n() == 1) {
default_memorygrp = new ProcMemoryGrp();
return default_memorygrp.pointer();
Index: mstate.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/mstate.cc,v
retrieving revision 2.3
retrieving revision 2.3.10.1
diff -u -d -r2.3 -r2.3.10.1
--- mstate.cc 3 Apr 2002 06:44:39 -0000 2.3
+++ mstate.cc 4 Mar 2008 22:45:56 -0000 2.3.10.1
@@ -359,7 +359,8 @@
[...86 lines suppressed...]
+ if (path.empty()) {
ExEnv::errn() << "StateInBin(const Ref<KeyVal>&): no path given" << endl;
}
opened_ = 0;
- open(path);
- delete[] path;
+ open(path.c_str());
}
BcastStateInBin::~BcastStateInBin()
--- NEW FILE: actmsg.cc ---
//
// actmsg.cc
//
// based on: memamsg.cc
//
// Copyright (C) 1996 Limit Point Systems, Inc.
//
// Author: Curtis Janssen <cljanss@...>
// Maintainer: LPS
[...281 lines suppressed...]
msg_->sync();
}
}
/////////////////////////////////////////////////////////////////////////////
// Local Variables:
// mode: c++
// c-file-style: "CLJ"
// End:
Index: memrdma.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memrdma.h,v
retrieving revision 2.2
retrieving revision 2.2.8.1
diff -u -d -r2.2 -r2.2.8.1
--- memrdma.h 3 Nov 2003 01:33:09 -0000 2.2
+++ memrdma.h 4 Mar 2008 22:46:17 -0000 2.2.8.1
@@ -47,11 +47,11 @@
protected:
char *data_;
- virtual void retrieve_data(void *, int node, int offset, int size,
+ virtual void retrieve_data(void *, int node, long offset, long size,
int lock) = 0;
- virtual void replace_data(void *, int node, int offset, int size,
+ virtual void replace_data(void *, int node, long offset, long size,
int unlock) = 0;
- virtual void sum_data(double *data, int node, int doffset, int dsize) = 0;
+ virtual void sum_data(double *data, int node, long doffset, long dsize) = 0;
std::vector<Pool*> pools_;
size_t default_pool_size_;
Index: memarmci.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memarmci.h,v
retrieving revision 2.4
retrieving revision 2.4.8.1
diff -u -d -r2.4 -r2.4.8.1
--- memarmci.h 7 Nov 2003 07:00:22 -0000 2.4
+++ memarmci.h 4 Mar 2008 22:45:59 -0000 2.4.8.1
@@ -54,9 +54,9 @@
void set_localsize(size_t);
- void retrieve_data(void *, int node, int offset, int size, int lock);
- void replace_data(void *, int node, int offset, int size, int unlock);
- void sum_data(double *data, int node, int doffset, int dsize);
+ void retrieve_data(void *, int node, long offset, long size, int lock);
+ void replace_data(void *, int node, long offset, long size, int unlock);
+ void sum_data(double *data, int node, long doffset, long dsize);
void sync();
void deactivate();
Index: message.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/message.h,v
retrieving revision 2.9.2.2
retrieving revision 2.9.2.3
diff -u -d -r2.9.2.2 -r2.9.2.3
--- message.h 7 Feb 2006 16:13:03 -0000 2.9.2.2
+++ message.h 4 Mar 2008 22:45:46 -0000 2.9.2.3
@@ -111,6 +111,28 @@
a mechanism for moving data and objects between
[...310 lines suppressed...]
+ MessageHandle&);
+ void wait(const MessageHandle&,
+ MessageInfo *info=0);
- int leftover_ctl_bits();
+ int probet(int sender, int type, MessageInfo *info=0);
+ void sync();
};
}
Index: memarmci.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memarmci.cc,v
retrieving revision 2.8.2.1
retrieving revision 2.8.2.2
diff -u -d -r2.8.2.1 -r2.8.2.2
--- memarmci.cc 29 Dec 2005 01:36:38 -0000 2.8.2.1
+++ memarmci.cc 4 Mar 2008 22:46:15 -0000 2.8.2.2
@@ -111,8 +111,8 @@
}
[...24 lines suppressed...]
-ARMCIMemoryGrp::sum_data(double *data, int node, int offset, int size)
+ARMCIMemoryGrp::sum_data(double *data, int node, long offset, long size)
{
- int doffset = offset/sizeof(double);
- int dsize = size/sizeof(double);
+ long doffset = offset/sizeof(double);
+ long dsize = size/sizeof(double);
void *src = data;
void *dst = reinterpret_cast<double*>(all_data_[node])+doffset;
--- NEW FILE: actmsgtest.cc ---
#include "actmsg.h"
#include <util/group/pregtime.h>
using namespace sc;
static Ref<ThreadGrp>
init_thread(const Ref<KeyVal>& keyval, int &argc, char **&argv)
[...78 lines suppressed...]
std::cout << msg->me()
<< " sending active message to " << remote << std::endl;
amsggrp->send(remote,out,amsg);
}
amsggrp->deactivate();
clean_up();
return 0;
}
Index: memmtmpi.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memmtmpi.h,v
retrieving revision 2.4.2.1
retrieving revision 2.4.2.2
diff -u -d -r2.4.2.1 -r2.4.2.2
--- memmtmpi.h 13 Jun 2006 16:39:52 -0000 2.4.2.1
+++ memmtmpi.h 4 Mar 2008 22:45:58 -0000 2.4.2.2
@@ -34,12 +34,15 @@
#define _util_group_memmtmpi_h
[...41 lines suppressed...]
// parent class pure virtuals
- void retrieve_data(void *, int node, int offset, int size, int lock);
- void replace_data(void *, int node, int offset, int size, int unlock);
- void sum_data(double *data, int node, int doffset, int dsize);
+ void retrieve_data(void *, int node, long offset, long size, int lock);
+ void replace_data(void *, int node, long offset, long size, int unlock);
+ void sum_data(double *data, int node, long doffset, long dsize);
friend class MTMPIThread;
public:
Index: messimpl.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/messimpl.cc,v
retrieving revision 2.12
retrieving revision 2.12.2.1
diff -u -d -r2.12 -r2.12.2.1
--- messimpl.cc 19 Dec 2004 18:17:57 -0000 2.12
+++ messimpl.cc 4 Mar 2008 22:46:00 -0000 2.12.2.1
@@ -408,97 +408,229 @@
// Typed send routines
[...254 lines suppressed...]
+ raw_nb_recvt(sender, type, data, ndata, mh);
+}
+void
+MessageGrp::nb_recvt(int sender, int type, signed char* data, int ndata,
+ MessageHandle& mh)
+{
+ raw_nb_recvt(sender, type, data, ndata, mh);
}
// Broadcast operations
Index: memmtmpi.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memmtmpi.cc,v
retrieving revision 2.9.2.1
retrieving revision 2.9.2.2
diff -u -d -r2.9.2.1 -r2.9.2.2
--- memmtmpi.cc 13 Jun 2006 16:39:52 -0000 2.9.2.1
+++ memmtmpi.cc 4 Mar 2008 22:45:34 -0000 2.9.2.2
@@ -62,21 +62,25 @@
int tag_;
[...342 lines suppressed...]
+
+ for (int i=0; i<nbuffer_; i++) delete[] databufs_[i];
+
+ databufs_.resize(0);
+ databufs_mpireq_.resize(0);
+}
+
Ref<MemoryGrp>
MTMPIMemoryGrp::clone()
{
--- messshm.cc DELETED ---
--- messshm.h DELETED ---
Index: memmsg.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memmsg.cc,v
retrieving revision 2.3
retrieving revision 2.3.10.1
diff -u -d -r2.3 -r2.3.10.1
--- memmsg.cc 3 Apr 2002 06:44:38 -0000 2.3
+++ memmsg.cc 4 Mar 2008 22:45:52 -0000 2.3.10.1
@@ -76,7 +76,7 @@
delete[] offsets_;
offsets_ = new distsize_t[n_ + 1];
- int *sizes = new int[n_];
+ long *sizes = new long[n_];
int i;
for (i=0; i<n_; i++) sizes[i] = 0;
Index: messmpi.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/messmpi.h,v
retrieving revision 2.9
retrieving revision 2.9.2.1
diff -u -d -r2.9 -r2.9.2.1
--- messmpi.h 19 Dec 2004 18:17:57 -0000 2.9
+++ messmpi.h 4 Mar 2008 22:45:57 -0000 2.9.2.1
@@ -43,10 +43,6 @@
void* buf;
[...49 lines suppressed...]
+ bool rcvrdy=false);
+ void raw_nb_recvt(int sender, int type,
+ void* data, int nbyte,
+ MessageHandle&);
+ void wait(const MessageHandle&,
+ MessageInfo *info=0);
+
void raw_bcast(void* data, int nbyte, int from);
};
--- NEW FILE: actmsg.h ---
//
// actmsg.h
//
// based on: memamsg.h
//
// Copyright (C) 1996 Limit Point Systems, Inc.
//
// Author: Curtis Janssen <cljanss@...>
// Maintainer: LPS
[...126 lines suppressed...]
};
}
#endif
// Local Variables:
// mode: c++
// c-file-style: "CLJ"
// End:
Index: memtest.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memtest.cc,v
retrieving revision 2.3.10.1
retrieving revision 2.3.10.2
diff -u -d -r2.3.10.1 -r2.3.10.2
--- memtest.cc 29 Dec 2005 01:36:38 -0000 2.3.10.1
+++ memtest.cc 4 Mar 2008 22:45:56 -0000 2.3.10.2
@@ -41,10 +41,6 @@
// Force linkages:
//#ifndef __PIC__
-#ifdef HAVE_SYSV_IPC
-# include <util/group/messshm.h>
- static ForceLink<ShmMessageGrp> fl0;
-#endif
#ifdef HAVE_MPI
# include <util/group/messmpi.h>
# include <util/group/memmtmpi.h>
@@ -57,6 +53,10 @@
static const char * (sc::SCException::*force_except_link)() const
= &sc::SCException::description;
+#include <util/class/scexception.h>
+static const char * (sc::SCException::*force_except_link)() const
+ = &sc::SCException::description;
+
// this is needed for debugging
#ifdef HAVE_NX
extern "C" {
Index: reduce.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/reduce.cc,v
retrieving revision 2.1
retrieving revision 2.1.10.1
diff -u -d -r2.1 -r2.1.10.1
--- reduce.cc 3 Apr 2002 06:44:39 -0000 2.1
+++ reduce.cc 4 Mar 2008 22:45:55 -0000 2.1.10.1
@@ -151,6 +151,12 @@
}
void
+MessageGrp::sum(long* data, int n, long* tmp, int target)
+{
+ do_sum(this, data, n, tmp, target);
+}
+
+void
MessageGrp::sum(char* data, int n, char* tmp, int target)
{
do_sum(this, data, n, tmp, target);
--- messint.cc DELETED ---
Index: memamsg.h
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/memamsg.h,v
retrieving revision 2.3
retrieving revision 2.3.10.1
diff -u -d -r2.3 -r2.3.10.1
--- memamsg.h 3 Apr 2002 06:44:38 -0000 2.3
+++ memamsg.h 4 Mar 2008 22:46:13 -0000 2.3.10.1
@@ -40,32 +40,38 @@
[...55 lines suppressed...]
+ virtual void retrieve_data(void *, int node, long offset, long size,
int lock) = 0;
- virtual void replace_data(void *, int node, int offset, int size,
+ virtual void replace_data(void *, int node, long offset, long size,
int unlock) = 0;
- virtual void sum_data(double *data, int node, int doffset, int dsize) = 0;
+ virtual void sum_data(double *data, int node, long doffset, long dsize) = 0;
public:
ActiveMsgMemoryGrp(const Ref<MessageGrp>& msg);
ActiveMsgMemoryGrp(const Ref<KeyVal>&);
Index: messproc.cc
===================================================================
RCS file: /cvsroot/mpqc/mpqc/src/lib/util/group/messproc.cc,v
retrieving revision 2.5
retrieving revision 2.5.2.1
diff -u -d -r2.5 -r2.5.2.1
--- messproc.cc 6 Nov 2004 01:57:22 -0000 2.5
+++ messproc.cc 4 Mar 2008 22:45:55 -0000 2.5.2.1
@@ -109,6 +109,9 @@
}
[...91 lines suppressed...]
message_t *i;
for (i=type_messages; i!=0; i = i->p) {
if (i->type == type || type == -1) {
+ set_type(info,i->type);
+ set_sender(info,0);
+ set_nbyte(info,i->size);
return 1;
}
}
|