[Swift-user] readdata able to read array fields?

Michael Wilde wilde at mcs.anl.gov
Tue Dec 11 07:17:37 CST 2007


This question is for the LQCD application.

Can readdata() read structure fields that are arrays?

I want to read the parameter file below into a struct and have fields 
like, eg, confList[], wsrc[] and kappaQ[] be arrays.

The param file looks like:

confList=503210,503216
wsrc=d,1S,2S
ensemble=l612f21b6600m0290m0484
kappaQ=0.122,0.086
cSW=1.72
mass=0.005,0.006,0.007
dimX=6
dimY=6
dimZ=6
dimT=12
dimArg=6,6,6,12
beta=6.76
u0=0.836
uFileSize=746532
workdir=/home/piccoli/2ptHL/workdir
coresPerNode=4
nodesHQ=2
nodesLQ=2
nodes2PT=1
tsrc=0
cloverResidue2=100
cloverResidue=3e-10
sea=2:0.005,1:0.05
precision=3e-9
iterations=7800
steps=3,6,9,12

I want to read this into:

type param {
   int confList[];
   string wsrc[];
   string ensemble;
   float kappaQ[];
   etc...
}

Its OK if I need to coerce it into a different format.

The data format of the ext mapper would be acceptable.

For now I can defer the maping of filename strings to files until just 
before I use them.





More information about the Swift-user mailing list