Skip to content

Commit

Permalink
correct missing mempool initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankya2 committed Jul 4, 2024
1 parent 9d37020 commit bbacc26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qibotn/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample
"""
from cuquantum import Network
from mpi4py import MPI # this line initializes MPI
import cuquantum.cutensornet as cutn

root = 0
comm = MPI.COMM_WORLD
Expand All @@ -329,6 +330,7 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample
# Assign the device for each process.
device_id = rank % getDeviceCount()
cp.cuda.Device(device_id).use()
mempool = cp.get_default_memory_pool()

# Perform circuit conversion
if rank==0:
Expand Down

0 comments on commit bbacc26

Please sign in to comment.