Beispiel #1
0
def resolve_gather_tool_contract(tool_contract,
                                 input_files,
                                 root_output_dir,
                                 root_tmp_dir,
                                 max_nproc,
                                 tool_options,
                                 chunk_key,
                                 is_distributable,
                                 log_level="INFO"):
    output_files, resolved_options, nproc, resources = _resolve_core(
        tool_contract,
        input_files,
        root_output_dir,
        max_nproc,
        tool_options,
        tmp_dir=root_tmp_dir)
    task = ResolvedGatherToolContractTask(tool_contract.task.task_id,
                                          tool_contract.task.is_distributed
                                          and is_distributable,
                                          input_files,
                                          output_files,
                                          resolved_options,
                                          nproc,
                                          resources,
                                          chunk_key,
                                          log_level=log_level)
    return ResolvedToolContract(task, tool_contract.driver)
Beispiel #2
0
def _gather_resolved_tool_contract_from_d(d):
    tool_contract_id, is_distributed, input_files, output_files, tool_options, nproc, resource_types = __core_resolved_tool_contract_task_from_d(d)

    chunk_key = d[Constants.RTOOL][Constants.GATHER_CHUNK_KEY]
    task = ResolvedGatherToolContractTask(tool_contract_id, is_distributed,
                                      input_files, output_files,
                                      tool_options, nproc, resource_types, chunk_key)
    return __to_rtc_from_d(d)(task)
Beispiel #3
0
def resolve_gather_tool_contract(tool_contract, input_files, root_output_dir,
                                 root_tmp_dir, max_nproc, tool_options,
                                 chunk_key):
    output_files, resolved_options, nproc, resources = _resolve_core(
        tool_contract, input_files, root_output_dir, max_nproc, tool_options)
    task = ResolvedGatherToolContractTask(tool_contract.task.task_id,
                                          tool_contract.task.is_distributed,
                                          input_files, output_files,
                                          resolved_options, nproc, resources,
                                          chunk_key)
    return ResolvedToolContract(task, tool_contract.driver)