in reply to How I'm sure syswrite has finished?

Hi. An explicite close might help...

syswrite ... ; close $_->{handle} or die "cannot close file - $!"; # added $pm->finish;

Replies are listed 'Best First'.
Re^2: How I'm sure syswrite has finished?
by casiano (Pilgrim) on Mar 14, 2009 at 12:52 UTC
    No, I already tried and gives the same error.

      What is the "same" error? It's kind of hard to troubleshoot un(der)specified problems.


      --
      "Language shapes the way we think, and determines what we can think about."
      -- B. L. Whorf
        Yes, you are right. The error is this:
        pp2@europa:~/LGRID-Machine/examples/matrixproduct/open2$ ./matrix_grid +.pl Can't open perl script "/tmp/gridmachine_driver_matrixZNJuj": No such +file or directory Use of uninitialized value in eval "string" at ./matrix_grid.pl line 1 +88, <GEN16> chunk 171. Use of uninitialized value in eval "string" at ./matrix_grid.pl line 1 +88, <GEN16> chunk 171. Use of uninitialized value in eval "string" at ./matrix_grid.pl line 1 +88, <GEN16> chunk 171. Wrong result from process 0 in machine bw pp2@europa:~/LGRID-Machine/examples/matrixproduct/open2$ Can't open pe +rl script "/tmp/gridmachine_driver_matrixj64e3": No existe el fichero + o el directorio pp2@europa:~/LGRID-Machine/examples/matrixproduct/open2$
        If I uncomment the sleep in
        pp2@europa:~/LGRID-Machine/examples/matrixproduct/open2$ sed -ne '153, +168p' matrix_grid.pl foreach (@str_handles) { my $pid = $pm->start and next; $b = syswrite $_->{handle}, join(" ", $_->{chunksize}, $_->{A_cols}, @A_lines[$_->{start}.. $_->{end}], @B_lines, "\cN" ); # Wait until the writing has finished # sleep(1); $pm->finish; }
        It goes OK:
        pp2@europa:~/LGRID-Machine/examples/matrixproduct/open2$ ./matrix_grid +.pl Process 0: machine = bw received result Process 1: machine = beowulf received result Process 2: machine = europa received result Process 3: machine = orion received result Elapsed Time: 1.148361 seconds
        I know is still very cryptic. Apologies.

        Casiano