Abort undersized auto-distributed Qureg instead of replicating it - #818
Abort undersized auto-distributed Qureg instead of replicating it#818iarejula-bsc wants to merge 1 commit into
Conversation
…ad of silently replicating it Credits: AccelCom @ Barcelona Supercomputing Center
e9ccd4e to
9608884
Compare
|
Could you elaborate in words the decision made? It sounds like you propose to remove the automatic disabling of distribution. The existing functionality is very useful to ensure that the chosen parallelisations/deployments are performant for the user's |
|
Hi there, There still seems to be a misunderstanding - the "wasting" of computation across processes, when a Perhaps you can see the speedup more clearly when it comes time to perform some two- Consider instead the current scheme, where every node is always simultaneously evolving the non-distributed The superfluous communication invited by not-duplicating non-distributed So, lots of additional, superfluous, slowing communication is necessary when trying to let "non-processes relax" during simulation of a non-distributed, non-duplicated |

In a multi-node environment,
createQureg()can currently return a Qureg which is replicated across every node rather than distributed between them. Every node then redundantly simulates the same state, so all but one of the allocated nodes do no useful work, and nothing warns the user. The auto-deployer reaches that outcome by two routes:numQubits < log2(numNodes)), so it cannot be distributed at allMIN_NUM_LOCAL_QUBITS_FOR_AUTO_QUREG_DISTRIBUTION(26) local qubits.The solution provided is to require that an automatic deployment utilises every node of the environment, and to abort with a clear error otherwise, the same way already done in validation (e.g. the "node count must be a power of 2" check), so callers can react instead of QuEST silently proceeding. Each route reports its own reason: how many qubits would be needed to divide the state between the nodes, or how many amplitudes each node would be left holding.
Explicitly requesting a non-distributed Qureg (via
createCustomQureg()orcreateQuregFromEnvDeployments()) remains permitted, since that replication is deliberate; only deployments left to the auto-deployer are affected.reportQuESTEnv()now reports the sizes which can no longer be automatically deployed, rather than advertising a deployment whichcreateQureg()would reject.I would like to discuss the use of Malleability instead of aborting. Where the runtime supports malleability (DMR library), a better response is available, shrink the job to a node count at which the Qureg does distribute, and carry on, which would turn this error into a resize and leave the abort as the fallback for whatever malleability cannot cover. This would not affect the core of Quest and would be low intrusive, as it would only modify the autodeployer, which i think it fits the use of malleability.
Disclosure: this contribution was developed with support of Opus.