Skip to content

DataSink S3 support #1316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Feb 3, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4b3f926
add resource multiproc plugin
carolFrohlich Sep 29, 2015
6f4690b
callback functions write log
carolFrohlich Sep 29, 2015
52da583
fix multiproc tests. create lot 2 json converter
carolFrohlich Sep 30, 2015
ffb4756
fix comments and logs
carolFrohlich Sep 30, 2015
0890e81
fix tests
carolFrohlich Oct 1, 2015
b3c6afc
Modified the DataSink class and DataSinkInputSpec class to be able to…
pintohutch Oct 6, 2015
4b02558
Removed redundant imports
pintohutch Oct 6, 2015
42f0b1b
Quick cosmetic fix
pintohutch Oct 6, 2015
872e752
scheduler does not sleep
carolFrohlich Oct 7, 2015
e465c28
clean code
carolFrohlich Oct 8, 2015
e49965c
draw gant chart, small fixes
carolFrohlich Oct 8, 2015
34acdf8
add memory and thread to gantt chart, callback handles errors
carolFrohlich Oct 8, 2015
c9c92ef
Added handling of DataSink to save to a local directory if it cant ac…
pintohutch Oct 8, 2015
cb07b5a
add tests
carolFrohlich Oct 9, 2015
827d2c2
fix method name
carolFrohlich Oct 9, 2015
70897b2
Merge branch 'master' of https://github.com/carolFrohlich/nipype
carolFrohlich Oct 9, 2015
0856bca
Merge branch 'master' of https://github.com/dclark87/nipype
carolFrohlich Oct 9, 2015
a8f8006
fix typos
carolFrohlich Oct 9, 2015
300d20c
Update io.py
pintohutch Oct 15, 2015
0503c23
Added md5 checking for s3
pintohutch Oct 15, 2015
e3ad668
Merge pull request #1 from FCP-INDI/master
pintohutch Oct 15, 2015
f6cfad7
Added message about file already existsing
pintohutch Oct 15, 2015
0529444
Merge pull request #2 from dclark87/master
carolFrohlich Oct 16, 2015
f107efd
Merge pull request #1 from dclark87/patch-1
carolFrohlich Oct 16, 2015
fdcab2a
Merge pull request #2 from FCP-INDI/master
pintohutch Oct 21, 2015
186d00a
Fixed dive by 0 bug
pintohutch Oct 21, 2015
f77371b
Added upper/lower case support for S3 prefix
pintohutch Oct 30, 2015
e2f51f6
Added support for both non-root and root AWS creds in DataSink
pintohutch Nov 3, 2015
f34b6d6
Merge pull request #3 from dclark87/master
pintohutch Nov 12, 2015
350fd4a
add attribute real_memory to interface, change attr memory to estimat…
carolFrohlich Nov 25, 2015
f74fe25
Added real memory recording to plugn
ccraddock Nov 25, 2015
1e66b86
Added initial code for getting used memory of node
ccraddock Nov 25, 2015
716f923
Fixed logging of real memory
ccraddock Dec 2, 2015
ff7959a
Added per node runtime logging
ccraddock Dec 2, 2015
d25afb5
Removed debugging print statements
pintohutch Dec 10, 2015
00a470b
sync with master
carolFrohlich Dec 30, 2015
89d7e9c
Added fakes3 integration with datasink and started adding a local_cop…
pintohutch Jan 7, 2016
613d8cb
Merge branch 'master' of https://github.com/fcp-indi/nipype
pintohutch Jan 7, 2016
a70c81e
Finished adding local_copy logic and passed all unit tests
pintohutch Jan 8, 2016
2af5c1d
Removed memory profiler stuff for now
pintohutch Jan 8, 2016
b7e9309
Removed the memory profiler code to just pull in s3 datasink code
pintohutch Jan 8, 2016
0e5e0e9
Removed unneccessary import
pintohutch Jan 8, 2016
0f78025
Removed unncessary function argument
pintohutch Jan 8, 2016
15f3ced
Corrected Carol's in fsl interface code
pintohutch Jan 8, 2016
ca4bed5
Removed all of the ResourceMultiProc plugin so the S3 datasink
pintohutch Jan 11, 2016
0d7419e
Manually fixed conflicts
pintohutch Jan 12, 2016
0e6a42b
Merge branch 'nipy-master' into s3_datasink
pintohutch Jan 12, 2016
ecb05e2
Found merge HEAD comment and removed
pintohutch Jan 12, 2016
ee70359
Removed print statements from fakes3 checker and made it a check at t…
pintohutch Jan 12, 2016
7ecaefd
Changed fakes3_found to fakes3
pintohutch Jan 12, 2016
818da99
Fixed Python3 compatibility bug in exception raising
pintohutch Jan 13, 2016
49c14f8
Made exceptions more explicit
pintohutch Jan 13, 2016
a9dd168
Removed S3DataSink and changed dummy file writing to be Python2/3 com…
pintohutch Jan 14, 2016
c2eedc7
Added aws.rst file documenting use of new S3 capabilities in the Data…
pintohutch Feb 2, 2016
c0d148a
Removed bucket from being an attribute of the DataSink and just made …
pintohutch Feb 3, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add memory and thread to gantt chart, callback handles errors
  • Loading branch information
