[OMPI users] globally unique 64bit unsigned integer (homogenous)
Hello, Is there a canonical way to obtain a globally unique 64bit unsigned integer across all mpi processes, multiple times? Thanks MM
Re: [OMPI users] globally unique 64bit unsigned integer (homogenous)
Unique to each process? Try this: int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); uint64_t unique = rank; To get additional unique values: int size; MPI_Comm_size(MPI_COMM_WORLD, &size); unique += size; If this isn't insufficient, please ask to question differently. There is no canonical method for this. Jeff Sent from my iPhone > On Jan 3, 2014, at 3:50 AM, MM wrote: > > Hello, > Is there a canonical way to obtain a globally unique 64bit unsigned integer > across all mpi processes, multiple times? > > Thanks > > MM > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] globally unique 64bit unsigned integer (homogenous)
Hello Yes thanks. I can split the 64bit universe into the number of processors indeed, then generate in each process unique ids that will never conflict with ids from other processors. This will be an index into a data structure that is cloned in each processor (and maintained cloned throughout the session) On 3 January 2014 13:36, Jeff Hammond wrote: > Unique to each process? > > Try this: > > int rank; > MPI_Comm_rank(MPI_COMM_WORLD, &rank); > uint64_t unique = rank; > > To get additional unique values: > > int size; > MPI_Comm_size(MPI_COMM_WORLD, &size); > unique += size; > > If this isn't insufficient, please ask to question differently. > > There is no canonical method for this. > > Jeff > > Sent from my iPhone > > On Jan 3, 2014, at 3:50 AM, MM wrote: > > Hello, > Is there a canonical way to obtain a globally unique 64bit unsigned > integer across all mpi processes, multiple times? > > Thanks > > MM > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users >
Re: [OMPI users] Unable to schedule an MPI tasks
Hi Reuti, May I know how to starts the second mpi program once the previous program is finished? I am using Fedora Cluster. Hope you can provide me some guide on this. Thank you. Best Regards,Shi Wei. > From: re...@staff.uni-marburg.de > Date: Tue, 27 Aug 2013 08:56:26 +0200 > To: us...@open-mpi.org > Subject: Re: [OMPI users] Unable to schedule an MPI tasks > > Hi, > > Am 27.08.2013 um 03:45 schrieb Ng Shi Wei: > > > Due to the time constraints, I would like to run the mpi program by > > scheduling the program to run on desired time using the "at" command. > > However, it seems that the mpirun doesn't execute the mpi program at the > > desired time using the "at" command. > > > > I would like to ask is there any other method to schedule a program to run ? > > For best, it can straight away starts the second mpi program once the > > previous program is finished. > > Is this a local machine just for you, a cluster for you or one shared by > several users? > > You could also think of implementing a full blown queuingsystem like SoGE > https://arc.liv.ac.uk/trac/SGE or Torque > http://www.adaptivecomputing.com/products/open-source/torque/ > > You don't have to think about a time when the job should start then (even > though this is possible with the -a option), but requesting the intended > number of cores will allow a job to run as soon as these resources are > available. I.e. you can submit several jobs at once but they will be executed > one after the other without oversubscribing the available resources. > > -- Reuti > > NB: There is also the command `batch` in the at-suite to start the next job > when the load drops under a certain value. > > > > Hope to get some reply from you all. > > > > Thanks in advance. > > > > Best Regards, > > Shi Wei > > ___ > > users mailing list > > us...@open-mpi.org > > http://www.open-mpi.org/mailman/listinfo.cgi/users > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Unable to schedule an MPI tasks
Hello, It is against the idea of parallel computing but you can do something like this if (rank == 0) { //do something int done = 1; MPI_Send((void*)&done, 1, MPI_INT, 1, 0, MPI_COMM_WORLD): } else if (rank == 1) { MPI_Status * status; int start; MPI_Recv((void*)&start, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, status)://will wait till receive something from rank=0 //do something } Simply, just keep second program on waiting. This is the simplest solution I can come up with :) On Fri, Jan 3, 2014 at 6:36 PM, Ng Shi Wei wrote: > Hi Reuti, > > May I know how to starts the second mpi program once the previous program > is finished? I am using Fedora Cluster. > > Hope you can provide me some guide on this. > > Thank you. > > Best Regards, > Shi Wei. > > > From: re...@staff.uni-marburg.de > > Date: Tue, 27 Aug 2013 08:56:26 +0200 > > To: us...@open-mpi.org > > Subject: Re: [OMPI users] Unable to schedule an MPI tasks > > > > Hi, > > > > Am 27.08.2013 um 03:45 schrieb Ng Shi Wei: > > > > > Due to the time constraints, I would like to run the mpi program by > scheduling the program to run on desired time using the "at" command. > However, it seems that the mpirun doesn't execute the mpi program at the > desired time using the "at" command. > > > > > > I would like to ask is there any other method to schedule a program to > run ? > > > For best, it can straight away starts the second mpi program once the > previous program is finished. > > > > Is this a local machine just for you, a cluster for you or one shared by > several users? > > > > You could also think of implementing a full blown queuingsystem like > SoGE https://arc.liv.ac.uk/trac/SGE or Torque > http://www.adaptivecomputing.com/products/open-source/torque/ > > > > You don't have to think about a time when the job should start then > (even though this is possible with the -a option), but requesting the > intended number of cores will allow a job to run as soon as these resources > are available. I.e. you can submit several jobs at once but they will be > executed one after the other without oversubscribing the available > resources. > > > > -- Reuti > > > > NB: There is also the command `batch` in the at-suite to start the next > job when the load drops under a certain value. > > > > > > > Hope to get some reply from you all. > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Shi Wei > > > ___ > > > users mailing list > > > us...@open-mpi.org > > > http://www.open-mpi.org/mailman/listinfo.cgi/users > > > > ___ > > users mailing list > > us...@open-mpi.org > > http://www.open-mpi.org/mailman/listinfo.cgi/users > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- Özgür Pekçağlıyan B.Sc. in Computer Engineering M.Sc. in Computer Engineering
Re: [OMPI users] Unable to schedule an MPI tasks
Oh sorry I just misunderstand the question :) We are using qsub command in our universities cluster and it schedules and it does all the scheduling. On Sat, Jan 4, 2014 at 1:44 AM, Özgür Pekçağlıyan < ozgur.pekcagli...@gmail.com> wrote: > Hello, > > > It is against the idea of parallel computing but you can do something like > this > > if (rank == 0) > { > //do something > int done = 1; > MPI_Send((void*)&done, 1, MPI_INT, 1, 0, MPI_COMM_WORLD): > } > else if (rank == 1) > { > MPI_Status * status; > int start; > MPI_Recv((void*)&start, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, > status)://will wait till receive something from rank=0 > //do something > } > > Simply, just keep second program on waiting. This is the simplest solution > I can come up with :) > > > On Fri, Jan 3, 2014 at 6:36 PM, Ng Shi Wei wrote: > >> Hi Reuti, >> >> May I know how to starts the second mpi program once the previous program >> is finished? I am using Fedora Cluster. >> >> Hope you can provide me some guide on this. >> >> Thank you. >> >> Best Regards, >> Shi Wei. >> >> > From: re...@staff.uni-marburg.de >> > Date: Tue, 27 Aug 2013 08:56:26 +0200 >> > To: us...@open-mpi.org >> > Subject: Re: [OMPI users] Unable to schedule an MPI tasks >> > >> > Hi, >> > >> > Am 27.08.2013 um 03:45 schrieb Ng Shi Wei: >> > >> > > Due to the time constraints, I would like to run the mpi program by >> scheduling the program to run on desired time using the "at" command. >> However, it seems that the mpirun doesn't execute the mpi program at the >> desired time using the "at" command. >> > > >> > > I would like to ask is there any other method to schedule a program >> to run ? >> > > For best, it can straight away starts the second mpi program once the >> previous program is finished. >> > >> > Is this a local machine just for you, a cluster for you or one shared >> by several users? >> > >> > You could also think of implementing a full blown queuingsystem like >> SoGE https://arc.liv.ac.uk/trac/SGE or Torque >> http://www.adaptivecomputing.com/products/open-source/torque/ >> > >> > You don't have to think about a time when the job should start then >> (even though this is possible with the -a option), but requesting the >> intended number of cores will allow a job to run as soon as these resources >> are available. I.e. you can submit several jobs at once but they will be >> executed one after the other without oversubscribing the available >> resources. >> > >> > -- Reuti >> > >> > NB: There is also the command `batch` in the at-suite to start the next >> job when the load drops under a certain value. >> > >> > >> > > Hope to get some reply from you all. >> > > >> > > Thanks in advance. >> > > >> > > Best Regards, >> > > Shi Wei >> > > ___ >> > > users mailing list >> > > us...@open-mpi.org >> > > http://www.open-mpi.org/mailman/listinfo.cgi/users >> > >> > ___ >> > users mailing list >> > us...@open-mpi.org >> > http://www.open-mpi.org/mailman/listinfo.cgi/users >> >> ___ >> users mailing list >> us...@open-mpi.org >> http://www.open-mpi.org/mailman/listinfo.cgi/users >> > > > > -- > Özgür Pekçağlıyan > B.Sc. in Computer Engineering > M.Sc. in Computer Engineering > -- Özgür Pekçağlıyan B.Sc. in Computer Engineering M.Sc. in Computer Engineering
Re: [OMPI users] Unable to schedule an MPI tasks
Why don't you just have one script that executes all the jobs sequentially, and then use the "at" command to start it? On Jan 3, 2014, at 8:36 AM, Ng Shi Wei wrote: > Hi Reuti, > > May I know how to starts the second mpi program once the previous program is > finished? I am using Fedora Cluster. > > Hope you can provide me some guide on this. > > Thank you. > > Best Regards, > Shi Wei. > > > From: re...@staff.uni-marburg.de > > Date: Tue, 27 Aug 2013 08:56:26 +0200 > > To: us...@open-mpi.org > > Subject: Re: [OMPI users] Unable to schedule an MPI tasks > > > > Hi, > > > > Am 27.08.2013 um 03:45 schrieb Ng Shi Wei: > > > > > Due to the time constraints, I would like to run the mpi program by > > > scheduling the program to run on desired time using the "at" command. > > > However, it seems that the mpirun doesn't execute the mpi program at the > > > desired time using the "at" command. > > > > > > I would like to ask is there any other method to schedule a program to > > > run ? > > > For best, it can straight away starts the second mpi program once the > > > previous program is finished. > > > > Is this a local machine just for you, a cluster for you or one shared by > > several users? > > > > You could also think of implementing a full blown queuingsystem like SoGE > > https://arc.liv.ac.uk/trac/SGE or Torque > > http://www.adaptivecomputing.com/products/open-source/torque/ > > > > You don't have to think about a time when the job should start then (even > > though this is possible with the -a option), but requesting the intended > > number of cores will allow a job to run as soon as these resources are > > available. I.e. you can submit several jobs at once but they will be > > executed one after the other without oversubscribing the available > > resources. > > > > -- Reuti > > > > NB: There is also the command `batch` in the at-suite to start the next job > > when the load drops under a certain value. > > > > > > > Hope to get some reply from you all. > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Shi Wei > > > ___ > > > users mailing list > > > us...@open-mpi.org > > > http://www.open-mpi.org/mailman/listinfo.cgi/users > > > > ___ > > users mailing list > > us...@open-mpi.org > > http://www.open-mpi.org/mailman/listinfo.cgi/users > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users