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

On Hera, must deactivate and re-activate the venv to find the esmf-profiler #96

Open
rsdunlapiv opened this issue Nov 11, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@rsdunlapiv
Copy link
Contributor

Describe the bug
On Hera, I have to deactivate and reactivate the venv in order to find the esmf-profiler in the path:

[Rocky.Dunlap@hfe05 esmf-profiler]$ source ./venv/bin/activate.csh 
[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ pip install -e .
Obtaining file:///scratch2/NCEPDEV/stmp1/Rocky.Dunlap/esmf-profiler
Installing collected packages: profiler
  Running setup.py develop for profiler
Successfully installed profiler
[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ esmf-profiler
esmf-profiler: Command not found.

Note that the version (0.1.1) is not shown above, but it does show if the command is repeated:

[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ pip install -e .
Obtaining file:///scratch2/NCEPDEV/stmp1/Rocky.Dunlap/esmf-profiler
Installing collected packages: profiler
  Found existing installation: profiler 0.1.1
    Uninstalling profiler-0.1.1:
      Successfully uninstalled profiler-0.1.1
  Running setup.py develop for profiler
Successfully installed profiler
[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ esmf-profiler
esmf-profiler: Command not found.

The esmf-profiler is not found. If I deactivate/activate again, it is found:

[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ deactivate 
[Rocky.Dunlap@hfe05 esmf-profiler]$ source ./venv/bin/activate.csh
[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ esmf-profiler
usage: esmf-profiler [-h] -t TRACEDIR -n NAME -o OUTDIR [-p PUSH] [-v] [-s]
esmf-profiler: error: the following arguments are required: -t/--tracedir, -n/--name, -o/--outdir

To Reproduce
Follow steps above on Hera.

Expected behavior
Ideally, the user should not need to deactivate/activate again.

@rsdunlapiv rsdunlapiv added the bug Something isn't working label Nov 11, 2021
@rsdunlapiv rsdunlapiv added this to the v0.1.1 milestone Nov 11, 2021
@ryanlong1004
Copy link
Collaborator

@rsdunlapiv I ran a full end to end and had no issues other than the local server not starting (likely can't run that on Hera).

I'm not specifying the activate.csh when activating the virtual environment:

source ./venv/bin/activate

@rsdunlapiv
Copy link
Contributor Author

rsdunlapiv commented Nov 11, 2021

On Hera the default shell is tcsh.

[Rocky.Dunlap@hfe05 esmf-profiler]$ source ./venv/bin/activate
Badly placed ()'s.

So instead I run:

[Rocky.Dunlap@hfe05 esmf-profiler]$ source ./venv/bin/activate.csh 
[venv] [Rocky.Dunlap@hfe05 esmf-profiler]$ 

When I switch to bash, it works:

bash-4.2$ source ./venv/bin/activate
(venv) bash-4.2$ pip install -e .
Obtaining file:///scratch2/NCEPDEV/stmp1/Rocky.Dunlap/esmf-profiler
Installing collected packages: profiler
  Running setup.py develop for profiler
Successfully installed profiler
(venv) bash-4.2$ esmf-profiler
usage: esmf-profiler [-h] -t TRACEDIR -n NAME -o OUTDIR [-p PUSH] [-v] [-s]
esmf-profiler: error: the following arguments are required: -t/--tracedir, -n/--name, -o/--outdir

Ideally, we would support tcsh since that is the default shell on Hera.

If that's is not possible, then we would want to say that bash is required and add that to quick start guide. I would prefer that we support tcsh because that is a better user experience for users on Hera. (Switching shells is something that users could easily miss, so any steps we can take for the tool to work in the default environment is a good move.)

@ryanlong1004 ryanlong1004 modified the milestones: v0.1.1, v1.0 Nov 20, 2021
@ryanlong1004 ryanlong1004 modified the milestones: v1.0, v0.3.0 Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants