Out of memory Error - RAPIDS AI Cugraph

Hello all!!

I wrote a program to find strongly and weakly connected components from a graph dataset using Cugraph (RAPIDS AI). But, after running for some time, it gives the following error.

MemoryError: std::bad_alloc: cudaErrorMemoryAllocation: out of memory

How to avoid this error ?
And what does this mean, GPU memory is not sufficient ?
I have uploaded the ERROR screenshot.

I am new to this subject, so this would be of immense help.

Thank you,