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

Update HTCondor API to remove deprecation warning #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nsmith-
Copy link
Member

@nsmith- nsmith- commented Dec 18, 2024

Also resolve symlink in image path
Closes #32 and #40

Also resolve symlink in image path
Closes #32 and #40
@nsmith- nsmith- linked an issue Dec 18, 2024 that may be closed by this pull request
@nsmith-
Copy link
Member Author

nsmith- commented Dec 18, 2024

@ikrommyd let me know if this works for you

@ikrommyd
Copy link

ikrommyd commented Dec 20, 2024

This didn't work, unless I'm doing something wrong. I copied bootstrap.sh from this branch, and updated the pip install commands to install from git+https://github.com/CoffeaTeam/lpcjobqueue.git@htcondorapi. Ran bash boostrap.sh and then ./shell coffeateam/coffea-dask-almalinux8:2024.11.0-py3.11. Inside the shell I did pip install htcondor==10.9.0 to fix the proxy spool thingy and then pip install awkward==2.6.9 followed by pip install -U awkward to grab the latest awkward from pypi instead of conda-forge.

Then I started a client

In [1]: from distributed import Client
   ...: from lpcjobqueue import LPCCondorCluster
   ...: import logging
   ...:
   ...:
   ...: logging.basicConfig(level=logging.DEBUG)
   ...:
   ...: cluster = cluster = LPCCondorCluster(log_directory="/uscms/home/ikrommyd/dask_logs", ship_env=True)
   ...: cluster.adapt(minimum=1, maximum=2)
   ...: client = Client(cluster)

And tried to run your ldd check

In [4]: def baz():
   ...:     import subprocess
   ...:
   ...:     path = "/usr/local/lib/python3.11/site-packages/awkward_cpp/lib/libawkward.so"
   ...:     return subprocess.getoutput(f"ldd -v {path}")
   ...:
   ...: print(baz())
   ...: print("="*30)
   ...: for k, v in client.run(baz).items():
   ...:     print(k)
   ...:     print(v)

This ran into ImportError: /lib64/libstdc++.so.6: version 'GLIBCXX_3.4.29' not found (required by /usr/local/lib/python3.11/site-packages/pyarrow/lib.cpython-311-x86_64-linux-gnu.so) in the worker logs under /uscms/home/ikrommyd/dask_logs because that crash will come from the import awkward that patch.py does.

Same thing with this

In [5]: from distributed import Client
   ...: from lpcjobqueue import LPCCondorCluster
   ...: import logging
   ...:
   ...:
   ...: logging.basicConfig(level=logging.DEBUG)
   ...:
   ...: cluster = cluster = LPCCondorCluster(log_directory="/uscms/home/ikrommyd/dask_logs", ship_env=True)
   ...: cluster.adapt(minimum=0, maximum=2)
   ...: client = Client(cluster)
   ...:
   ...: for future in client.map(lambda x: x * 5, range(2)):
   ...:     print(future.result())
   ...: cluster.close()

Any computation will give you this error with a pip-installed awkward due to patch.py

@ikrommyd
Copy link

General rule for #40 to be closed is

from distributed import Client
from lpcjobqueue import LPCCondorCluster
import logging


logging.basicConfig(level=logging.DEBUG)

cluster = cluster = LPCCondorCluster(log_directory="/uscms/home/ikrommyd/dask_logs", ship_env=True)
cluster.adapt(minimum=0, maximum=2)
client = Client(cluster)

for future in client.map(lambda x: x * 5, range(2)):
    print(future.result())
cluster.close()

should work when awkward is pip installed

@nsmith-
Copy link
Member Author

nsmith- commented Dec 20, 2024

Does it work if you use the image-provided awkward?

@ikrommyd
Copy link

Does it work if you use the image-provided awkward?

The image provided awkward is a conda-forge one and yes that always worked. The conda-forge packages know to look for the libstd under /usr/local in the workers as well. It’s the pip installed ones that don’t.

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.

Export LD_LIBRARY_PATH in the job_script_prologue by default Deprecated htcondor API warning
2 participants