Project

General

Profile

Bug #4135

Memory profiling doesn't work

Added by Ben Hambrecht over 6 years ago. Updated over 6 years ago.

Status:
New
Priority:
High
Start date:
06/17/2013
Due date:
% Done:

0%

Estimated time:
Duration:

Description

When running the pipe with memprofile = True, I get this:

=============================
         Convert                
=============================
Final min max ra 55.0 78.2571
Final min max dec -38.0 -30.0706
... ... done [importing BCC]
... ... done [importing spectral templates]
... ... done [importing Sky]
... ... done [importing telescope throughput]
---------------------------------------------------------------------------
AccessDenied                              Traceback (most recent call last)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    176             else:
    177                 filename = fname
--> 178             __builtin__.execfile(filename, *where)

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in <module>()
    603         print " " 
    604         g = glue()
--> 605         g.glue()
    606 
    607         with archive.archive('../../data/data_bank.h5','r') as ar:

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in glue(self)
    595                                 runUntil = self.commandline.runUntil+1
    596 
--> 597                         self.runPipeline(runFrom, runUntil)
    598 
    599 if __name__ == '__main__':

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in runPipeline(self, runFrom, runUntil)
    507 
    508         def runPipeline(self, runFrom, runUntil):
--> 509                 self.modules.run(runFrom, runUntil, self.runId)
    510 
    511         def dumpParamFile(self, file):

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in run(self, runFrom, runUntil, runId)
    433         def run(self, runFrom, runUntil, runId):
    434 
--> 435                 self.setup(runFrom, runId)
    436 
    437                 print "\n\n************************** running modules **************************\n" 

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in setup(self, runFrom, runId)
    398                         print " " 
    399                         for module in self.prerun:
--> 400                                 self.runModule(module)
    401                         #reread config after convert
    402                         spokesConfig.read(self)

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in runModule(self, module)
    359                         self.execProfile(module)
    360                 elif self.config.has_option("options", "memprofile") and (self.config.get("options", "memprofile") == 'True'):
--> 361                         self.execMemProfile(module)
    362                 elif module['mpi_jobs'] != None and module['mpi_jobs'] > 1:
    363                         self.execBrutusMPI(module)

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in execMemProfile(self, module)
    305                 try:
    306                         ptimer.execute()
--> 307                         while ptimer.poll():
    308                                 time.sleep(.2)
    309                 finally:

/Users/ben/Documents/DESpec/repo/despec/Wrapper/run_pipeline.py in poll(self)
     65       for descendant in descendants:
     66         try:
---> 67           mem_info = descendant.get_memory_info()
     68 
     69           rss_memory += mem_info[0]

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/__init__.pyc in get_memory_info(self)
    622         of taskmgr.exe.
    623         """ 
--> 624         return self._platform_impl.get_memory_info()
    625 
    626     def get_ext_memory_info(self):

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psosx.pyc in wrapper(self, *args, **kwargs)
    137                 raise NoSuchProcess(self.pid, self._process_name)
    138             if err.errno in (errno.EPERM, errno.EACCES):
--> 139                 raise AccessDenied(self.pid, self._process_name)
    140             raise
    141     return wrapper

AccessDenied: (pid=2603)
dhcp-192-033-101-122:Wrapper ben$ 

History

#1 Updated by Laurenz Gamper over 6 years ago

You need to either upgrade the version of psutil using mac ports or run the pipeline as root. It's a bug in the psutil version on mac.



Also available in: Atom PDF