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

Multi-Loop parallel is possible?



   How do you do?
  I am Jung, a student of Kyusyu Uni. in Japan.
I am writing a Natural language processing program using  Allegro CLiP Release 3.0.3 march 1990,
on Sequent S2000 (using 20 processors)
   I refer to the manual of Allegro CLiP, but I have a basic(?) program.
I want to write multi-loop parallel,but I can't understand only the manual.
At first,I produce a number of processes, each process has many cases and I want to make
processes as the number of cases.  And I would like to start it parallelly.
   In the manual, the forker game is also parallel program, we just decide how many times
we want to start the processes before it starts.(fig.1)
   When We can't predict how many times before it (outer loop & inner loop) starts,
It can be done HOW?  Of cource, when we know how many times start of the outer loop,
we can not predict inner loop's before the outer loop is ended.(fig.2)
  If is there any possible way, please answer it "HOW" or "No", as soon as possible.

             |                                                     |
     ------------------                          ----------     --------     --------  ;;parallel part 
     | | | | | | | | | |  ;;parallel part        |    |   |     |      |     |      | 
                                                /|\  /\  /|\   /|\    /|\   /|\    /|\ ;;parallel part
          (fig.1)                              ....  ..  ...   ...    ...  .....   ...  
                                                                                       ;;parallel part
                                                          (fig.2)
for example,(fig.2);;;;wrong example
(defun AAA ()
  (...............................)
  (...............................)
  (...............................);;; these parts is different than "next-net" 
  (multiple-value-bind (point word-list)(ret-dict point ...)
       (mapcar #'(lambda (word)
                   (multiple-value-bind (.. hin-list)(return-info word)
                        (make-lwp
                         (progn ( ....... )
                                ( ....... )
                                (mapcar #'(lambda (hin)
                                            (make-lwp
                                             (progn (....)
                                                    (next-net hin)
                                                    )))
                                        hin-list
                                   )
                           (start-lwps);;;; need or not ??
                           ))))
               word-list
               )
       (start-lwps)
       ))

(defun next-net (hin)
  (let (( ....)
        ( ....)
        )
    ( ...... )
    (multiple-value-bind (point word-list)(ret-dict point ...)
         (mapcar #'(lambda (word)
                   (multiple-value-bind (.. hin-list)(return-info word)
                        (make-lwp
                         (progn ( ....... )
                                ( ....... )
                                (mapcar #'(lambda (hin)
                                            (make-lwp
        		                      (progn 
	                                        (case ...   
		                                   (next-net hin)
		                                  ....
	                                           (next2-net hin)
	                                          ....
	                                           (next3-net hin)                               
                                                    ))))
                                        hin-list
                                   )
                                (start-lwps);;; need or not ??
                               ))))
                 word-list
                 )
         (start-lwps)
         )))

(defun ret-dict (point ...)
  (.......))

(defun return-info (word)
  (.......))
----------------------------------------------------------------------------
jung@ninshiki.is.kyushu-u.ac.jp