Jamal Alhiyafi wrote:
> Hi:

Hello,

> I have a process that worked fine without any issues.  Now, when i
> try to run it, it takes for ever and it realized in the details
> column when it is running that it states:
> 
> IterationNumber='3441' IterationTotal='629145600' Active Workers =
> '1'.

Wow!

> and the iteration number keeps increasing.  This causes memory and
> issues and using hte machine resources.
> 
> What will make the operation run for that big number of iterations?

The commonest reason is that you are passing around lists in your 
workflow.  By default when a service receives several lists on its 
inputs then it will do a "cross product".  Each element of a list will 
be used with every other element of every other list.  So if you feed a 
service three lists of length five, it will iterate 5^3 i.e. 125 times. 
  It will also produce a list that contains 125 elements.  The depth of 
the output list will be 3, i.e. it will actually be a list of five 
elements each of which is a list of five list elements that each contain 
five values.

If you then pass that list to another service together with other lists 
as inputs, then you will yet again iterate for the product of the 
lengths of the lists.  If you do that a few times then you can end up 
with very large numbers of iterations.

Taverna can also do "dot product" where the first elements of each list 
are used together, then the second elements of the lists, and so on. 
That would (for 3 lists of length 5) cause only 5 iterations, and it 
will output a list of five elements i.e. of depth 1.

> How do I debug this issue?

It is relatively easy in Taverna 2.1 beta 2 as you can look at the 
expected behaviour of a service.  If you go to the details of a service 
and look at "Predicted behavior" then it will tell you the expected 
depth of the values on the input and output ports of the service.  If 
the service is predicted to output a list of a depth greater than the 
inputs, and you are not expecting this, then it is a danger sign.

To change the behaviour you need to alter the way in which Taverna is 
handling lists that go into the service - this is called its iteration 
strategy in Taverna 1 and List handling in Taverna 2.  In Taverna 1, 
which I think you are using, click on a service and then on the 
"Metadata for ..." tab.  You should see a button called "Create 
iteration strategy" - click it.  The commonest requirement is to change 
from cross to dot product, so click on the top-level "cross product" and 
then click on "Change to dot product" button.

You may need to do this for several services in your workflow if you are 
passing around lists.

I hope this helps.

> Thanks, Jamal

Alan




------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/

Reply via email to