Need help in understanding Memory Error

Machine Specs:
AWS EC2 t3a.2xlarge - RAM 32GB, Storage: 640GB

For these task options:

I’m getting this error:

[INFO]    Starting smoothing...
Traceback (most recent call last):
File "/code/run.py", line 69, in <module>
app.execute()
File "/code/stages/odm_app.py", line 83, in execute
self.first_stage.run()
File "/code/opendm/types.py", line 361, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 361, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 361, in run
self.next_stage.run(outputs)
[Previous line repeated 3 more times]
File "/code/opendm/types.py", line 342, in run
self.process(self.args, outputs)
File "/code/stages/odm_meshing.py", line 66, in process
mesh.create_25dmesh(tree.filtered_point_cloud, tree.odm_25dmesh,
File "/code/opendm/mesh.py", line 25, in create_25dmesh
commands.create_dem(
File "/code/opendm/dem/commands.py", line 257, in create_dem
median_smoothing(geotiff_path, output_path)
File "/code/opendm/dem/commands.py", line 310, in median_smoothing
arr = img.read()[0]
File "rasterio/_io.pyx", line 337, in rasterio._io.DatasetReaderBase.read
MemoryError: Unable to allocate 70.4 GiB for an array with shape (1, 188488, 100330) and data type float32

Does this mean I need to increase the RAM?

Yes, and/or possibly more swap. How much swap do you have?

1 Like

Seems ClusterODM was set to add a swap equal to RAM which makes it 64 GB in total. Let me increase it and try again.

2 Likes

Increasing RAM and decreasing ortho resolution solved the problem!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.