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

MPI df hangs #7

Closed
hungpham2017 opened this issue Feb 19, 2019 · 0 comments
Closed

MPI df hangs #7

hungpham2017 opened this issue Feb 19, 2019 · 0 comments

Comments

@hungpham2017
Copy link

hungpham2017 commented Feb 19, 2019

Hello,

Recently, I have updated the lasted PySCF 1.6 and mpi4pyscf. As a result, mpi4pyscf didn't work.

  1. When I used mpi4pyscf df module interactively to compute JK, the mpi_df just hangs while the serial df works just fine
from pyscf.pbc import gto, df
from mpi4pyscf.pbc import df as mpidf
import numpy
cell = gto.M(atom='He 0 0 0; He 0 0 1', a=numpy.eye(3)*4, mesh=[11]*3)
kpts = cell.make_kpts([1,1,2], wrap_around=True)
nao = cell.nao_nr()
dm = numpy.ones((nao,nao))

# df
mydf = df.MDF(cell, kpts)
vj, vk = mydf.get_jk(dm, kpts=kpts[0])

# MPI df
myMPIdf = mpidf.MDF(cell, kpts)
vj, vk = myMPIdf.get_jk(dm, kpts=kpts[0])
  1. If I run the script above using mpirun, I got this error message:
Traceback (most recent call last):
  File "/home/gagliard/phamx494/mpi4pyscf/__init__.py", line 32, in <module>
    mpi.pool.wait()
  File "/home/gagliard/phamx494/mpi4pyscf/tools/mpi_pool.py", line 111, in wait
    ans = self.function(*task)  # task = worker_args
  File "/home/gagliard/phamx494/mpi4pyscf/tools/mpi.py", line 565, in _distribute_call
    return fn(dev, *args, **kwargs)
  File "/home/gagliard/phamx494/mpi4pyscf/pbc/df/mdf_jk.py", line 78, in get_jk
    vj, vk = mdf_jk.get_jk(mydf, dm, hermi, kpt, kpt_band, with_j, with_k, exxdiv)
  File "/home/gagliard/phamx494/pyscf/pyscf/pbc/df/mdf_jk.py", line 90, in get_jk
    vj1, vk1 = df_jk.get_jk(mydf, dm, hermi, kpt, kpts_band, with_j, with_k, None)
  File "/home/gagliard/phamx494/pyscf/pyscf/pbc/df/df_jk.py", line 257, in get_jk
    mydf.build(kpts_band=kpts_band)
  File "/home/gagliard/phamx494/mpi4pyscf/pbc/df/df.py", line 43, in build
    log.debug('MPI info (rank, host, pid)  %s', mpi.platform_info())
  File "/home/gagliard/phamx494/mpi4pyscf/tools/mpi.py", line 737, in platform_info
    return pool.apply(info, (), ())
  File "/home/gagliard/phamx494/mpi4pyscf/tools/mpi_pool.py", line 123, in apply
    self.wait()
  File "/home/gagliard/phamx494/mpi4pyscf/tools/mpi_pool.py", line 111, in wait
    ans = self.function(*task)  # task = worker_args
TypeError: info() takes 0 positional arguments but 2 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "He2.py", line 4, in <module>
    from mpi4pyscf.pbc import df as mpidf
  File "/home/gagliard/phamx494/mpi4pyscf/__init__.py", line 34, in <module>
    traceback.print_exc(err)
  File "/home/gagliard/phamx494/anaconda/lib/python3.6/traceback.py", line 159, in print_exc
    print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)
  File "/home/gagliard/phamx494/anaconda/lib/python3.6/traceback.py", line 100, in print_exception
    type(value), value, tb, limit=limit).format(chain=chain):
  File "/home/gagliard/phamx494/anaconda/lib/python3.6/traceback.py", line 497, in __init__
    capture_locals=capture_locals)
  File "/home/gagliard/phamx494/anaconda/lib/python3.6/traceback.py", line 332, in extract
    if limit >= 0:
TypeError: '>=' not supported between instances of 'TypeError' and 'int'

Not sure where it goes wrong with the new update.
Thank you

sunqm added a commit to sunqm/mpi4pyscf that referenced this issue Feb 22, 2019
sunqm added a commit that referenced this issue Feb 22, 2019
@sunqm sunqm closed this as completed Feb 22, 2019
sunqm added a commit that referenced this issue Feb 22, 2019
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