Without a reproducible example, it is not easy to give any guidance as to what goes wrong in your or @leshinka’s code. One possibility is to use PETSc with 64 bit integers (but hard to say without an example).
My initial error was for a conda environment. I have a separate spack installation as well that uses 64-bit integer, and I obtain the similar error, only much earlier in the code while loading the mesh:
I uploaded the mesh files here: Sign in to your account
Traceback (most recent call last):
File "/storage/coda1/p/0/shared/leshinka/ssb/transport.py", line 65, in <module>
domain = infile3.read_mesh(cpp.mesh.GhostMode.none, 'Grid')
File "/storage/coda1/p/0/shared/leshinka/spack/var/spack/environments/fenicsx-env/.spack-env/view/lib/python3.10/site-packages/dolfinx/io/utils.py", line 167, in read_mesh
mesh = _cpp.mesh.create_mesh(self.comm(), _cpp.graph.AdjacencyList_int64(cells),
ValueError: vector::reserve
Thus to reproduce this later version:
from dolfinx import cpp, io
from mpi4py import MPI
comm = MPI.COMM_WORLD
with io.XDMFFile(comm, "tetr.xdmf", "r") as infile3:
domain = infile3.read_mesh(cpp.mesh.GhostMode.none, 'Grid')
ct = infile3.read_meshtags(domain, name="Grid")
How many processes are you running this code on?
As your mesh has 270 million cells (and 43 million nodes) you would need to use quite a lot of processes ( I do not have a system available that can run this atm). I would expect using between 30 and 80 processes is needed for a sensible performance.
DOLFINx has been executed with over 200 billion cells with reasonable scaling, so I cant really comment any further on this issue, as you haven’t replied to my previous questions:
One would also need more information about the amount of memory on your system.
I did not use mpirun. I rather used sbatch for a batch slurm job as part of a slurm cluster; with the necessary allocations of memory (384GB) and nodes (1).
Perhaps that makes the difference. Our HPC vendors discourage use of mpirun or mpiexec infavor of srun/sbatch without giving much reasons why (I did not get this error while using mpirun/mpiexec for bigger meshes of a different problem).