Modify

Opened 6 years ago

Last modified 6 years ago

#886 new defect

SimFactory does not correctly detect a failed submit command

Reported by: Ian Hinder Owned by: Erik Schnetter
Priority: major Milestone:
Component: SimFactory Version:
Keywords: Cc:

Description

If qsub can't be found, simfactory doesn't notice that the command returned a nonzero exit code, and proceeds to return 0 itself. The submit command is in simrestart.py:

        output = simlib.ExecuteCommand(submitCommand, output=True)

This should check that the exit code is zero, or fail noisily. What it actually does is

        fd = os.popen(command)
        output = fd.read()
        fd.close()
        
        return output       

Apart from the weird reuse of the output input argument as a return value for something else, it is not checking the exit code in the case where the output was requested.

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Erik Schnetter

Simfactory's way of calling external shell scripts is "interesting". I would catch this problem at a later stage, when the output of the qsub command is parsed. If the regular expression doesn't match, the job id is -1. Simfactory first outputs the job id, and then a less-than helpful message "if the job id output above is -1, job submission failed". Instead, it should check the job id, and fail loudly.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
Next status will be 'confirmed'.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.