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

Re: [Condor-users] multi-threaded java application



Josh,

The difference is probably due to how the command-line java program exits vs. how the JVM spawned by Condor exits.  Condor may be calling System.exit() or Runtime.exit() once your main() call finishes, in which case the JVM will not wait for any threads to terminate.  I'd recommend putting explicit calls to Thread.join() to force your program to block until all the threads finish.

Good luck!

Doug

On Jun 17, 2008, at 2:03 PM, Shrader, Joshua H. wrote:

I'm fairly new to Condor, so I apologize if this is a question that has been answered before, but I have been unable to find any information on it.
 
Here's our setup:  We're running condor on a grid.  We have a bunch of blades - each blade has 2 processors and each processor has 4 cores.  Each core is set up as a compute node. 
 
We submit a java job running multiple threads.  It seems like once the main thread finishes, the job returns, without waiting for any other threads to finish.  the following java code yields the following output:
 
If a barrier is put into place, which stalls the main thread until all of the other threads finish, it works fine.  Has anyone encountered this before?  Any help is greatly appreciated.
 
Thanks,
 
Josh
 

_______________________________________________
Condor-users mailing list
To unsubscribe, send a message to condor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/condor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/condor-users/

-- 
===================================
Douglas Clayton
phone: 919.647.9648

Cycle Computing, LLC
Leader in Condor Grid Solutions
Enterprise Condor Support and Management Tools

http://www.cyclecomputing.com