aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-08-02 15:16:27 +0000
committerlanfer <lanfer@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-08-02 15:16:27 +0000
commit0b15e3c9154396dde8258ec78e0086e492acb68e (patch)
tree7089dc8e949423f8abfba4e029ce775150373b41
parentc569da39709cd447ad646a8b3a3eb2e7fe75e11d (diff)
Regex broken for origin ?
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@16 0888f3d4-9f52-45d2-93bc-d00801ff5e46
-rw-r--r--par/HDF5socket_demo.par6
-rw-r--r--src/DumpVar.c4
-rw-r--r--src/ParseGeometry.c18
-rw-r--r--src/Write.c2
4 files changed, 17 insertions, 13 deletions
diff --git a/par/HDF5socket_demo.par b/par/HDF5socket_demo.par
index b11d1e3..0a32a96 100644
--- a/par/HDF5socket_demo.par
+++ b/par/HDF5socket_demo.par
@@ -34,4 +34,8 @@ StreamedHDF5::port = 1235
# hyperslab syntax:
# "<implementation::name>[{dimension}{direction,..}{startindex{,...}
# {length,..}{downsamping,...}]
-StreamedHDF5::out_vars = "wavetoy::phi[{2},{0,1},{4},{-1,-1},{1,1}]"
+#StreamedHDF5::out_vars = "wavetoy::phi[{2},{0,1},{4},{-1,-1},{1,1}]"
+
+# regex broken for orgin ? use this syntax for now:
+StreamedHDF5::out_vars = "=wavetoy::phi=[{2},{0,1},{4},{-1,-1},{1,1}]"
+
diff --git a/src/DumpVar.c b/src/DumpVar.c
index 86fb5cc..777c0d5 100644
--- a/src/DumpVar.c
+++ b/src/DumpVar.c
@@ -66,7 +66,6 @@ static int GetHDF5type (StreamedHDF5GH *myGH, int vtype, hid_t *hdf5_type);
int StreamedHDF5_DumpVar (cGH *GH, int index, int timelevel, hid_t fid)
{
DECLARE_CCTK_PARAMETERS
- int vdim;
void *data;
int *hsizes;
hid_t hdf5_type;
@@ -89,7 +88,6 @@ int StreamedHDF5_DumpVar (cGH *GH, int index, int timelevel, hid_t fid)
geo = myGH->geo_output[index];
/* get the dimension of the variable */
- vdim = CCTK_GroupDimI (CCTK_GroupIndexFromVarI (index));
hsizes = (int*)malloc(geo.sdim*sizeof(int));
@@ -204,12 +202,10 @@ static void StreamedHDF5_AddCommonAttributes (cGH *GH, int index, int timelevel,
char *groupname;
#endif
CCTK_REAL realAttr [6];
- ioGH *ioUtilGH;
StreamedHDF5GH *myGH;
CCTK_REAL dummy;
/* Get the handles for IOUtil and StreamedHDF5 extensions */
- ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")];
myGH = (StreamedHDF5GH *) GH->extensions [CCTK_GHExtensionHandle ("StreamedHDF5")];
#if 0
diff --git a/src/ParseGeometry.c b/src/ParseGeometry.c
index 8db56f8..d8f3373 100644
--- a/src/ParseGeometry.c
+++ b/src/ParseGeometry.c
@@ -13,7 +13,7 @@
/* CCTK_NO_AUTOUSE_MACRO */
-/*#define DEBUG*/
+#define HEAVYDEBUG
int GeometryParser(const char *before, char **outname, StreamGeo_t *geo)
@@ -24,7 +24,8 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo)
int matched,ierr=0,retval=0, verb=0, deb=0;
const char *argument;
- char *varname=NULL, *geo_s=NULL, *token=NULL;
+ char *varname=NULL, *geo_s=NULL;
+ const char *token=NULL;
char *dim_s=NULL, *ori_s=NULL, *dir_s=NULL;
char *len_s=NULL, *down_s=NULL;
@@ -47,13 +48,16 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo)
sprintf(info,"\n\nGeometryParser \nargument: >%s<\n",before);
if((matched = CCTK_RegexMatch(before,
- "(\\w*:?:?\\w*)\\[?(.*)?\\]?", 3, pmatch)) != 0) {
+ "\\=(.*)\\=\\[?(.*)?\\]?", 3, pmatch)) != 0) {
+
+/* Regex broken on origin: \\w not matched */
+/* "(\\w*::\\w*)\\[?(.*)?\\]?", 3, pmatch)) != 0) {*/
#ifdef HEAVYDEBUG
printf("matched %d rm_so/rm_eo: %d %d; %d %d\n",
matched,
- pmatch[1].rm_so,pmatch[1].rm_eo,
- pmatch[2].rm_so,pmatch[2].rm_eo);
+ (int)pmatch[1].rm_so,(int)pmatch[1].rm_eo,
+ (int)pmatch[2].rm_so,(int)pmatch[2].rm_eo);
#endif
if(pmatch[1].rm_so != -1 &&
@@ -74,7 +78,7 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo)
}
else
{
- sprintf(info,"%sOUTNAME : no appropriate gridfunction found. \n",
+ sprintf(info,"%sOUTNAME : no appropriate gridfunction found:>%s< \n",
info,*outname);
geo->vdim = -1;
geo->sdim = -1;
@@ -343,5 +347,7 @@ void SetDefaultGeo(StreamGeo_t *geo) {
geo->length[idim] =-1;
geo->downs[idim] = 1;
}
+
+ USE_CCTK_PARAMETERS
}
diff --git a/src/Write.c b/src/Write.c
index 0c0b373..db71f18 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -56,7 +56,6 @@ void StreamedHDF5_Write (cGH *GH, int index, const char *alias)
DECLARE_CCTK_PARAMETERS
int vtype;
int timelevel;
- ioGH *ioUtilGH;
StreamedHDF5GH *myGH;
hid_t fid, plist;
#if 0
@@ -86,7 +85,6 @@ void StreamedHDF5_Write (cGH *GH, int index, const char *alias)
}
/* Get the handles for IO and StreamedHDF5 extensions */
- ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")];
myGH = (StreamedHDF5GH *) GH->extensions [CCTK_GHExtensionHandle ("StreamedHDF5")];
fid = -1;