gwforg / gwf

A flexible, pragmatic workflow tool.
https://gwf.app/
GNU General Public License v3.0
31 stars 12 forks source link

Running gwf on SGE #415

Closed MiguelGuardado closed 3 months ago

MiguelGuardado commented 4 months ago

Hello,

I am trying to use gwf on my SGE-based HPC and am having trouble getting a toy example to run. I'll leave attached the toy example I am trying to run on my HPC. The error seems to occur closer to the end of the command, where it has a hard time closing the script.

I am entering these commands in the directory where my toy environment is. gwf config set backend sge gwf status

Here is the error message I get when trying to check the status of the toy example.

Traceback (most recent call last):
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/bin/gwf", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/gwf/plugins/status.py", line 109, in status
    with create_backend(
  File "/wynton/home/hernandez/guardado075/.conda/envs/gwf_tutorial/lib/python3.12/site-packages/gwf/backends/base.py", line 124, in __exit__
    self.close()
    ^^^^^^^^^^
AttributeError: 'TrackingBackend' object has no attribute 'close'
MiguelGuardado commented 4 months ago

test1.zip My apologies, here is the toy example I am using on my HPC

dansondergaard commented 3 months ago

What is the output of gwf --version?

I can't find the issue (there seems to be a close() method on the TrackingBackend, so maybe you're running an old version?).

Unfortunately I don't have access to a cluster with SGE, so testing on this backend is very limited.

dansondergaard commented 3 months ago

@birc-aeh found the issue and I pushed a fix. Will be in the next release. Thanks for reporting!