carolFrohlich committed Oct 8, 2015
commit 34acdf8f8a3285ec80c1aa9def49a30e1eaa9702
12 changes: 11 additions & 1 deletion nipype/pipeline/plugins/callback_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging

def log_nodes_cb(node, status):
print 'status', status
logger = logging.getLogger('callback')
if status == 'start':
message = '{"name":' + '"' + node.name + '"' + ',"id":' + '"' +\
Expand All @@ -10,10 +11,19 @@ def log_nodes_cb(node, status):
+ str(node._interface.num_threads) + '}'

logger.debug(message)
else:

elif status == 'end':
message = '{"name":' + '"' + node.name + '"' + ',"id":' + '"' + \
node._id + '"' + ',"finish":' + '"' + str(datetime.datetime.now()) +\
'"' + ',"memory":' + str(node._interface.memory) + ',"num_threads":' \
+ str(node._interface.num_threads) + '}'

logger.debug(message)

else:
message = '{"name":' + '"' + node.name + '"' + ',"id":' + '"' + \
node._id + '"' + ',"finish":' + '"' + str(datetime.datetime.now()) +\
'"' + ',"memory":' + str(node._interface.memory) + ',"num_threads":' \
+ str(node._interface.num_threads) + ',"error":"True"}'

logger.debug(message)
23 changes: 11 additions & 12 deletions nipype/pipeline/plugins/multiproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,19 @@ class ResourceMultiProcPlugin(MultiProcPlugin):
def __init__(self, plugin_args=None):
super(ResourceMultiProcPlugin, self).__init__(plugin_args=plugin_args)
self.plugin_args = plugin_args
self.processors = cpu_count()
memory = psutil.virtual_memory()
self.memory = memory.total / (1024*1024*1024)
if self.plugin_args:
if 'n_procs' in self.plugin_args:
self.processors = self.plugin_args['n_procs']
if 'memory' in self.plugin_args:
self.memory = self.plugin_args['memory']

def _wait(self):
if len(self.pending_tasks) > 0:
semaphore_singleton.semaphore.acquire()
else:
semaphore_singleton.semaphore.release()
semaphore_singleton.semaphore.release()


def _submit_job(self, node, updatehash=False):
Expand All @@ -162,14 +169,6 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
Check memory (gb) and cores usage before running jobs.
"""
executing_now = []
processors = cpu_count()
memory = psutil.virtual_memory()
memory = memory.total / (1024*1024*1024)
if self.plugin_args:
if 'n_procs' in self.plugin_args:
processors = self.plugin_args['n_procs']
if 'memory' in self.plugin_args:
memory = self.plugin_args['memory']

# Check to see if a job is available
jobids = np.flatnonzero((self.proc_pending == True) & (self.depidx.sum(axis=0) == 0).__array__())
Expand All @@ -181,8 +180,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
busy_memory+= self.procs[jobid]._interface.memory
busy_processors+= self.procs[jobid]._interface.num_threads

free_memory = memory - busy_memory
free_processors = processors - busy_processors
free_memory = self.memory - busy_memory
free_processors = self.processors - busy_processors


#check all jobs without dependency not run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,4 @@ def generate_gantt_chart(logfile, cores, minute_scale=10, space_between_minutes=
#save file
html_file = open(logfile +'.html', 'wb')
html_file.write(html_string)
html_file.close()


generate_gantt_chart('/home/caroline/Desktop/callback.log', 8)
html_file.close()