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 while 1.parse_Overlap in interfere part #42

Closed
wangchengDon opened this issue May 26, 2023 · 8 comments
Closed

error while 1.parse_Overlap in interfere part #42

wangchengDon opened this issue May 26, 2023 · 8 comments

Comments

@wangchengDon
Copy link

Hi, dear developer.
when I am doing the inference part, The following error occurred.

Begin 1.parse_Overlap
Traceback (most recent call last):
File "/fs1/home/qijingshan/miniconda3/envs/copy/bin/deeph-inference", line 8, in
sys.exit(main())
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/scripts/inference.py", line 63, in main
openmx_parse_overlap(OLP_dir, work_dir, os.path.join(OLP_dir, structure_file_name))
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/preprocess/openmx_parse.py", line 76, in openmx_parse_overlap
structure = Structure.from_file(stru_dir)
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/pymatgen/core/structure.py", line 2676, in from_file
s = cls.from_str(contents, fmt="poscar", primitive=primitive, sort=sort, merge_tol=merge_tol, **kwargs)
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/pymatgen/core/structure.py", line 2594, in from_str
s = Poscar.from_string(input_string, False, read_velocities=False, **kwargs).structure
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/pymatgen/io/vasp/inputs.py", line 390, in from_string
toks = lines[ipos + 1 + i].split()
IndexError: tuple index out of range

It looks a bit strange,It What should I do to avoid reporting errors?

Here is my train.ini
[basic]
OLP_dir = /fs1/home/qijingshan/wcd/TBB/example/work_dir/olp/5_4
work_dir = /fs1/home/qijingshan/wcd/TBB/example/work_dir/inference/5_4
structure_file_name = POSCAR
task = [1, 2, 3, 4, 5]
sparse_calc_config = /fs1/home/qijingshan/wcd/TBB/example/work_dir/inference/5_4/band.json
trained_model_dir = /fs1/home/qijingshan/wcd/TBB/example/work_dir/trained_model
restore_blocks_py = True

[interpreter]
julia_interpreter = /fs1/home/qijingshan/julia-1.6.6/bin/juila

[graph]
radius = 9.0
create_from_DFT = True

@mzjb
Copy link
Owner

mzjb commented May 26, 2023

@wangchengDon

It seems like your pymatgen is not correctly parsing the POSCAR file. You are using an older version of the DeepH code. Please update both DeepH-pack and overlap only openmx to the latest versions and try again.

@wangchengDon
Copy link
Author

Thanks for your reponse,updating them working out this problem.
But another AsserionError appears.
####### Begin 1.parse_Overlap
Found 244 atoms

******* Finish 1.parse_Overlap, cost 5 seconds

####### Begin 2.get_local_coordinate

******* Finish 2.get_local_coordinate, cost 3 seconds

####### Begin 3.get_pred_Hamiltonian
^M 0%| | 0/1 [00:00<?, ?it/s]^M 0%| | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/fs1/home/qijingshan/miniconda3/envs/copy/bin/deeph-inference", line 8, in
sys.exit(main())
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/scripts/inference.py", line 124, in main
predict(input_dir=work_dir, output_dir=work_dir, disable_cuda=disable_cuda, device=device,
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/inference/pred_ham.py", line 38, in predict
assert os.path.exists(os.path.join(trained_model_dir, 'config.ini'))
AssertionError
How should I do to deal with it?

@mzjb
Copy link
Owner

mzjb commented May 28, 2023

@wangchengDon

As mentioned in the error message you encountered, the required files are indeed expected to be present in the trained_model_dir that you have set. Please make sure that the directory /fs1/home/qijingshan/wcd/TBB/example/work_dir/trained_model contains the config.ini and best_model.pt files.

@wangchengDon
Copy link
Author

Hi,
Thank you very much for your reply.I'm sorry I made a foolish mistake to waste your time.
After changing the directory,the step3 has done.

But after browsing through similar issues, I found that my problem cannot be solved. May I ask if this is caused by improper environmental configuration?

Begin 5.sparse_calc
Traceback (most recent call last):
File "/fs1/home/qijingshan/miniconda3/envs/copy/bin/deeph-inference", line 8, in
sys.exit(main())
File "/fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/scripts/inference.py", line 150, in main
assert capture_output.returncode == 0
AssertionError

best regards

@mzjb
Copy link
Owner

mzjb commented May 29, 2023

It appears that you may have redirected the program output to a file, which could be why the error message you are seeing does not include the error from the Julia program. You can check the earlier part of your output to see if it contains the line ~~~~~~~ 5.sparse_calc, command:, followed by the actual error command. You can run this command separately to view the error message.

@wangchengDon
Copy link
Author

Yes,When I found the command you mentioned, I found an error as follows.

/fs1/home/qijingshan/julia-1.6.6/bin/juila /fs1/home/qijingshan/miniconda3/envs/copy/lib/python3.9/site-packages/deeph/inference/sparse_calc.jl --input_dir /fs1/home/qijingshan/wcd/TBB/example/work_dir/inference/5_4 --output_dir /fs1/home/qijingshan/wcd/TBB/example/work_dir/inference/5_4 --config /fs1/home/qijingshan/wcd/TBB/example/work_dir/inference/5_4/band.json


####### Begin 1.parse_Overlap
Found 244 atoms

******* Finish 1.parse_Overlap, cost 6 seconds


####### Begin 2.get_local_coordinate

******* Finish 2.get_local_coordinate, cost 3 seconds


####### Begin 3.get_pred_Hamiltonian
^M  0%|          | 0/1 [00:00<?, ?it/s]^M100%|██████████| 1/1 [04:50<00:00, 290.26s/it]^M100%|██████████| 1/1 [04:50<00:00, 290.28s/it]
/bin/sh: /fs1/home/qijingshan/julia-1.6.6/bin/juila: No such file or directory

I saw Julia's related error here. May I ask if it's the problem here? I will attach the error file here
Thank you for your patient, timely, and kindly reply

[slurm-1160437.out.docx](https://github.com/mzjb/DeepH-pack/files/11589177/slurm-1160437.out.docx)

@mzjb
Copy link
Owner

mzjb commented May 29, 2023

Based on the error message you provided:
/bin/sh: /fs1/home/qijingshan/julia-1.6.6/bin/juila: No such file or directory
it indicates that the path you have set does not have the correct Julia interpreter. Please check the julia_interpreter parameter in your configuration file for deeph-inference. Make sure that the path specified for the "julia_interpreter" parameter points to the correct location of the Julia interpreter executable on your system.

@wangchengDon
Copy link
Author

Thanks you !

Your reply helped me solve my problem!

I'm so thankful for your patient response.

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