illinois-ceesd / emirge

Environment for MirgeCom
MIT License
4 stars 3 forks source link

remove pip cache before installing packages #94

Closed matthiasdiener closed 3 years ago

matthiasdiener commented 3 years ago

The background to this PR is that @MTCam and me were debugging an mpi4py issue with Wyatt (which manifested itself in that mpi4py didn't load due to a missing .so) on Lassen. It turned out that there was an old wheel cache file of mpi4py in the cache in his home directory, which led to the impression that install.sh (and even a manual pip install mpi4py) was working well, while installing an old mpi4py package that was built incorrectly. We don't know where that cache file came from.

This seems to be a relatively common issue, I think I hit that as well some time ago and was struggling to fix it. It is aggravated by the facts that (1) the installation seems to go well, and (2) the not very useful error message (no amount of tinkering with the library path or removing/reinstalling emirge/mpi4py will fix this).

To fix this, we have a couple of options:

inducer commented 3 years ago

Thanks for explaining. Fair enough IMO. Could you

? I'd be OK with this PR in that form.

matthiasdiener commented 3 years ago

A potentially less destructive way to solve this:

In this case, we probably wouldn't even need to prompt?

inducer commented 3 years ago

I'm OK with that (and with not prompting). But do make sure there is (noisy!) console output that states what's happening.

matthiasdiener commented 3 years ago

A potentially less destructive way to solve this:

  • before installing any non-dev (i.e., without --editable) pip package, remove the corresponding package from the cache

In this case, we probably wouldn't even need to prompt?

I implemented this.