Commit 24db27e6 authored by Jerry Clarke's avatar Jerry Clarke
Browse files

added semaphores. Check for deleted DOM during DTOR of element

parent f3e34aca
......@@ -173,6 +173,8 @@ class XdmfElement(XdmfLightData):
def Copy(*args): return _Xdmf.XdmfElement_Copy(*args)
def Insert(*args): return _Xdmf.XdmfElement_Insert(*args)
def FollowReference(*args): return _Xdmf.XdmfElement_FollowReference(*args)
def GetDsmBuffer(*args): return _Xdmf.XdmfElement_GetDsmBuffer(*args)
def SetDsmBuffer(*args): return _Xdmf.XdmfElement_SetDsmBuffer(*args)
XdmfElement_swigregister = _Xdmf.XdmfElement_swigregister
XdmfElement_swigregister(XdmfElement)
......@@ -287,6 +289,10 @@ class XdmfDataDesc(XdmfObject):
def GetMemberType(*args): return _Xdmf.XdmfDataDesc_GetMemberType(*args)
def GetMemberTypeAsString(*args): return _Xdmf.XdmfDataDesc_GetMemberTypeAsString(*args)
def GetMemberOffset(*args): return _Xdmf.XdmfDataDesc_GetMemberOffset(*args)
def SetHeavyDataSetName(*args): return _Xdmf.XdmfDataDesc_SetHeavyDataSetName(*args)
def GetHeavyDataSetName(*args): return _Xdmf.XdmfDataDesc_GetHeavyDataSetName(*args)
def GetDsmBuffer(*args): return _Xdmf.XdmfDataDesc_GetDsmBuffer(*args)
def SetDsmBuffer(*args): return _Xdmf.XdmfDataDesc_SetDsmBuffer(*args)
XdmfDataDesc_swigregister = _Xdmf.XdmfDataDesc_swigregister
XdmfDataDesc_swigregister(XdmfDataDesc)
......@@ -346,8 +352,6 @@ class XdmfArray(XdmfDataDesc):
def GetMean(*args): return _Xdmf.XdmfArray_GetMean(*args)
def SetDataFromChars(*args): return _Xdmf.XdmfArray_SetDataFromChars(*args)
def GetDataPointerAsCharPointer(*args): return _Xdmf.XdmfArray_GetDataPointerAsCharPointer(*args)
def SetHeavyDataSetName(*args): return _Xdmf.XdmfArray_SetHeavyDataSetName(*args)
def GetHeavyDataSetName(*args): return _Xdmf.XdmfArray_GetHeavyDataSetName(*args)
XdmfArray_swigregister = _Xdmf.XdmfArray_swigregister
XdmfArray_swigregister(XdmfArray)
......@@ -653,8 +657,6 @@ class XdmfHDF(XdmfHeavyData):
def GetCompression(*args): return _Xdmf.XdmfHDF_GetCompression(*args)
def SetUseSerialFile(*args): return _Xdmf.XdmfHDF_SetUseSerialFile(*args)
def GetUseSerialFile(*args): return _Xdmf.XdmfHDF_GetUseSerialFile(*args)
def GetDsmBuffer(*args): return _Xdmf.XdmfHDF_GetDsmBuffer(*args)
def SetDsmBuffer(*args): return _Xdmf.XdmfHDF_SetDsmBuffer(*args)
def SetCwdName(*args): return _Xdmf.XdmfHDF_SetCwdName(*args)
def GetCwdName(*args): return _Xdmf.XdmfHDF_GetCwdName(*args)
def Cd(*args): return _Xdmf.XdmfHDF_Cd(*args)
......
......@@ -41,6 +41,7 @@ XdmfDsm::XdmfDsm() {
this->DsmType = XDMF_DSM_TYPE_UNIFORM;
this->Storage = new XdmfArray;
this->StorageIsMine = 1;
this->Locks = 0;
// For Alignment
this->Storage->SetNumberType(XDMF_INT64_TYPE);
this->SetLength(XDMF_DSM_DEFAULT_LENGTH);
......@@ -67,6 +68,7 @@ XdmfDsm::Copy(XdmfDsm *Source){
this->Comm = Source->Comm;
this->StartServerId = Source->StartServerId;
this->EndServerId = Source->EndServerId;
this->Locks = Source->Locks;
// Alway make a new Message so there os no contention
this->Msg = new XdmfDsmMsg;
return(XDMF_SUCCESS);
......
......@@ -122,6 +122,7 @@ protected:
XdmfInt64 EndAddress;
XdmfInt64 Length;
XdmfInt64 TotalLength;
XdmfInt64 *Locks;
XdmfArray *Storage;
XdmfDsmComm *Comm;
XdmfDsmMsg *Msg;
......
......@@ -29,6 +29,8 @@
#define XDMF_DSM_OPCODE_PUT 0x01
#define XDMF_DSM_OPCODE_GET 0x02
#define XDMF_DSM_SEMA_AQUIRE 0x03
#define XDMF_DSM_SEMA_RELEASE 0x04
extern "C"{
......@@ -42,16 +44,23 @@ XdmfDsmBufferServiceThread(void *DsmObj){
XdmfDsmBuffer::XdmfDsmBuffer() {
XdmfInt64 i;
this->ThreadDsmReady = 0;
this->Locks = new XdmfInt64[XDMF_DSM_MAX_LOCKS];
for(i=0;i < XDMF_DSM_MAX_LOCKS;i++) this->Locks[i] = -1;
}
XdmfDsmBuffer::~XdmfDsmBuffer() {
if(this->StorageIsMine) delete this->Locks;
}
/*
XdmfInt32
XdmfDsmBuffer::Copy(XdmfDsmBuffer *Source){
cout << "Copying" << endl;
if(XdmfDsm::Copy((XdmfDsm *)Source) != XDMF_SUCCESS) return(XDMF_FAIL);
cout << "Setting locks to " << Source->Locks << endl;
this->Locks = Source->Locks;
return(XDMF_SUCCESS);
}
*/
......@@ -122,7 +131,7 @@ XdmfDsmBuffer::ServiceLoop(XdmfInt32 *ReturnOpcode){
XdmfInt32
XdmfDsmBuffer::Service(XdmfInt32 *ReturnOpcode){
XdmfInt32 Opcode, who, status = XDMF_FAIL;
XdmfInt32 Opcode, who, value, status = XDMF_FAIL;
XdmfInt64 aLength, Address;
XdmfByte *datap;
......@@ -165,6 +174,52 @@ XdmfDsmBuffer::Service(XdmfInt32 *ReturnOpcode){
}
XdmfDebug("(Server " << this->Comm->GetId() << ") Serviced GET request from " << who << " for " << aLength << " bytes @ " << Address);
break;
case XDMF_DSM_SEMA_AQUIRE :
// cout << "Sema " << Address << " Aquire" << endl;
if ((Address < 0) || (Address >= XDMF_DSM_MAX_LOCKS)){
XdmfErrorMessage("Invalid Sema Request " << Address);
value = XDMF_FAIL;
}else{
// cout << "Remote Locks at " << this->Locks << endl;
// cout << "Server Locks[" << Address << "] = " << this->Locks[Address] << endl;
if(this->Locks[Address] == -1){
// cout << "Remote " << who << " Aquired Lock " << Address << endl;
this->Locks[Address] = who;
value = XDMF_SUCCESS;
}else{
// cout << "Remote " << who << " did not Aquired Lock " << Address << " already locked by " << this->Locks[Address] << endl;
value = XDMF_FAIL;
}
}
this->Msg->SetTag(XDMF_DSM_RESPONSE_TAG);
status = this->SendData(who, (XdmfByte *)&value, sizeof(XdmfInt32));
if(status == XDMF_FAIL){
XdmfErrorMessage("SemaAquire Response Failed");
return(XDMF_FAIL);
}
break;
case XDMF_DSM_SEMA_RELEASE :
// cout << "Sema " << Address << " Release" << endl;
if ((Address < 0) || (Address >= XDMF_DSM_MAX_LOCKS)){
XdmfErrorMessage("Invalid Sema Request " << Address);
value = XDMF_FAIL;
}else{
if(this->Locks[Address] == who){
// cout << who << " Released Lock " << Address << endl;
this->Locks[Address] = -1;
value = XDMF_SUCCESS;
}else{
// cout << who << " did not Release Lock " << Address << " already locked by " << this->Locks[Address] << endl;
value = XDMF_FAIL;
}
}
this->Msg->SetTag(XDMF_DSM_RESPONSE_TAG);
status = this->SendData(who, (XdmfByte *)&value, sizeof(XdmfInt32));
if(status == XDMF_FAIL){
XdmfErrorMessage("SemaAquire Response Failed");
return(XDMF_FAIL);
}
break;
case XDMF_DSM_OPCODE_DONE :
break;
default :
......@@ -174,6 +229,99 @@ XdmfDsmBuffer::Service(XdmfInt32 *ReturnOpcode){
if(ReturnOpcode) *ReturnOpcode = Opcode;
return(XDMF_SUCCESS);
}
XdmfInt32
XdmfDsmBuffer::Aquire(XdmfInt64 Index){
XdmfInt32 who, MyId = this->Comm->GetId();
XdmfInt32 RemoteStatus;
who = this->AddressToId(0);
// cout << "Aquire :: MyId = " << MyId << " who = " << who << endl;
if(who == XDMF_FAIL){
XdmfErrorMessage("Address Error");
return(XDMF_FAIL);
}
if ((Index < 0) || (Index >= XDMF_DSM_MAX_LOCKS)){
XdmfErrorMessage("Invalid Sema Request " << Index);
return(XDMF_FAIL);
}
if(who == MyId){
// cout << "Local Locks at " << this->Locks << endl;
// cout << "Local Locks[" << Index << "] = " << this->Locks[Index] << endl;
if((this->Locks[Index] == -1) || (this->Locks[Index] == MyId)){
this->Locks[Index] = MyId;
// cout << who << " Aquired own lock " << Index << endl;
return(XDMF_SUCCESS);
}else{
// cout << who << " did not Aquired own lock " << Index << endl;
return(XDMF_FAIL);
}
}else{
XdmfInt32 status;
// cout << "Sending Header" << endl;
status = this->SendCommandHeader(XDMF_DSM_SEMA_AQUIRE, who, Index, sizeof(XdmfInt64));
if(status == XDMF_FAIL){
XdmfErrorMessage("Failed to send Aquire Header to " << who);
return(XDMF_FAIL);
}
this->Msg->SetTag(XDMF_DSM_RESPONSE_TAG);
// cout << "Getting Response" << endl;
status = this->ReceiveData(who, &RemoteStatus, sizeof(XdmfInt32));
if(status == XDMF_FAIL){
XdmfErrorMessage("Failed to Aquire " << Index << " Response From " << who);
return(XDMF_FAIL);
}
// cout << "RemoteStatus = " << RemoteStatus << endl;
return(RemoteStatus);
}
return(XDMF_FAIL);
}
XdmfInt32
XdmfDsmBuffer::Release(XdmfInt64 Index){
XdmfInt32 who, MyId = this->Comm->GetId();
XdmfInt32 RemoteStatus;
who = this->AddressToId(0);
if(who == XDMF_FAIL){
XdmfErrorMessage("Address Error");
return(XDMF_FAIL);
}
if ((Index < 0) || (Index >= XDMF_DSM_MAX_LOCKS)){
XdmfErrorMessage("Invalid Sema Request " << Index);
return(XDMF_FAIL);
}
if(who == MyId){
if((this->Locks[Index] == -1) || (this->Locks[Index] == MyId)){
this->Locks[Index] = -1;
//cout << who << " Released own lock " << Index << endl;
return(XDMF_SUCCESS);
}else{
// cout << who << " did not Released own lock " << Index << endl;
return(XDMF_FAIL);
}
}else{
XdmfInt32 status;
// cout << "Sending Release Header" << endl;
status = this->SendCommandHeader(XDMF_DSM_SEMA_RELEASE, who, Index, sizeof(XdmfInt64));
if(status == XDMF_FAIL){
XdmfErrorMessage("Failed to send Release Header to " << who);
return(XDMF_FAIL);
}
this->Msg->SetTag(XDMF_DSM_RESPONSE_TAG);
// cout << "Receiving Release Response " << endl;
status = this->ReceiveData(who, &RemoteStatus, sizeof(XdmfInt32));
if(status == XDMF_FAIL){
XdmfErrorMessage("Failed to Release " << Index << " Response From " << who);
return(XDMF_FAIL);
}
// cout << "Release Response = " << RemoteStatus << endl;
return(RemoteStatus);
}
return(XDMF_FAIL);
}
XdmfInt32
XdmfDsmBuffer::Put(XdmfInt64 Address, XdmfInt64 aLength, void *Data){
XdmfInt32 who, MyId = this->Comm->GetId();
......
......@@ -27,6 +27,8 @@
#include "XdmfDsm.h"
#define XDMF_DSM_MAX_LOCKS 32
//! Helper for pthread_create()
extern "C" {
void *
......@@ -52,7 +54,12 @@ public:
XdmfInt32 Put(XdmfInt64 Address, XdmfInt64 Length, void *Data);
XdmfInt32 Get(XdmfInt64 Address, XdmfInt64 Length, void *Data);
//virtual XdmfInt32 Copy(XdmfDsmBuffer *Source);
XdmfInt32 Aquire(XdmfInt64 Index);
XdmfInt32 Release(XdmfInt64 Index);
/*
XdmfInt32 Copy(XdmfDsmBuffer *Source);
*/
XdmfInt32 ServiceInit();
XdmfInt32 ServiceOnce(XdmfInt32 *ReturnOpcode=0);
XdmfInt32 ServiceUntilIdle(XdmfInt32 *ReturnOpcode=0);
......
......@@ -61,22 +61,25 @@ XdmfElement::XdmfElement() {
this->ReferenceElement = NULL;
this->State = XDMF_ELEMENT_STATE_UNINITIALIZED;
this->CopyReferenceData = 1;
this->RootWhenParsed = 0;
#ifndef XDMF_NO_MPI
this->DsmBuffer = NULL;
#endif
}
XdmfElement::~XdmfElement() {
if(this->ReferenceElement){
if(this->GetReferenceObject(this->ReferenceElement) == this){
this->SetReferenceObject(this->ReferenceElement, XDMF_ELEMENT_STATE_UNINITIALIZED);
}
}
this->ReferenceElement = NULL;
if(this->Element){
if(this->GetReferenceObject(this->Element) == this){
this->SetReferenceObject(this->Element, XDMF_ELEMENT_STATE_UNINITIALIZED);
}
if(this->DOM && (this->DOM->GetTree() == this->RootWhenParsed)){
if(this->ReferenceElement){
if(this->GetReferenceObject(this->ReferenceElement) == this){
this->SetReferenceObject(this->ReferenceElement, XDMF_ELEMENT_STATE_UNINITIALIZED);
}
}
this->ReferenceElement = NULL;
if(this->Element){
if(this->GetReferenceObject(this->Element) == this){
this->SetReferenceObject(this->Element, XDMF_ELEMENT_STATE_UNINITIALIZED);
}
}
}
this->Element = NULL;
if(this->ElementName) delete [] this->ElementName;
......@@ -161,6 +164,9 @@ XdmfInt32 XdmfElement::SetElement(XdmfXmlNode anElement, XdmfInt32 AssociateElem
this->SetReferenceObject(anElement, XDMF_EMPTY_REFERENCE);
if(AssociateElement) this->SetCurrentXdmfElement(anElement, this);
this->Element = anElement;
if(this->DOM){
this->RootWhenParsed = this->DOM->GetTree();
}
return(XDMF_SUCCESS);
}
......
......@@ -193,5 +193,6 @@ protected:
#ifndef XDMF_NO_MPI
XdmfDsmBuffer *DsmBuffer;
#endif
XdmfXmlNode RootWhenParsed;
};
#endif // __XdmfElement_h
......@@ -4736,6 +4736,59 @@ fail:
}
 
 
SWIGINTERN PyObject *_wrap_XdmfElement_GetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfElement *arg1 = (XdmfElement *) 0 ;
XdmfDsmBuffer *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfElement_GetDsmBuffer",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfElement, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfElement_GetDsmBuffer" "', argument " "1"" of type '" "XdmfElement *""'");
}
arg1 = reinterpret_cast< XdmfElement * >(argp1);
result = (XdmfDsmBuffer *)(arg1)->GetDsmBuffer();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfElement_SetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfElement *arg1 = (XdmfElement *) 0 ;
XdmfDsmBuffer *arg2 = (XdmfDsmBuffer *) 0 ;
XdmfInt32 result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfElement_SetDsmBuffer",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfElement, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfElement_SetDsmBuffer" "', argument " "1"" of type '" "XdmfElement *""'");
}
arg1 = reinterpret_cast< XdmfElement * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfElement_SetDsmBuffer" "', argument " "2"" of type '" "XdmfDsmBuffer *""'");
}
arg2 = reinterpret_cast< XdmfDsmBuffer * >(argp2);
result = (XdmfInt32)(arg1)->SetDsmBuffer(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *XdmfElement_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
......@@ -7388,6 +7441,115 @@ fail:
}
 
 
SWIGINTERN PyObject *_wrap_XdmfDataDesc_SetHeavyDataSetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfDataDesc *arg1 = (XdmfDataDesc *) 0 ;
XdmfConstString arg2 = (XdmfConstString) 0 ;
XdmfInt32 result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDataDesc_SetHeavyDataSetName",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfDataDesc, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataDesc_SetHeavyDataSetName" "', argument " "1"" of type '" "XdmfDataDesc *""'");
}
arg1 = reinterpret_cast< XdmfDataDesc * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfDataDesc_SetHeavyDataSetName" "', argument " "2"" of type '" "XdmfConstString""'");
}
arg2 = reinterpret_cast< XdmfConstString >(buf2);
result = (XdmfInt32)(arg1)->SetHeavyDataSetName(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDataDesc_GetHeavyDataSetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfDataDesc *arg1 = (XdmfDataDesc *) 0 ;
XdmfConstString result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDataDesc_GetHeavyDataSetName",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfDataDesc, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataDesc_GetHeavyDataSetName" "', argument " "1"" of type '" "XdmfDataDesc *""'");
}
arg1 = reinterpret_cast< XdmfDataDesc * >(argp1);
result = (XdmfConstString)(arg1)->GetHeavyDataSetName();
resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDataDesc_GetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfDataDesc *arg1 = (XdmfDataDesc *) 0 ;
XdmfDsmBuffer *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfDataDesc_GetDsmBuffer",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfDataDesc, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataDesc_GetDsmBuffer" "', argument " "1"" of type '" "XdmfDataDesc *""'");
}
arg1 = reinterpret_cast< XdmfDataDesc * >(argp1);
result = (XdmfDsmBuffer *)(arg1)->GetDsmBuffer();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfDataDesc_SetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfDataDesc *arg1 = (XdmfDataDesc *) 0 ;
XdmfDsmBuffer *arg2 = (XdmfDsmBuffer *) 0 ;
XdmfInt32 result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfDataDesc_SetDsmBuffer",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfDataDesc, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfDataDesc_SetDsmBuffer" "', argument " "1"" of type '" "XdmfDataDesc *""'");
}
arg1 = reinterpret_cast< XdmfDataDesc * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfDataDesc_SetDsmBuffer" "', argument " "2"" of type '" "XdmfDsmBuffer *""'");
}
arg2 = reinterpret_cast< XdmfDsmBuffer * >(argp2);
result = (XdmfInt32)(arg1)->SetDsmBuffer(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *XdmfDataDesc_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
......@@ -12157,62 +12319,6 @@ fail:
}
 
 
SWIGINTERN PyObject *_wrap_XdmfArray_SetHeavyDataSetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
XdmfConstString arg2 = (XdmfConstString) 0 ;
XdmfInt32 result;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
char *buf2 = 0 ;
int alloc2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfArray_SetHeavyDataSetName",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArray_SetHeavyDataSetName" "', argument " "1"" of type '" "XdmfArray *""'");
}
arg1 = reinterpret_cast< XdmfArray * >(argp1);
res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfArray_SetHeavyDataSetName" "', argument " "2"" of type '" "XdmfConstString""'");
}
arg2 = reinterpret_cast< XdmfConstString >(buf2);
result = (XdmfInt32)(arg1)->SetHeavyDataSetName(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return resultobj;
fail:
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfArray_GetHeavyDataSetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfArray *arg1 = (XdmfArray *) 0 ;
XdmfConstString result;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfArray_GetHeavyDataSetName",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfArray, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfArray_GetHeavyDataSetName" "', argument " "1"" of type '" "XdmfArray *""'");
}
arg1 = reinterpret_cast< XdmfArray * >(argp1);
result = (XdmfConstString)(arg1)->GetHeavyDataSetName();
resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *XdmfArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
......@@ -18580,59 +18686,6 @@ fail:
}
 
 
SWIGINTERN PyObject *_wrap_XdmfHDF_GetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfHDF *arg1 = (XdmfHDF *) 0 ;
XdmfDsmBuffer *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:XdmfHDF_GetDsmBuffer",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfHDF, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfHDF_GetDsmBuffer" "', argument " "1"" of type '" "XdmfHDF *""'");
}
arg1 = reinterpret_cast< XdmfHDF * >(argp1);
result = (XdmfDsmBuffer *)(arg1)->GetDsmBuffer();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfHDF_SetDsmBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfHDF *arg1 = (XdmfHDF *) 0 ;
XdmfDsmBuffer *arg2 = (XdmfDsmBuffer *) 0 ;
XdmfInt32 result;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
if (!PyArg_ParseTuple(args,(char *)"OO:XdmfHDF_SetDsmBuffer",&obj0,&obj1)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_XdmfHDF, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XdmfHDF_SetDsmBuffer" "', argument " "1"" of type '" "XdmfHDF *""'");
}
arg1 = reinterpret_cast< XdmfHDF * >(argp1);
res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_XdmfDsmBuffer, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "XdmfHDF_SetDsmBuffer" "', argument " "2"" of type '" "XdmfDsmBuffer *""'");
}
arg2 = reinterpret_cast< XdmfDsmBuffer * >(argp2);
result = (XdmfInt32)(arg1)->SetDsmBuffer(arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_XdmfHDF_SetCwdName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
XdmfHDF *arg1 = (XdmfHDF *) 0 ;
......@@ -24005,6 +24058,8 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"XdmfElement_Copy", _wrap_XdmfElement_Copy, METH_VARARGS, NULL},
{ (char *)"XdmfElement_Insert", _wrap_XdmfElement_Insert, METH_VARARGS, NULL},