Lua 의 PANIC: unprotected error in call to Lua API (not enough memory) 에러

jelly
1 min readAug 22, 2018

--

Lua 로 개발된 deep learning 프레임워크를 사용하다 보면 아래와 같은 not enout memory 에러가 발생하는 경우가 있다.

PANIC: unprotected error in call to Lua API (not enough memory)

이런 에러가 발생하는 경우 제일 먼저 현재 설치된 Lua 버전이 LuaJIT 인지 확인해본다. LuaJIT 이라면, 코드상의 문제라기 보단 LuaJIT 의 memory issue 일 가능성이 높다.

his is a LuaJIT memory issue. The total memory of Lua objects (tables, strings) is limited to about 2GB.

이를 해결하기 위해서는 Lua52 로 설치하면 해결 된다. 아래의 명령어는 torch 에서 Lua52 를 설치하는 명령어이다.

cd ~/torchcd ~/torch; bash install-deps;./clean.shTORCH_LUA_VERSION=LUA52 ./install.sh

--

--

jelly
jelly

Written by jelly

Test Eng? Test Devloper? Devloper?

No responses yet