help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doubts regarding the usage of cluster operations in parallel package


From: Prasad K
Subject: doubts regarding the usage of cluster operations in parallel package
Date: Sun, 27 May 2018 23:30:58 -0700 (MST)

Hi all,

I want to implement my algorithm over a parallel cluster using the parallel
package 
functions (i am using parallel v3.1.2) but i am facing some difficulties.

1) By default the client system (localhost) as given by pconnect function
does not involve in parallel execution,
        I want to include even the localhost to participate in parallel 
execution
over a cluster. I know there is a way to do it using pconnect but cant find
it.
        any suggestins regarding this would be helpful.
        
2) There is no error triggering in the netcellfun as in normal execution.
This makes a complicated debug procedure if i encounter any.
        I would like to give an example for this problem:
        
        My Functions:
        
        function z = fun1(x,y)
                
                for i = 1:10
                        z(i,:) = x+y;
                        % z(i,:) = x+y+err;
                end
                
        end
        
        function z = fun2(x,y)

                z = x+y;
                % z = x+y+err;
                
        end
        
        Main Program:
        
        clc;clear all;close all;
        Nproc = 8;
        x = 1:100;
        
        y = 10;
        
        z = fun1(x,y);

        inputcell1 = num2cell(repmat(x,10,1),2);
        inputcell2 = num2cell(y);

        % output = parcellfun(Nproc, @fun2,
(inputcell1),(inputcell2),"uniformoutpu",false);

        % conns = pconnect({"pancloud12"});
        % output = netcellfun(conns, @fun2,
(inputcell1),(inputcell2),"uniformoutput",false);
        
        a) When an error is introduced in normal execution (i.e. fun1) it gives 
an
error message saying
                "error: 'err' undefined near line 4 column 17
                error: called from
                        fun1 at line 4 column 11
                        main at line 7 column 3"
                        
        b) When an error is introduced in parallel execution (i.e. using 
parcellfun
& fun2) it gives error message saying 
                "parcellfun: 0/10 jobs done
                warning: parcellfun: unhandled error in subprocess 1
                warning: called from
                        parcellfun at line 294 column 9
                        main at line 12 column 8
                parcellfun: 0/10 jobs done
                warning: parcellfun: unhandled error in subprocess 3
                warning: called from
                        parcellfun at line 294 column 9
                        main at line 12 column 8

                parcellfun: 1/10 jobs donewarning: parcellfun: unhandled error 
in
subprocess 2
                warning: called from
                        parcellfun at line 294 column 9
                        main at line 12 column 8

                warning: parcellfun: unhandled error in subprocess 4
                warning: called from
                        parcellfun at line 294 column 9
                        main at line 12 column 8

                warning: parcellfun: unhandled error in subprocess 6
                warning: called from
                        parcellfun at line 294 column 9
                        main at line 12 column 8"
        
        c) But when using parallel execution over cluster (i.e. using 
netcellfun &
fun2) it does not give any error message but the output is a empty cell
array.
                "output =
                                {
                                  [1,1] = [](0x0)
                                  [2,1] = [](0x0)
                                  [3,1] = [](0x0)
                                  [4,1] = [](0x0)
                                  [5,1] = [](0x0)
                                  [6,1] = [](0x0)
                                  [7,1] = [](0x0)
                                  [8,1] = [](0x0)
                                  [9,1] = [](0x0)
                                  [10,1] = [](0x0)
                                }
"
                Which makes debuging very difficult in big algorithms.
                
                This behaviour is not only seen in case of undefined variables 
but also in
other kind of error like undefined function etc.
                So Is there any way to trigger this error while using it over a 
cluster or
should user take care of this errors while writing a funtion carefully ??



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]