Select to view content in your preferred language

GP toolboxes won't load for multiple processes when executed at the same time

688
1
01-27-2012 09:41 AM
danielporter1
New Contributor
I'm using Arcgis 9.3.  Our license manager is located on our network, and we have a floating ArcINFO license.  I'm doing a CPU intensive operation on hundreds of files, so I'm using the Python 2.5 backport of the multiprocessing module to run several processes concurrently to speed things up.  I've got it working except for one thing.

When I make the child processes, they each are instructed to load the toolboxes.  Unfortunately, if I run things that simply (instantiate each process, let it load the toolbox), the toolboxes take forever to load (and may never load, but I haven't waited more than a couple of minutes).  The way I fixed it was by having the process "sleep" for variable periods of time (process one executes immediately, process two waits for 4 seconds...).  I'm guessing this is an issue with the license manager, but I'm not sure how to confirm that.

Has anyone else encountered this issue?  Do you know why it is, or another way to avoid it?
Tags (2)
0 Kudos
1 Reply
NathanLebel
Deactivated User
If you are using the standard toolboxes and not a custom one that you created I typically don't load the toolboxes at all. You can just script like this:



import arcgisscripting

gp = arcgisscripting.create(9.3)

fc = r"C:\data\test.gdb\buildings\slab_area"

gp.delete_management(fc)
0 Kudos