Copyright I.N.R.A. - C.N.R.S.
emmanuel.courcelle@toulouse.inra.fr jerome.gouzy@toulouse.inra.fr
This software is a computer program whose purpose is to help you run your scripts on parallel computers.
This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL http://www.cecill.info"
As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability.
In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security.
The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms.
PARALOOP::SCHEDULER::Scheduler - Abstract class for the Scheduler objects
UNIVERSAL
Objects deriving from Scheduler implement 6 methods, requested by paraloop. Scheduler calls a die for some of those, thus declaring abstract methods.
-WhatParaloopScheduler [abstract] Print a line about this scheduler -Parameters [abstract] Print a few lines descibing parameters for this scheduler -Submit [abstract] Submit a new job -RemTime Ask the system how many seconds are still available -IsLaunched [abstract] Ask the system if a given job is launched -JobId [abstract] Return the job_id -IoRedirect Redirect the stderr and stdout to some file Close stdin
WhatParaloopScheduler my $msg=$obj->WhatParaloopScheduler()
Parameters my $msg=$obj->Parameters()
New my $obj = PARALOOP::Dummy->New(-params => $params, -log => $log);
Submit my $job_id = $obj->Submit();
RemTime my $rem_time = $obj->RemTime();
JobId my $job_id = $obj->JobId(); RemTime my $rem_time = &$obj->RemTime(); IsLaunched If (&$obj->IsLaunched($job_id)==1)... IsSelfPossible If (&$obj->IsSelPossible()==1)... KillJob &$obj->KillJob($job_id); =head1 PRIVATE or PROTECTED METHODS
_Init CALLED BY UNIVERSAL::New -
_IncSubCount Please call this subroutine at the start of your Submit() function You may use the returned value to disable the submit (see System scheduler)
_SyncLockFile Please call this subroutine at the end of your Submit() function
Usage: my $msg = PARALOOP::SCHEDULER::System::WhatParaloopScheduler() or my $msg = $obj->WhatParaloopScheduler() Function: Return some information (2 lines max) on the scheduler An object is NOT considered as a scheduler if this function is not implemented Arg: none ($self is ignored) Return: A message describing the plugin (1 or 2 lines)
Usage: my $msg = PARALOOP::SCHEDULER::System::Parameters() or my $msg = $obj->Parameters() Function: Return the list of allowed parameters for this scheduler If your scheduler defines some parameters, it is good pratice adding this function, to display those parameters when the --parameters switch of paraloop.pl is used. However, this is not mandatory Arg: none ($self is ignored) Return: A message describing the scheduler parameters (1 line / parameter)
Usage: CALLED BY UNIVERSAL::New my $obj = PARALOOP::Dummy->New(-params => $params, -log => $log); Access: private (use New instead) procedure: Init the object Return: nothing Args: -params = an object of class ParamParser (already initialized) -log = an object of class Logger (already initialized) globals: none
Usage: if ($obj->IsSelfPossible()) ... Access: public (use New instead) function: return 1 if this scheduler accepts to submit himself, 0 if it doesn't Return: 0/1 Args: none globals: none
Usage: &$obj->_IncSubCount Access: protected Function: Create the environment variable subcount if necessary, increment its value This function MUST be called by any Submit() function The result MAY be used to forbid any slave job submitting itself Arg : none return: the new subcount
Usage: &$obj->_SyncLockFile($job_id) Access: protected Precondition: _IncSubCount already called Procedure: Synchronize the lock file and trace a log message Please CALL THIS PROCEDURE AT THE END OF YOUR Submit FUNCTION Arg : The job Id return: nothing
Usage: &$obj->Submit() Function: Submit another paraloop job Arg : the output file name
Usage: &$obj->IoRedirect() Procedure: Redirect stdout and stderr to some file Close stdin We do not do anything here: Schedulers like PBS or other queueing system-related will not redefine this function (nothing to do, the system does this for you) System and Clunix schedulers overwrite this function Arg : the output file name
Usage: my $job_id = $obj->JobId() Function: Ask the system for the job id Arg : none Return : the job Id
Usage: my $rem_time = &$obj->RemTime(); Function: Asks the system for the number of seconds remainig before a kill Arg: none Return: -1 (no time limit given)
Usage: If (&$obj->IsLaunched($job_id)==1)... Function: Check the presence of the job in the system Arg: none Return: 0 ==> The job is not known by the system 1 ==> The job is known (may be in different states: Run, Queue, etc)
Usage: &$obj->KillJob($job_id) Function: Kill the job passed by parameter Arg: The job Id Return: none =cut
sub KillJob {die ``\n'';}
1;