rigdenlab / SIMBAD

Sequence Independent Molecular replacement Based on Available Database
http://simbad.rtfd.io
BSD 3-Clause "New" or "Revised" License
3 stars 7 forks source link

Unwanted error messages #14

Closed hlasimpk closed 7 years ago

hlasimpk commented 7 years ago

General Information

Not game breaking but ugly, when running SIMBAD on 100 cores MR the early termination feature is essentially ignored. Because MR is run on every structure some will completely fail and not produce a molrep.pdb, this creates an ugly error message from refmac and fft due to not being able to find an input file.

The error message should be confined to the debug log.

Example

A minimal example to reproduce the error:

$> simbad-contaminant -early_term False input/2fbb.mtz

Traceback

The Python traceback

File: "/nfs/data/SIMBAD_0/latt/mr_lattice/1DTX/mr/molrep/refine/1DTX_refinement_output.mtz"
Cannot be opened for reading
>>>>>> CCP4 library signal ccp4_general:Cannot find input file (Error)
     raised in ccp4setenv <<<<<<
Last system error message: No such file or directory
 fft:  Cannot find input file
 fft:  Cannot find input file
Times: User:       0.0s System:    0.0s Elapsed:     0:01  
File: "/nfs/data/SIMBAD_0/latt/mr_lattice/1DTX/mr/molrep/refine/1DTX_refinement_output.mtz"
Cannot be opened for reading
>>>>>> CCP4 library signal ccp4_general:Cannot find input file (Error)
     raised in ccp4setenv <<<<<<
Last system error message: No such file or directory
 fft:  Cannot find input file
 fft:  Cannot find input file
Times: User:       0.0s System:    0.0s Elapsed:     0:00 
fsimkovic commented 7 years ago

What about adding permit_nonzero=True? Error messages are only raised in cases of non-zero return codes, which a failed call returns.

Avoiding the print message to the screen would mean a change in mbkit, which would give us otherwise unwanted problems.

hlasimpk commented 7 years ago

This is run with:

# Execute the scripts
j = mbkit.dispatch.Job(submit_qtype)
j.submit(run_scripts, directory=self.output_dir, nproc=nproc, name='simbad_mr', submit_queue=submit_queue)
if self.early_term:
        j.wait(monitor=monitor, check_success=mr_succeeded_log)
else:
        j.wait(monitor=monitor)

isn't permit_nonzero=True in cexec?

fsimkovic commented 7 years ago

You can provide the permit_nonzero=True to the submit() call.

j.submit(run_scripts, directory=self.output_dir, nproc=nproc, name='simbad_mr',
         submit_queue=submit_queue, permit_nonzero=True)

The keyword will get carried forward.