Have you tried running in debug mode? If there's a simple hang, or some internal loop is fouling up, it might show up in a hurry. Remember, once inside your script, to set debug for nlminb as well (two levels of debug) Carl