[Developers] help

jtao at cct.lsu.edu jtao at cct.lsu.edu
Thu Sep 28 01:33:32 CDT 2006

Hi Hugh,

I did something very similar long time ago. I made some changes to meet
your needs just for fun. I hope it can help you in some way.

The basic idea is to define two grid functions seq1 and seq2.

As Erik pointed out in his email, each processor will read its own data and
output its own result. I don't think there is anyway to go around this on the
user's level. Just to get things started, I output the chunk for each  
labeled by result_Procxxx.dat.

I attached my thorn together with a dat file (under VectorReader/par) used
for testing purpose. You can easily manipulate the input function
(VectorReader_Read) to fit your needs. Some modifications are necessary if
you want to use it in production on huge files.

Also, if you want to check the output from other processors you can try
./cactus_yourexe -r vector.par to redirect the output to the main processor
to check things out.

ThornList to Compile:

Parameter File to Run:
ActiveThorns="PUGH VectorReader"
# clean up the screen
cactus::cctk_show_schedule= "no"
# no evolution
cactus::cctk_itlast       = 0
# input and output files
VectorReader::vector_file = "vector.dat"
VectorReader::resultfile_prefix = "result"
VectorReader::resultfile_postfix = ".dat"
#this should be equal to the number of rows in vector.dat
driver::global_nx         = 42
driver::ghost_size        = 0

Good luck,

Quoting hughwang at cct.lsu.edu:

> Hi all,
>     Just wonder if anybody can provide me (or tell me where to get) an
> application example of Cactuscode. I have checked through
> cactuscode.org, but could not get much help.
>     Something like this would be ideal for me: a master processor
> reads in a 2D array (like 2X3) of characters, splices the array into
> three vectors (2X1), send each vector to a slave processor, then, the
> slave processors compare the two characters in their received vectors
> and send either 0 or 1 (the two characters equal or not) back to the
> master. Codes in C are highly appreciated.
>     This type of examples might be very helpful for people from other
> fields to use cactuscode.
> Regards,
> Hugh
> Quoting Erik Schnetter <schnetter at cct.lsu.edu>:
>> On Sep 26, 2006, at 09:48:17, Michael Koppitz wrote:
>>> Hi all,
>>> it seems a common task for many applications to have some
>>> reduction of some value on a sphere (integral, max, min).
>>> Would it be useful to implement a general reduction operator
>>> or (probably even better) to give existing reduction operators a mask
>>> they are confined to work on?
>> Thorn SphericalSurface has a way to store spheres.  We recently
>> developed a thorn SphericalHarmonics, which performs various
>> integrations and reductions over such spheres, among other things.
>> Maybe this thorn could help in the short term?
>> -erik
>> --
>> Erik Schnetter <schnetter at cct.lsu.edu>
>> My email is as private as my paper mail.  I therefore support encrypting
>> and signing email messages.  Get my PGP key from www.keyserver.net.
> _______________________________________________
> Developers mailing list
> Developers at cactuscode.org
> http://www.cactuscode.org/mailman/listinfo/developers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VectorReader.tgz
Type: application/x-compressed
Size: 4153 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20060928/51e94d78/attachment-0001.bin 

More information about the Developers mailing list