From: <Ole...@ga...> - 2009-04-28 07:11:27
|
Here's a question and an answer for the mailing list. -----Original Message----- From: Stephen Roberts [mailto:ste...@an...] Sent: Friday, 24 April 2009 7:02 PM To: Nils Goseberg Cc: Nielsen Ole Subject: Re: Anuga parallel Hi Nils, Have a look at the file test_parallel_sw_runup.py in the anuga_parallel directory. There, the initial global domain is created on processor 0 and on the other processors the domain is set as None. You should be able to apply this to your problem. Let me know if it works. Cheers Steve Nils Goseberg wrote: > > Hi Ole and Steve, > > > > Thanks for pointing me to /create_domain_from_regions()/. This works > for me as well. The thing is, that I formerly started simulations with > /orterun --np <number of proc> python script.py/ which did ok for me. > So, I recently had problems with memory and Steve already suggested > not to do domain.set_quantitiy() stuff in parallel which makes sense > for me as well. So I tried out to start run_simulation_script.py with > orterun in parallel, but used myid == 0 to let only one process do the > initialization and calculation of domain instance. But unfortunately > all other 7 processes crashed since they proceeded in the script and > didn't find domain being ready to start of with. I've attached my > scipt if my description isn't clear enough. > > > > Ok, my questions regarding this are: > > > > 1. Is there a chance to start the script on one CPU and invoke other > mpi processes during calculation, let's say before I do > /distribute(domain)/? > > 2. Or how could I control all other processes to wait for process 0 > until this one has finished domain initialization and calculations to > start with evolve loop when I start the simulation with orterun/mpirun? > > > > I hope you can see me problem. > > > > Best regards and a nice weekend > > Nils > > > > _____________________________________________________________ > > Dipl.-Ing. > *Nils Goseberg* > Research Assistant > > *Franzius-Institut for Hydraulic, Waterways and Coastal Engineering* > > Leibniz Universität Hannover > > Nienburger Straße 5 > > D-30167 Hannover > > > > Tel.: > > > > +49(0)511 762-4295 > > Fax.: > > > > +49(0)511 762-4002 > > E-Mail: > > > > gos...@fi... <mailto:gos...@fi...> > > Http: > > > > www.fi.uni-hannover.de <http://www.fi.uni-hannover.de> > > > > -----Ursprüngliche Nachricht----- > *Von:* Ole...@ga... [mailto:Ole...@ga...] > *Gesendet:* Mittwoch, 22. April 2009 05:47 > *An:* gos...@fi... > *Cc:* Dun...@ga... > *Betreff:* RE: mesh conversion [SEC=UNCLASSIFIED] > > > > > > > > @Ole: When I try to cache _/fit/_to_mesh results from > "domain.set_quantity('elevation', filename=..., use_cache=True, > verbose=True, alpha=T1_project.alpha) in parallel, I just realized > that in a new simulation run where I changed only input data scenario > it again starts to calculate the whole _/fit_to/_mesh procedure > instead of retrieving from the cache? Could I see from the naming of > the cached files why the file are not found in a new simulation run > or do you know where that could arise from? > > > > I am not sure. If the mesh or the input data has changed, caching will > recompute. However, if the mesh is numerically the same, but the mesh > object has changed it may also do that. > > The best thing now is to replace the old way of creating domains by > the new function > > > > Domain = create_domain_from_regions() > > > > It works exactly like create_mesh_from_regions, but does not require a > subsequent call to Domain. This also makes caching of that part more > robust. > > > > Cheers > > Ole > > > > > > > > > > > > > > _____________________________________________________________ > > Dipl.-Ing. > *Nils Goseberg* > Research Assistant > > *Franzius-Institut for Hydraulic, Waterways and Coastal Engineering* > > Leibniz Universität Hannover > > Nienburger Straße 5 > > D-30167 Hannover > > > > Tel.: > > > > +49(0)511 762-4295 > > Fax.: > > > > +49(0)511 762-4002 > > E-Mail: > > > > gos...@fi... <mailto:gos...@fi...> > > Http: > > > > www.fi.uni-hannover.de <http://www.fi.uni-hannover.de> > > > > -----Ursprüngliche Nachricht----- > *Von:* Ole...@ga... [mailto:Ole...@ga...] > *Gesendet:* Freitag, 17. April 2009 03:46 > *An:* Dun...@ga... > *Cc:* gos...@fi... > *Betreff:* RE: mesh conversion [SEC=UNCLASSIFIED] > > > > Thanks Duncan > > > > And Nils, for your info the .tsh format is our own ASCII based mesh > format. > > > > > > Cheers > > Ole > > > > -----Original Message----- > *From:* Gray Duncan > *Sent:* Friday, 17 April 2009 10:16 AM > *To:* Nielsen Ole; 'gos...@fi...' > *Subject:* RE: mesh conversion [SEC=UNCLASSIFIED] > > > > Yes, > > It's something like; > > from anuga.pmesh.mesh import importMeshFromFile > > m = importMeshFromFile('a.msh') > > m.export_mesh_file('a.tsh') > > > > Cheers > > Duncan > > -----Original Message----- > *From:* Nielsen Ole > *Sent:* Friday, 17 April 2009 8:56 AM > *To:* Gray Duncan > *Subject:* FW: mesh conversion [SEC=UNCLASSIFIED] > > Hi Duncan, > > > > Can you remember if it is possible to read as msh and store as tsh? > > > > Cheers and thanks > > Ole > > > > -----Original Message----- > *From:* Nils Goseberg [mailto:gos...@fi...] > *Sent:* Thursday, 9 April 2009 11:20 PM > *To:* Nielsen Ole > *Subject:* mesh conversion > > > > Hi Ole, > > > > Just a short question, is there a script or method to convert > *.msh file into ascii format? > > > > Best regards and a nice weekend, we have easter holiday soon. > > Nils > > > > _____________________________________________________________ > > Dipl.-Ing. > *Nils Goseberg* > Research Assistant > > *Franzius-Institut for Hydraulic, Waterways and Coastal Engineering* > > Leibniz Universität Hannover > > Nienburger Straße 5 > > D-30167 Hannover > > > > Tel.: > > > > +49(0)511 762-4295 > > Fax.: > > > > +49(0)511 762-4002 > > E-Mail: > > > > gos...@fi... <mailto:gos...@fi...> > > Http: > > > > www.fi.uni-hannover.de <http://www.fi.uni-hannover.de> > > > -- +--------------------------------------------------------------------+ | Steve Roberts | My Office: (61)(2) 6125 4445 | | Department of Mathematics | Math Office: (61)(2) 6125 2908 | | Mathematical Sciences Institute| Fax: (61)(2) 6125 4984 | | John Dedman Building #27 | mailto:ste...@an... | | Australian National University | http://www.maths.anu.edu.au/~steve| | Canberra ACT 0200 AUSTRALIA | ANU CRICOS # 00120C | +--------------------------------------------------------------------+ |