Skip to content
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

use nonlocal mem_tn variable #1896

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

jfennick
Copy link
Contributor

Traceback (most recent call last):
  File "/home/jfennick/mambaforge-pypy3/envs/wic/lib/python3.10/site-packages/cwltool/job.py", line 518, in get_tree_mem_usage
    children = monitor.children()
  File "/home/jfennick/mambaforge-pypy3/envs/wic/lib/python3.10/site-packages/psutil/__init__.py", line 277, in wrapper
    raise NoSuchProcess(self.pid, self._name, msg=msg)
psutil.NoSuchProcess: process no longer exists (pid=31753)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jfennick/mambaforge-pypy3/envs/wic/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/jfennick/mambaforge-pypy3/envs/wic/lib/python3.10/threading.py", line 1378, in run
    self.function(*self.args, **self.kwargs)
  File "/home/jfennick/mambaforge-pypy3/envs/wic/lib/python3.10/site-packages/cwltool/job.py", line 531, in get_tree_mem_usage
    if mem_tm is not None:
UnboundLocalError: local variable 'mem_tm' referenced before assignment

Using the --parallel flag, the mem_fn variables in the inner and outer scopes are not the same due to a missing global mem_tm line.

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #1896 (adb7599) into main (9accbc5) will increase coverage by 1.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1896      +/-   ##
==========================================
+ Coverage   82.93%   83.95%   +1.01%     
==========================================
  Files          46       46              
  Lines        8163     8163              
  Branches     2168     2168              
==========================================
+ Hits         6770     6853      +83     
+ Misses        896      841      -55     
+ Partials      497      469      -28     
Files Changed Coverage Δ
cwltool/job.py 81.48% <ø> (-0.20%) ⬇️

... and 8 files with indirect coverage changes

@jfennick jfennick changed the title use global mem_tn variable use nonlocal mem_tn variable Aug 31, 2023
@jfennick
Copy link
Contributor Author

Using nonlocal instead of global now.

@mr-c mr-c merged commit b1a1a0b into common-workflow-language:main Aug 31, 2023
42 checks passed
@jfennick jfennick deleted the global_mem_tm branch August 31, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants