hungpham2017 / pywannier90 Goto Github PK
View Code? Open in Web Editor NEWA Wannier90 python interface for VASP and PySCF
License: BSD 3-Clause "New" or "Revised" License
A Wannier90 python interface for VASP and PySCF
License: BSD 3-Clause "New" or "Revised" License
Dear developer, first of all thanks a lot for the effort to share this useful tool
Unfortunately I have the following issue:
My system:
wannier90 lib without wannier_lib.F90 from pywannier90 working by testing with resident tool.
after changing wannier_lib.F90 as suggested in pywannier90 installation guide:
modified Makefile pywannier90 as per the file attached here 'Makefile.txt'
after checking with the command: ' python -c "import libwannier90" ' I received the following error:
"ImportError: /home/PYWANNIER90/pyWannier90/src/libwannier90.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _gfortran_transfer_complex"
to check symbols in the libwannier90 I did 'nm libwannier90.cpython-36m-x86_64-linux-gnu.so' and the result is in the file 'result.txt'
would you be so kind to let me know if you have any thoughts on this? thanks a lot
Regards
When running test files in lib-test
, there seems to be a typecasting error, where the libwannier.cpp
is not receiving the data type from test-cu.py
file.
While running files in examples
, each of the files show some errors.
Running ch4.py
file gives the following error:
Traceback (most recent call last):
File "ch4.py", line 47, in <module>
w90.kernel()
File "/home/valayagarawal/Apps/pyscf/pyscf/pbc/tools/pywannier90.py", line 562, in kernel
self.A_matrix_loc = self.get_A_mat()
File "/home/valayagarawal/Apps/pyscf/pyscf/pbc/tools/pywannier90.py", line 683, in get_A_mat
gr = g_r(coords, abs_site, l, mr, r, zona, x_axis, z_axis, unit = 'B')
File "/home/valayagarawal/Apps/pyscf/pyscf/pbc/tools/pywannier90.py", line 309, in g_r
neither_idx = not larger_idx and not smaller_idx
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Running ch3.py
and h2.py
gives
Traceback (most recent call last):
File "ch3.py", line 46, in <module>
w90 = pywannier90.W90(kmf, cell, nk, num_wann, other_keywords = keywords)
File "/home/valayagarawal/Apps/pyscf/pyscf/pbc/tools/pywannier90.py", line 477, in __init__
nao_kpts.append(mo_energy.shape[0])
AttributeError: 'list' object has no attribute 'shape'
Running h2.py
generates UNK files, but still has the same error as ch3.py
file.
When compling the cpp file, we got an error
/home/qssun/workspace/program/pyWannier90/libwannier90.cpp: In function ‘std::vector<pybind11::array_t<double> > setup(char*, pybind11::array_t<int>, int*, pybind11::array_t<double>, pybind11::array_t<double>, pybind11::array_t<double>, int*, int*, pybind11::array_t<int>, pybind11::array_t<double>, int*, int*)’:
/home/qssun/workspace/program/pyWannier90/libwannier90.cpp:138:3: error: could not convert ‘{nn_, sizeof (int), pybind11::format_descriptor<T, typename std::enable_if<std::is_arithmetic<_Tp>::value, void>::type>::format() [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>](), 3, {nn_dim1, nn_dim2, 4}, {(((long unsigned int)(num_kpts * 4)) * sizeof (int)), (sizeof (int) * 4ul), sizeof (int)}}’ from ‘<brace-enclosed initializer list>’ to ‘pybind11::buffer_info’
};
^
Seems the initialization part for buffer_info is not consistent to the newest buffer_info data structure
https://github.com/pybind/pybind11/blob/master/include/pybind11/buffer_info.h#L17
Dear Contributor:
Recently I am trying to install the pywannier90. After I compile the libwannier90, I obtained 2 files, naming as "libwannier90.cpp" and "libwannier90.cpython-37m-x86_64-linux-gnu.so".
But after I move the .so file to /pbc/tools and try [python3 -c "import libwannier90"], I obtain the following error:
Traceback (most recent call last):
File "", line 1, in
ImportError: [my own directory]/python3.8/site-packages/pyscf/pbc/tools/libwannier90.cpython-37m-x86_64-linux-gnu.so: undefined symbol: zgesv_
So is there a compiling error?
I also want to know that, as you mentioned in /pyscf/pbc/tools/pywannier90.py that:
['WARNING: Check the installation of libwannier90 and its path in pyscf/pbc/tools/pywannier90.py']
But actually, I did not find the code that related to the path of libwannier90 in the .py code. Instead, I found in /pyWannier90/src/pywannier90.py that:
[W90LIB = '/burg/home/hqp2000/pyWannier90/src']
I tries changing this line to the related directory, and copy this line to pyscf/pbc/tools/pywannier90.py. Both of my attempts do not work. So is this line necessary in pyscf/pbc/tools/pywannier90.py?
Thank you for reading this and looking forward to your reply.
When trying to run the h2.py example, I get the following error
Traceback (most recent call last):
File "h2.py", line 47, in <module>
w90.setup()
File "/projects/wagner/wawheel2/code/pyscf/pyscf/pbc/tools/pywannier90.py", line 540, in setup
self.atom_atomic_loc, atoms_cart_loc, self.gamma_only, self.spinors)
TypeError: setup(): incompatible function arguments. The following argument types are supported:
1. (arg0: numpy.ndarray[int32], arg1: int, arg2: numpy.ndarray[float64], arg3: numpy.ndarray[float64], arg4: numpy.ndarray[float64], arg5: int, arg6: int, arg7: numpy.ndarray[int32], arg8: numpy.ndarray[float64], arg9: int, arg10: int) -> List[numpy.ndarray[float64]]
Invoked with: 'wannier90', [2, 2, 2], 8, array([3., 0., 0., 0., 3., 0., 0., 0., 3.]), array([2.0943951, 0. , 0. , 0. , 2.0943951, 0. ,
0. , 0. , 2.0943951]), array([0. , 0. , 0. , 0. , 0. , 0.5, 0. , 0.5, 0. , 0. , 0.5, 0.5, 0.5,
0. , 0. , 0.5, 0. , 0.5, 0.5, 0.5, 0. , 0.5, 0.5, 0.5]), 4, 2, [1, 1], array([1.5, 1.5, 1. , 1.5, 1.5, 2. ]), 0, 0
None of the argument types seem wrong, so I'm confused about what the problem is.
I cannot run the examples in the PySCF nor the pyWannier90 repositories, both giving the same error:
You are running Wannier90_setup via pyWannier90
Error: Problem reading keyword num_wann
Error: examine the output/error file for details
I'll focus on the example in pyscf/pbc/tools/pywannier90.py
The input file for wannier90 is produced successfully and looks fine to me:
! Basic input
num_bands = 9
num_wann = 4
Begin Unit_Cell_Cart
6.3500000 0.0000000 0.0000000
0.0000000 6.3500000 0.0000000
0.0000000 0.0000000 6.3500000
End Unit_Cell_Cart
Begin atoms_cart
C 3.1750000 3.1750000 3.1750000
H 2.5462656 2.5462656 2.5462656
H 3.8037344 3.8037344 2.5462656
H 2.5462656 3.8037344 3.8037344
H 3.8037344 2.5462656 3.8037344
End atoms_cart
!Additional keywords
exclude_bands : 1,6-9
begin projections
C:sp3
end projections
mp_grid = 1 1 1
begin kpoints
0.0000000 0.0000000 0.0000000
End Kpoints
The output prints, after some headers,
Wannier90 is running in LIBRARY MODE via pyWannier90
Setting up k-point neighbours...
Exiting.......
Error: Problem reading keyword num_wann
I am running pywannier90.py on a Linux cluster, and I compiled using GNU compilers, and also followed instructions in #4 (comment)
In the Makefile of pyWannier90,
USE_INTEL =no
LIBDIR = ${HOME}/soft/cp2k/tools/toolchain/install/lapack-3.8.0
LIBS = -L$(LIBDIR)/lib -llapack -lblas -Wl,-rpath,$(W90DIR) -L$(W90DIR) -lwannier
(in which the "libblas.a" and "liblapack.a" are available.)
In "$(W90DIR)", the "libwannier.a" is available, which is compiled using gfortran.
The "libwannier90.cpython-37m-x86_64-linux-gnu.so" was generated normally. The path of "libwannier90.cpython-37m-x86_64-linux-gnu.so" was also added properly into the enviroment variable of "LD_LIBRARY_PATH".
However, the running of "pywannier90.py" still gave an error message:
ImportError: ~/pyWannier90/src/libwannier90.cpython-37m-x86_64-linux-gnu.so: undefined symbol: __w90lib_MOD_wannier_run
Actually, the "__w90lib_MOD_wannier_run" is actaully available in the "libwannier90.cpp".
By running "nm -D" or "ldd -r" libwannier90.cpython-37m-x86_64-linux-gnu.so, I also noted that the status of "__w90lib_MOD_wannier_run" was "-U".
How could I fix it?
Hello, I have reopened issue #5, it seems to still exist even the latest pull request into pyscf.
I just compiled the dev branch of pyscf (with the latest commits), as well as fresh wannier90 and pyWannier90 installations using the GNU compilers and standard LAPACK/BLAS libraries.
When running example 47-pywannier90.py from pyscf, I receive the following error
[sapatha2@golubh3 pbc]$ python 47-pywannier90.py
WARN: Fail to read chkfile. Use MINAO initial guess
converged SCF energy = -7.8727802384689
You are running Wannier90_setup via pyWannier90
Error: Problem reading keyword num_wann
Error: examine the output/error file for details
If I were to instead put in an optional keyword that is read BEFORE num_wann by wannier90 (reference is wannier90/src/parameters.F90 function param_read()), such as timing_level
keywords = \
"""
timing_level = 3
begin projections
Si:sp3
end projections
""",
the following error is received
[sapatha2@golubh3 pbc]$ python 47-pywannier90.py
converged SCF energy = -7.87278023806266
You are running Wannier90_setup via pyWannier90
Error: Problem reading keyword timing_level
Error: examine the output/error file for details
Do you have any idea how to fix this issue? I suspect it has something to do with the formatting of the .win file that is generated by pyWannier90, since it is clearly failing in wannier90/src/parameters.F90 function param_read()
Thanks!
Hi,
Thanks for implementing Wannierization for PySCF. I was wondering if your implementation also works when pseudopotentials are used?
Regards
Vamshi
When I run
$ python -c "import libwannier90"
I get the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /projects/wagner/wawheel2/code/pyWannier90/src/libwannier90.cpython-37m-x86_64-linux-gnu.so: undefined symbol: mpi_reduce_
I'm not sure where the problem is coming from. I've compiled wannier90 using the pyWannier90 version of wannier_lib.F90. The edited lines in the pyWannier90 Makefile are
W90DIR =/projects/wagner/wawheel2/code/wannier90
LIBDIR =/usr/local/intel/parallel_studio_xe_2018/compilers_and_libraries_2018.1.163/linux /bin/intel64
USE_INTEL = yes
MPIF90=mpiifort
ifeq ($(USE_INTEL), yes)
CPP = /usr/local/intel/parallel_studio_xe_2018/compilers_and_libraries_2018.1.163/linux/bin/intel64/icpc
LIBS = -L$(LIBDIR)/mkl/lib/intel64 -lmkl_core -lmkl_intel_lp64 -lmkl_sequential \
-Wl,-rpath,$(LIBDIR)/lib/intel64 -L$(LIBDIR)/lib/intel64 -limf -lintlc -liomp5 -lifcore \
-Wl,-rpath,$(W90DIR) -L$(W90DIR) -lwannier
all: libwannier90_intel
endif
Do you have any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.