bids-apps / CPAC

BIDS Application for the Configurable Pipeline for the Analysis of Connectomes (C-PAC)
Apache License 2.0
14 stars 18 forks source link

Parallel runs try to write to the same file #10

Closed chrisgorgo closed 6 years ago

chrisgorgo commented 7 years ago

When running multiple C-PAC instances (one for each participant) on the same host they try to concurrently write to the same log file

Traceback (most recent call last):
  File "/code/run.py", line 289, in <module>
    plugin='MultiProc', plugin_args=plugin_args)
  File "/usr/local/bin/miniconda/lib/python2.7/site-packages/CPAC/pipeline/cpac_runner.py", line 465, in run
    create_group_log_template(sub_scan_map, c.logDirectory)
  File "/usr/local/bin/miniconda/lib/python2.7/site-packages/CPAC/utils/utils.py", line 1866, in create_group_log_template
    os.makedirs(reportdir)
  File "/usr/local/bin/miniconda/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/output/data/log/reports'

Possible solution would be to use UUID or participant label to write the log to a unique file for each run.

ccraddock commented 6 years ago

we changed the logfile name to fix this. let us know if the problem still happens