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

Error when running koopmans from within a directory that is a symlink #214

Open
similt opened this issue Nov 28, 2023 · 9 comments
Open

Comments

@similt
Copy link

similt commented Nov 28, 2023

I am running tutorial_1 job in koopman tutorial folder and getting error:

ValueError: "pseudo_dir" and "pseudo_library" are conflicting; please do not provide "pseudo_dir"

Do you know how to solve this issue?

@elinscott
Copy link
Collaborator

👋 thanks for reaching out and creating an issue. These two settings are mutually exclusive -- you should only specify one of pseudo_library and pseudo_dir.

I am surprised that you encountered this error while completing the tuturials. Can you please provide a few more details about what you were doing when you encountered the error? Can you also provide the python traceback of the error, please? You can obtain this by running koopmans with the --traceback flag.

@similt
Copy link
Author

similt commented Nov 28, 2023

@elinscott Thanks for the quick response.

koopmans --traceback si.json

SyntaxWarning: "is not" with a literal. Did you mean "!="?
Traceback (most recent call last):
File "/project/k1641/koopmans/bin/koopmans", line 8, in
sys.exit(main())
File "/project/k1641/koopmans/src/koopmans/cli/main.py", line 26, in main
workflow = read(args.json)
File "/project/k1641/koopmans/src/koopmans/io/_generic.py", line 36, in read
out = read_json(fd, **kwargs)
File "/project/k1641/koopmans/src/koopmans/io/_json.py", line 54, in read_json
return workflow_cls.fromjson(fd.name, override)
File "/project/k1641/koopmans/src/koopmans/workflows/_workflow.py", line 995, in fromjson
wf = cls._fromjsondct(bigdct, override)
File "/project/k1641/koopmans/src/koopmans/workflows/_workflow.py", line 1114, in _fromjsondct
wf = cls(atoms, parameters=parameters, kpoints=kpts, calculator_parameters=calculator_parameters, **kwargs,
File "/project/k1641/koopmans/src/koopmans/workflows/_wannierize.py", line 34, in init
super().init(*args, **kwargs)
File "/project/k1641/koopmans/src/koopmans/workflows/_workflow.py", line 217, in init
raise ValueError(
ValueError: "pseudo_dir" and "pseudo_library" are conflicting; please do not provide "pseudo_dir"

I don't have a pseudo_dir keyword in my si.json.

@elinscott
Copy link
Collaborator

OK, strange. Can you please...

  • attach the input file si.json
  • tell me what version of koopmans you are using (you can get this via pip show koopmans)

@similt
Copy link
Author

similt commented Nov 29, 2023

si.json

Here is the output of pip show koopmans

Name: koopmans
Version: 1.0.1
Summary: Koopmans spectral functional calculations with python and Quantum ESPRESSO
Home-page:
Author:
Author-email: Edward Linscott [email protected], Riccardo De Gennaro [email protected], Nicola Colonna [email protected]
License:
Location: /lustre2/project/k1641/koopmans/lib/python3.9/site-packages
Editable project location: /lustre2/project/k1641/koopmans
Requires: argparse, ase-koopmans, cloudpickle, deepdiff, iniconfig, matplotlib, numpy, pandas, pybtex, scikit-learn, scipy, spglib, toml, typing, upf-to-json
Required-by:

@elinscott
Copy link
Collaborator

elinscott commented Nov 29, 2023

I am struggling to reproduce the error. I assume you have installed koopmans by cloning the git repo rather than via PyPI. If so, what is the hash of the most recent commit to koopmans? You can get this by running git rev-parse HEAD in /lustre2/project/k1641/koopmans.

@similt
Copy link
Author

similt commented Nov 29, 2023

Yes. I cloned the git repo. Hash value is

bbefdfc

These are the loaded modules while installing:

module switch intel intel-classic/2021.4.0
module load cray-python/3.9.4.1

@elinscott
Copy link
Collaborator

elinscott commented Nov 29, 2023

I cannot reproduce the error with the same input file and the same version of the code. Very mysterious! I would sincerely hope that the particular modules will not affect things.

Are you able to reproduce this issue on a different machine? You would not need to compile QE in order to reproduce the bug -- all you should need to do is clone the repo again, create a virtual environment, activate the virtual environment, pip install ., and then try running koopmans si.json.

Sorry for the hassle, but what is going wrong in this instance is not obvious!

@similt
Copy link
Author

similt commented Dec 1, 2023

@elinscott Thank you very much for your assistance. Our computational scientist, who is in charge of installing the software, has identified and resolved the issue. The problem was traced back to line #216 of 'src/koopmans/workflows/_workflow.py

Our installation path is “/project” is a symlink to “/lustre2/project”. The value of “pseudo_dir” after “.resolve()” is “/lustre2/project”, which is different from the one before “.resolve()”: “/project”. And that is why we got the error message “"pseudo_dir" and "pseudo_library" are conflicting; please do not provide "pseudo_dir"”.

@similt similt closed this as completed Dec 1, 2023
@elinscott elinscott changed the title koopman error Error when running koopmans from within a directory that is a symlink Dec 1, 2023
@elinscott
Copy link
Collaborator

OK, thanks for the information. I am reopening this issue (and giving it a more informative title) because I think it would be good for koopmans to be robust to being run in a directory is a symlink, and when I have the time I will try and fix this.

@elinscott elinscott reopened this Dec 1, 2023
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

No branches or pull requests

2 participants