rdicosmo / parmap

Parmap is a minimalistic library allowing to exploit multicore architecture for OCaml programs with minimal modifications.
http://rdicosmo.github.io/parmap/
Other
94 stars 20 forks source link

Is there a way to identify the current process? #53

Closed UnixJunkie closed 7 years ago

UnixJunkie commented 7 years ago

For example, do we have an integer that can be read that says "you were the first worker process the master created by fork" (that would be 0 probably). Also, I might need the total number of working processes to be accessible by a worker. In MPI there is such thing (though I don't remember how they are called). I would need this in order to read a file in parallel during a Parmap.pariter. Reading a file in parallel will put more work in the parallel section of my program so will increase the scalability.

UnixJunkie commented 7 years ago

related to https://github.com/rdicosmo/parmap/pull/54

UnixJunkie commented 7 years ago

related to https://github.com/rdicosmo/parmap/pull/56

UnixJunkie commented 7 years ago

I have tested both pull requests and they behave as I expected. Having both functionalities together will allow me to use parmap in interesting ways. :)

UnixJunkie commented 7 years ago

With those modifications, I am able to read a file in parallel using parmap.

UnixJunkie commented 7 years ago

If you are OK with your tests, we could make a new release. Just ping me if you want me to update the opam package.

rdicosmo commented 7 years ago

There was some cruft left in the last commit, I just removed it, and now everything seems to run smoothly, feel free to update the opam package, and thanks for contributing!

On Thu, Feb 23, 2017 at 02:59:46PM -0800, Francois BERENGER wrote:

If you are OK with your tests, we could make a new release. Just ping me if you want me to update the opam package.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.*

-- Roberto Di Cosmo


Professeur (on leave at/detache a INRIA) IRIF E-mail : roberto@dicosmo.org Universite Paris Diderot Web : http://www.dicosmo.org Case 7014 Twitter : http://twitter.com/rdicosmo
5, Rue Thomas Mann
F-75205 Paris Cedex 13 France

Office location:

Paris Diderot INRIA

Bureau 3020 (3rd floor) Bureau C123 Batiment Sophie Germain Batiment C 8 place Aurélie Nemours 2, Rue Simone Iff Tel: +33 1 80 49 44 42

Metro Bibliotheque F. Mitterrand Ligne 6: Dugommier ligne 14/RER C Ligne 14/RER A: Gare de Lyon


GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

UnixJunkie commented 7 years ago

If a new tag is issued and pushed, then I can update the opam package and this issue can be closed.

rdicosmo commented 7 years ago

Done!

On Fri, Feb 24, 2017 at 06:37:52AM -0800, Francois BERENGER wrote:

If a new tag is issued and pushed, then I can update the opam package and this issue can be closed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.*

-- Roberto Di Cosmo


Professeur (on leave at/detache a INRIA) IRIF E-mail : roberto@dicosmo.org Universite Paris Diderot Web : http://www.dicosmo.org Case 7014 Twitter : http://twitter.com/rdicosmo
5, Rue Thomas Mann
F-75205 Paris Cedex 13 France

Office location:

Paris Diderot INRIA

Bureau 3020 (3rd floor) Bureau C123 Batiment Sophie Germain Batiment C 8 place Aurélie Nemours 2, Rue Simone Iff Tel: +33 1 80 49 44 42

Metro Bibliotheque F. Mitterrand Ligne 6: Dugommier ligne 14/RER C Ligne 14/RER A: Gare de Lyon


GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

UnixJunkie commented 7 years ago

OK, I update the opam package right now.

UnixJunkie commented 7 years ago

FYI https://github.com/ocaml/opam-repository/pull/8544