mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nlp.git
synced 2024-12-26 20:44:17 +00:00
Remove memory limitations. Add core usage limitation.
This commit is contained in:
parent
97cc15db54
commit
f52fd385da
6
nlp
6
nlp
@ -35,7 +35,7 @@ def parse_arguments():
|
|||||||
help="Output directory.",
|
help="Output directory.",
|
||||||
required=True)
|
required=True)
|
||||||
parser.add_argument("--nCores",
|
parser.add_argument("--nCores",
|
||||||
default=multiprocessing.cpu_count(),
|
default=max(4, multiprocessing.cpu_count()),
|
||||||
dest="nCores",
|
dest="nCores",
|
||||||
help="Total number of cores available.",
|
help="Total number of cores available.",
|
||||||
required=False,
|
required=False,
|
||||||
@ -78,7 +78,7 @@ class NLPWorkflow(WorkflowRunner):
|
|||||||
os.path.join(job["output_dir"], os.path.basename(job["path"]).rsplit(".", 1)[0] + ".vrt"),
|
os.path.join(job["output_dir"], os.path.basename(job["path"]).rsplit(".", 1)[0] + ".vrt"),
|
||||||
self.lang
|
self.lang
|
||||||
)
|
)
|
||||||
nlp_jobs.append(self.addTask(label="nlp_job_-_%i" % (nlp_job_number), command=cmd, dependencies=mkdir_jobs, nCores=min(4, self.nCores), memMb=15000))
|
nlp_jobs.append(self.addTask(label="nlp_job_-_%i" % (nlp_job_number), command=cmd, dependencies=mkdir_jobs, nCores=min(4, self.nCores)))
|
||||||
|
|
||||||
|
|
||||||
def analyze_jobs(inputDir, outputDir, level=1):
|
def analyze_jobs(inputDir, outputDir, level=1):
|
||||||
@ -109,7 +109,7 @@ def main():
|
|||||||
args.nCores
|
args.nCores
|
||||||
)
|
)
|
||||||
|
|
||||||
retval = wflow.run(nCores=args.nCores, memMb=30000)
|
retval = wflow.run(nCores=args.nCores)
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user