Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parallel-ForkManager CPAN distribution.

Report information
The Basics
Id: 96832
Status: resolved
Priority: 0/
Queue: Parallel-ForkManager

People
Owner: dlux [...] dlux.hu
Requestors: gilles.xiberras [...] orange.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Possible bug on Parallel ForkManager
Date: Mon, 30 Jun 2014 07:38:47 +0000
To: "bug-Parallel-ForkManager [...] rt.cpan.org" <bug-Parallel-ForkManager [...] rt.cpan.org>
From: <gilles.xiberras [...] orange.com>
Hello guys, First of all I want to thank you for this magic library that allows me to use the performances of my hardware the best I can and reduces the processing time of my programs.! Ok here is my problem .... I use : -On Windows 7 Profesionnal -Active Perl 5.16.3 build 1603 -Parallel Fork Manager 1.06 I've this kind of message : (Program stopped !) Free to wrong pool 2c49f50 not 3882c0 at c:\perl64\site\lib\Parallel\ForkManager.pm line 513. My initial PROGRAM : use strict; use Parallel::ForkManager; use warnings; my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; #open Hash table stored on the Hard disk my %h_probe_matrix_gxi_original; dbmopen(%h_probe_matrix_gxi_original, "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); my $MAX_PROCESSES = 10; # nb process. my $pm = Parallel::ForkManager->new ($MAX_PROCESSES); my $i; for ($i = 0 ; $i < 100 ; $i++) { my $pid = $pm->start and next; print "Hello\n"; $pm->finish; } print "End\n"; Description : When You open a Hash table that has been stored on your hard drive and if you do not close it before launching the parallel process then you have the error message. So I suppose that the fact that the Hash table still opened before running the parallel processes is the problem. How to Solve the issue : If you want to use this hash table .... You have to do something like that (associate the initial hash table to a new one and close the initial one). my %h_probe_matrix_gxi; %h_probe_matrix_gxi = %h_probe_matrix_gxi_original; dbmclose(%h_probe_matrix_gxi_original); PERFORMANCE ISSUE : Loading the hash table as a global var ... degrades the performance drastically. My Solution : This does not look fine, as every child will allocate specific memory to load the hash table, however this solves the error message and the performance issue. use strict; use Parallel::ForkManager; use warnings; my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; my $MAX_PROCESSES = 10 ; my $pm = Parallel::ForkManager->new ($MAX_PROCESSES); my $i; for ($i = 0 ; $i < 100 ; $i++) { my $pid = $pm->start and next; my %h_probe_matrix_gxi_original; dbmopen(%h_probe_matrix_gxi_original, "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); print "Hello\n"; dbmclose(%h_probe_matrix_gxi_original); $pm->finish; } print "End\n"; Do not hesitate to contact me should you require any additional elements. Best regards Gilles. Show quoted text
_________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
Dear Gilles, Thanks for the report. It looks like the dbm library does not support the fork() operation on Windows. It is pretty much a standard thing and I don't see how we can solve it in P:FM. Can you maybe try to use another DBM library if there is any? Maybe one that is perl-only (no C/C++)? Balázs On Mon Jun 30 03:39:01 2014, gilles.xiberras@orange.com wrote: Show quoted text
> Hello guys, > > First of all I want to thank you for this magic library that allows me > to use the performances of my hardware the best I can and reduces the > processing time of my programs.! > Ok here is my problem .... > > I use : > -On Windows 7 Profesionnal > -Active Perl 5.16.3 build 1603 > -Parallel Fork Manager 1.06 > > I've this kind of message : (Program stopped !) > Free to wrong pool 2c49f50 not 3882c0 at > c:\perl64\site\lib\Parallel\ForkManager.pm line 513. > > My initial PROGRAM : > use strict; > use Parallel::ForkManager; > use warnings; > > my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; > > #open Hash table stored on the Hard disk > my %h_probe_matrix_gxi_original; > dbmopen(%h_probe_matrix_gxi_original, > "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); > > my $MAX_PROCESSES = 10; # nb process. > my $pm = Parallel::ForkManager->new ($MAX_PROCESSES); > > my $i; > for ($i = 0 ; $i < 100 ; $i++) > { > my $pid = $pm->start and next; > print "Hello\n"; > $pm->finish; > } > > print "End\n"; > > Description : > When You open a Hash table that has been stored on your hard drive and > if you do not close it before launching the parallel process then you > have the error message. > So I suppose that the fact that the Hash table still opened before > running the parallel processes is the problem. > > > How to Solve the issue : > If you want to use this hash table .... You have to do something like > that (associate the initial hash table to a new one and close the > initial one). > my %h_probe_matrix_gxi; > %h_probe_matrix_gxi = %h_probe_matrix_gxi_original; > dbmclose(%h_probe_matrix_gxi_original); > > > PERFORMANCE ISSUE : > Loading the hash table as a global var ... degrades the performance > drastically. > > My Solution : > This does not look fine, as every child will allocate specific memory > to load the hash table, however this solves the error message and the > performance issue. > > > use strict; > use Parallel::ForkManager; > use warnings; > > my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; > my $MAX_PROCESSES = 10 ; > my $pm = Parallel::ForkManager->new ($MAX_PROCESSES); > > my $i; > for ($i = 0 ; $i < 100 ; $i++) > { > my $pid = $pm->start and next; > my %h_probe_matrix_gxi_original; > dbmopen(%h_probe_matrix_gxi_original, > "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); > print "Hello\n"; > dbmclose(%h_probe_matrix_gxi_original); > $pm->finish; > } > > print "End\n"; > > > Do not hesitate to contact me should you require any additional > elements. > > Best regards Gilles. > > _________________________________________________________________________________________________________________________ > > Ce message et ses pieces jointes peuvent contenir des informations > confidentielles ou privilegiees et ne doivent donc > pas etre diffuses, exploites ou copies sans autorisation. Si vous avez > recu ce message par erreur, veuillez le signaler > a l'expediteur et le detruire ainsi que les pieces jointes. Les > messages electroniques etant susceptibles d'alteration, > Orange decline toute responsabilite si ce message a ete altere, > deforme ou falsifie. Merci. > > This message and its attachments may contain confidential or > privileged information that may be protected by law; > they should not be distributed, used or copied without authorisation. > If you have received this email in error, please notify the sender and > delete this message and its attachments. > As emails may be altered, Orange is not liable for messages that have > been modified, changed or falsified. > Thank you.
Feel free to reopen it if you have other comments.
Subject: RE: [rt.cpan.org #96832] Possible bug on Parallel ForkManager
Date: Mon, 28 Jul 2014 12:00:11 +0000
To: "bug-Parallel-ForkManager [...] rt.cpan.org" <bug-Parallel-ForkManager [...] rt.cpan.org>
From: <gilles.xiberras [...] orange.com>
Thanks Blazs, I've a trick.... Open the DBM, and load it into a new hash table, then cloase the DBM... and it works ! Cheers Gilles. Show quoted text
-----Original Message----- From: Szabo, Balazs via RT [mailto:bug-Parallel-ForkManager@rt.cpan.org] Sent: Sunday, July 13, 2014 19:20 To: XIBERRAS Gilles SCE/G2S Subject: [rt.cpan.org #96832] Possible bug on Parallel ForkManager <URL: https://rt.cpan.org/Ticket/Display.html?id=96832 > Dear Gilles, Thanks for the report. It looks like the dbm library does not support the fork() operation on Windows. It is pretty much a standard thing and I don't see how we can solve it in P:FM. Can you maybe try to use another DBM library if there is any? Maybe one that is perl-only (no C/C++)? Balázs On Mon Jun 30 03:39:01 2014, gilles.xiberras@orange.com wrote:
> Hello guys, > > First of all I want to thank you for this magic library that allows me > to use the performances of my hardware the best I can and reduces the > processing time of my programs.! > Ok here is my problem .... > > I use : > -On Windows 7 Profesionnal > -Active Perl 5.16.3 build 1603 > -Parallel Fork Manager 1.06 > > I've this kind of message : (Program stopped !) Free to wrong pool > 2c49f50 not 3882c0 at c:\perl64\site\lib\Parallel\ForkManager.pm line > 513. > > My initial PROGRAM : > use strict; > use Parallel::ForkManager; > use warnings; > > my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; > > #open Hash table stored on the Hard disk my > %h_probe_matrix_gxi_original; dbmopen(%h_probe_matrix_gxi_original, > "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); > > my $MAX_PROCESSES = 10; # nb process. > my $pm = Parallel::ForkManager->new ($MAX_PROCESSES); > > my $i; > for ($i = 0 ; $i < 100 ; $i++) > { > my $pid = $pm->start and next; > print "Hello\n"; > $pm->finish; > } > > print "End\n"; > > Description : > When You open a Hash table that has been stored on your hard drive and > if you do not close it before launching the parallel process then you > have the error message. > So I suppose that the fact that the Hash table still opened before > running the parallel processes is the problem. > > > How to Solve the issue : > If you want to use this hash table .... You have to do something like > that (associate the initial hash table to a new one and close the > initial one). > my %h_probe_matrix_gxi; > %h_probe_matrix_gxi = %h_probe_matrix_gxi_original; > dbmclose(%h_probe_matrix_gxi_original); > > > PERFORMANCE ISSUE : > Loading the hash table as a global var ... degrades the performance > drastically. > > My Solution : > This does not look fine, as every child will allocate specific memory > to load the hash table, however this solves the error message and the > performance issue. > > > use strict; > use Parallel::ForkManager; > use warnings; > > my $dir_src_data_master_DBM = "../../../DATABASES/MASTER/DBM/"; my > $MAX_PROCESSES = 10 ; my $pm = Parallel::ForkManager->new > ($MAX_PROCESSES); > > my $i; > for ($i = 0 ; $i < 100 ; $i++) > { > my $pid = $pm->start and next; > my %h_probe_matrix_gxi_original; > dbmopen(%h_probe_matrix_gxi_original, > "${dir_src_data_master_DBM}PROBE_MATRIX_GXI", 0444); > print "Hello\n"; > dbmclose(%h_probe_matrix_gxi_original); > $pm->finish; > } > > print "End\n"; > > > Do not hesitate to contact me should you require any additional > elements. > > Best regards Gilles. > > ______________________________________________________________________ > ___________________________________________________ > > Ce message et ses pieces jointes peuvent contenir des informations > confidentielles ou privilegiees et ne doivent donc pas etre diffuses, > exploites ou copies sans autorisation. Si vous avez recu ce message > par erreur, veuillez le signaler a l'expediteur et le detruire ainsi > que les pieces jointes. Les messages electroniques etant susceptibles > d'alteration, Orange decline toute responsabilite si ce message a ete > altere, deforme ou falsifie. Merci. > > This message and its attachments may contain confidential or > privileged information that may be protected by law; they should not > be distributed, used or copied without authorisation. > If you have received this email in error, please notify the sender and > delete this message and its attachments. > As emails may be altered, Orange is not liable for messages that have > been modified, changed or falsified. > Thank you.
_________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.