diff -ru torque-1.2.0p2/src/resmom/mom_comm.c torque-1.2.0p2.new/src/resmom/mom_comm.c --- torque-1.2.0p2/src/resmom/mom_comm.c Mon Feb 28 18:17:55 2005 +++ torque-1.2.0p2.new/src/resmom/mom_comm.c Tue Apr 12 11:02:56 2005 @@ -3,6 +3,8 @@ * * Copyright (c) 1999-2000 Veridian Information Solutions, Inc. * All rights reserved. +* Copyright (C) 2005 Institut National de Recherche en Informatique +* et Automatique * * --------------------------------------------------------------------------- * For a license to use or redistribute the OpenPBS software under conditions @@ -3929,7 +3931,9 @@ goto err; } - if (pjob->ji_qs.ji_substate != JOB_SUBSTATE_RUNNING) + if ((pjob->ji_qs.ji_substate != JOB_SUBSTATE_RUNNING) && + (pjob->ji_qs.ji_substate != JOB_SUBSTATE_SUSPEND) && + (command == TM_SIGNAL)) { sprintf(log_buffer, "job %s not running", jobid); diff -ru torque-1.2.0p2/src/resmom/requests.c torque-1.2.0p2.new/src/resmom/requests.c --- torque-1.2.0p2/src/resmom/requests.c Tue Feb 22 21:59:14 2005 +++ torque-1.2.0p2.new/src/resmom/requests.c Tue Apr 12 11:03:17 2005 @@ -3,6 +3,8 @@ * * Copyright (c) 1999-2000 Veridian Information Solutions, Inc. * All rights reserved. +* Copyright (C) 2005 Institut National de Recherche en Informatique +* et Automatique * * --------------------------------------------------------------------------- * For a license to use or redistribute the OpenPBS software under conditions @@ -1181,7 +1183,15 @@ for (tp = (task *)GET_NEXT(pjob->ji_tasks);tp != NULL;tp = (task *)GET_NEXT(tp->ti_jobtask)) { if (susp != 0) + { + /* For parallel jobs */ + stat = kill_task(tp,SIGTSTP); + + sleep(5); + + /* For sequential jobs */ stat = kill_task(tp,SIGSTOP); + } else stat = kill_task(tp,SIGCONT); diff -ru torque-1.2.0p2/src/server/req_signal.c torque-1.2.0p2.new/src/server/req_signal.c --- torque-1.2.0p2/src/server/req_signal.c Tue Feb 22 21:59:23 2005 +++ torque-1.2.0p2.new/src/server/req_signal.c Tue Apr 12 11:03:33 2005 @@ -3,6 +3,8 @@ * * Copyright (c) 1999-2000 Veridian Information Solutions, Inc. * All rights reserved. +* Copyright (C) 2005 Institut National de Recherche en Informatique +* et Automatique * * --------------------------------------------------------------------------- * For a license to use or redistribute the OpenPBS software under conditions @@ -227,9 +229,11 @@ set_statechar(pjob); job_save(pjob,SAVEJOB_QUICK); + free_nodes(pjob); } else if (strcmp(preq->rq_ind.rq_signal.rq_signame,SIG_RESUME) == 0) { + set_old_nodes(pjob); pjob->ji_qs.ji_svrflags &= ~JOB_SVFLG_Suspend; set_statechar(pjob);