Hello!

It is a pity that Yi has moved on (at least for the moment), but it
doesn't surprise me: he's amazing and surely working on fabulous and
interesting things.

I did and do use dsage quite extensively--it's been essential for me
in enumerating number fields.  I also have access to a cluster of
computers, and instead of queuing various jobs I just run them as
dsage workers whenever there is backflow.  This works really well.

It took some debugging to get it all to work satisfactorally, and I
still don't know terribly much about what's under the hood so to
speak, but I'm happy to help.

> 1/ Why isn't there a clear, publicized, illustrated description of how to
> use dsage ? I managed to make it work, but only after googling hard.

+1

> 2/ How can I send a job to a worker that will output intermediate values ?
> I mean, say the job sent to a particular worker computes some value, and
> that it takes 100 iterations, how can I output temporary values every 10
> iterations and have the server report those intermediate values ?

Do you need to know those intermediate values really intermediately,
or just in the end?  If it's the former, then you should probably
break up your task into computing 10 iterations and report each of
those back.  If it's the latter, then just return the intermediate
values as part of the output.  If you're not using them for anything,
you can always also just write to a file...

> 3/ I noticed that workers can connect any time, really, and receive jobs
> even if they connect to the server only after the server started some
> sequence of jobs, which is cool. But I also noticed that if a worker gets
> killed, then its job gets lost. Isn't it possible for the server to check
> if a worker is alive, every once in a while, and if not requeue its job ?

I don't know about checking workers, but this happens to me
frequently.  I use the failures attribute of a job to see if it has
completed or not and requeue that way.  Dead workers don't get new
jobs.

> 4/ What is the function I can use to check which worker did what, and if
> it's alive, and what job got interrupted.

Not sure this has been implemented.  I was only ever interested in
total computing time, which you can recover from the cpu_time
attribute.  What would you do with this information?

> 5/ What test can I apply to a dsage job to see if it's finished ? Say a
> job outputs a list, and I want to plot it, can I say something like "If
> there is some output, plot it, otherwise wait." ?

Use the get_job() function to retrieve the output and then the status
attribute ('new', 'processing', or 'completed') to check if it is
done.  If you just want to wait until a job is finished, you can use
the wait function on a job--or you can also repeatedly check and use
the time.sleep() function.

> 6/ If you have any notes, drafts, illustrating some of dsage
> functionalities, I'd be more than happy to check them out.

You can check out the functions in
sage.rings.number_field.totallyreal_dsage; I'm not saying they're
optimal, but they (mostly) work, so might be of some inspiration.

Let me know if I can be of any other help.

Yours,

John Voight
Assistant Professor of Mathematics
University of Vermont
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.cems.uvm.edu/~voight/

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to