Jupyter-notebook matplotlib operation out of memory error

Hi,

I am using pynq 3.0.1 and 16GB SD card on pynq-z2
I was running matplotlib plot when the kernel got killed by running out of memory.
How do I configure python3 in order for it to run reliably on-board?

@abdyoyo

I think PYNQ-Z2 only got 512MB?
I am also facing some similar issue here.
However my case is a custom board got 1GB.
try

free --mega

to check the remaining memory.

ENJOY~

2 Likes

Thanks Brian.

Currently 401MB out of 512MB is available out of which 103MB is used before program run and the entire memory after the program is executed.

Is there a way to use swap memory or interface more DDR3 memory onto pynq-z2 board?

@abdyoyo

Yes, that is what I am also asking from:

But there are so many missing info here.
Not really software guy.

ENJOY~

1 Like

You can’t add more DDR3 to the board.
You can try add more swap space (I suggest you try to web search how to do this for Ubuntu). (Example). I’m not sure if this will work or how effective it will be.

Cathal

1 Like

@cathalmccabe

No Cath either way will result in unless. PYNQ-Zx itself DDR is fixed to 512MB but 7020 itself can support 1G (board routing is fixed) ← Dead End.
Swap space as Shane had explained, slow in speed.
So both are not solution but just try to hold a falling wall for seconds.

ENJOY~

This answer may not be particularly helpful for the original poster.

I already explained the DDR can’t be upgraded on this board.

You can change swap space in Ubuntu. This may not have helped in the issue in the linked post, but that is a different issue. If this is purely a DRAM size issue, this may help the original poster or someone else who may find this query in future.
Increasing swap probably won’t help in many cases and there are many issues trying to do this with an SD card on an embedded Zynq system - reliability and speed of SD card are two issues.
In general if a design is memory constrained, then the original poster will most likely need to upgrade to a board with more memory or change the software application to reduce memory usage.

Cathal

1 Like
  1. Explanation is not clear:
    XC7Z0xx inherently support 32bit 1G PS DDR memory.
    So this is only restricted to PYNQ-Z series. This need to be clarify if you really thinking about others to know more and learn more.

  2. Software swap memory space is just a laziest and easiest way to hold a falling wall.
    Meanwhile, why connecting other post issue and simply think this won’t help?
    Any lines or sentences from my post is telling this won’t work or help??

  3. Change board is introducing other problem rather than solving problem

PSRAM is what you can settle when PYNQ-Zx series comes to memory congestion.

@abdyoyo
Google a bit PSRAM and see if this can settle the current situation.
Very handy and powerful memory.

This forum allow modulator to ignore flags and being personal.
Very disappointed.
Sure this is not the first time.

ENJOY~

1 Like

Thanks Brian.

I will read up on PSRAM and its usage with Zynq.

@abdyoyo

You can try get a PMOD PSRAM:
https://wiki.sipeed.com/hardware/en/maix/modules_spmod/spmod_psram.html

Not sure it is standard PMOD but the frequency is good when QSPI @ 104MHz ~= 52MBT/s
And you usually got two QSPI interface in XC7Z020 so extra 128MB can be used.
If board got a QSPI FLASH inherently, then replace the 25Qxxx by PSRAM is also possible =]

image

How amazing that it is completely pin compatible =] Or you can store the kernel in QSPI Flash.

ENJOY~

1 Like