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

redirect error #63

Closed JuliaLawall closed 6 years ago

JuliaLawall commented 6 years ago

My code is:

    Printf.eprintf
      "prefix: %s %b\n" prefix (Sys.file_exists prefix);
    flush stderr;
    Parmap.parfold
      ~init:(fun id ->
        Printf.eprintf "init: %s %d\n" prefix id; flush stderr;
        Parmap.redirect ~path:prefix ~id)

I'm getting:

prefix: nothing_17_10_2017:8:36:16_9316 false init: nothing_17_10_2017:8:36:16_9316 0 init: nothing_17_10_2017:8:36:16_9316 1 [Pid 9338]: Error creating nothing_17_10_2017:8:36:16_9316 : File exists; procee ding without stdout/stderr redirection init: nothing_17_10_2017:8:36:16_9316 2 init: nothing_17_10_2017:8:36:16_9316 3

What is going wrong?

rdicosmo commented 6 years ago

Hmmm.... The same 'unique' output file is being created twice apparently...

Roberto Di Cosmo (via mobile/cell)

Le 17 nov. 2017 8:47 AM, "JuliaLawall" notifications@github.com a écrit :

My code is:

Printf.eprintf "prefix: %s %b\n" prefix (Sys.file_exists prefix); flush stderr; Parmap.parfold ~init:(fun id -> Printf.eprintf "init: %s %d\n" prefix id; flush stderr; Parmap.redirect ~path:prefix ~id)

I'm getting:

prefix: nothing_17_10_2017:8:36:16_9316 false init: nothing_17_10_2017:8:36:16_9316 0 init: nothing_17_10_2017:8:36:16_9316 1 [Pid 9338]: Error creating nothing_17_10_2017:8:36:16_9316 : File exists; procee ding without stdout/stderr redirection init: nothing_17_10_2017:8:36:16_9316 2 init: nothing_17_10_2017:8:36:16_9316 3

What is going wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rdicosmo/parmap/issues/63, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp-v-uBdddJMECw6u68sg_dlQe3i9FCks5s3ToBgaJpZM4QhqLE .

JuliaLawall commented 6 years ago

On another machine, it works fine.

JuliaLawall commented 6 years ago

The problem is in the version of parmap distributed with Ubuntu (1.0-rc7). Since then, can_redirect has been extended to not fail if the directory already exists (Unix.EEXISTS error). So the problem is already solved.

rdicosmo commented 6 years ago

Thanks Julia!

2017-11-17 20:53 GMT+01:00 JuliaLawall notifications@github.com:

The problem is in the version of parmap distributed with Ubuntu (1.0-rc7). Since then, can_redirect has been extended to not fail if the directory already exists (Unix.EEXISTS error). So the problem is already solved.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rdicosmo/parmap/issues/63#issuecomment-345349349, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp-vz6SGRVhwQ4U4KX7hWiwVn43pqoPks5s3eQ8gaJpZM4QhqLE .

-- Roberto Di Cosmo Director Software Heritage


Professeur (on leave at/detache a INRIA) IRIF email : 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