Force batch to run processes sequentially

6409
18
10-24-2010 07:28 PM
JonathanBailey
Occasional Contributor III

I have a model that I wish to run in a batch process. Within this model, I join an input table to another table, then calculate a value in the input table.

When running this model a single time, it works correctly. I can calculate the field value in the input table using the expression [%Join Table%].FieldName.

However, when I run this model in a batch process, it seems that each instance of the model is run in parallel, so that multiple joins are performed on the input table at the same time. As a result, I can't be sure of the names of the fields in the join table, and so the batch process fails.

Is there any way to force a batch to run each instance separately?

Thanks,

Jon.

18 Replies
LoganPugh
Occasional Contributor III
Bump.

This needs to be addressed I think.

Running Models in Batch mode results in parallel operation when often (almost always?) you want them to run in sequence.

The only workaround I know of is to write a Python script to simply call the model, but this seems extremely tacky.
LukeWebb
Occasional Contributor III
BUMP 🙂 subscribed etc - and a link to my same post in the ArcGIS desktop general forum in case you want to subscribe to it... fingers crossed theres a work around somewhere or bug fix on way (Give us the option, sequencial, or paralell)...

http://forums.arcgis.com/threads/31135-ModelBuilder-in-Batch

Thanks
HugoAhlenius
Occasional Contributor
Sounds like something to enter into http://ideas.arcgis.com!
0 Kudos
BruceHarold
Esri Regular Contributor
Hi All

In this case the recommended approach is to use an iterator instead of a batch input. Iterators run the entire mode for each iteration vs. batch which runs the model once and runs each tool n times for each execution. In this case use the feature class iterator if all the feature classes are in one workspace or use iterate multi-value to select the set of feature classes.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_using_iterators_for_it...
0 Kudos
LoganPugh
Occasional Contributor III
The problem with multivalue iterators is, unless I am mistaken, they only let you modify one model parameter per model iteration. The batch dialog lets you specify a different value for every model parameter for each iteration. What I need is the ability to specify each model parameter differently per iteration like with the batch dialog, but force the processes within the model to run sequentially like with an iterator.

Is there a way to get the best of both worlds (other than the aforementioned -- write a Python script to call the model)?
LukeWebb
Occasional Contributor III
The problem with multivalue iterators is, unless I am mistaken, they only let you modify one model parameter per model iteration. The batch dialog lets you specify a different value for every model parameter for each iteration. What I need is the ability to specify each model parameter differently per iteration like with the batch dialog, but force the processes within the model to run sequentially like with an iterator.

Is there a way to get the best of both worlds (other than the aforementioned -- write a Python script to call the model)?



Yes, 2nd that! To share a tool to our less GIS savvy users here (I would rather send them a tool that is verified than a workflow) I have to send them a seperate script to call the tool if there going to do any batch, and then explain how to use it as I do not have time to code a nice UI like the "batch" window.

Thanks
LukeWebb
Occasional Contributor III
Yes, 2nd that! To share a tool to our less GIS savvy users here (I would rather send them a tool that is verified than a workflow) I have to send them a seperate script to call the tool if there going to do any batch, and then explain how to use it as I do not have time to code a nice UI like the "batch" window.

Thanks



Out of interest, why is it implemented in this fashion? For my work I would always prefer it to work sequencially allowing completed data to come through quicker, rather than wait for them all to start finishing at once? I am sure there is a good reason!?
LoganPugh
Occasional Contributor III
Out of interest, why is it implemented in this fashion? For my work I would always prefer it to work sequencially allowing completed data to come through quicker, rather than wait for them all to start finishing at once? I am sure there is a good reason!?


I can't think of any.
0 Kudos
BBicking1
Esri Contributor
Hey Jonathan,

How are you?
Please include your model here with some sample data and the ArcGIS version and OS you're working on.


Thanks,

Barbara Bicking
0 Kudos