Below is the error I got while using divagrid on Matlab. Anyone has a solution? How do I expand the available space? My computer has 16 GB of memory and it seems to be only using 1/3 of them at most.
Many thanks!
Total number of data constraint: ndata = 13743153
** ERROR - ALLODY - STORAGE OF kelos
REQUIRED SPACE27544606
AVAILABLE SPACE : 20000000
Index in position 2 exceeds array bounds.

댓글 수: 3

madhan ravi
madhan ravi 2018년 9월 2일
can you post the whole code and the data it requires?
Rik
Rik 2018년 9월 2일
Matlab needs contiguous blocks of free memory to store variables, so if your free memory is very fragmented you won't be able to make large variables. If you search for them on this forum, you should be able to find tips on how to maximize your array sizes.
Leon
Leon 2018년 9월 3일
Thank you for the info! Any specifics on the solution? I'm unable to find any tips on how to solve this on this forum.

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 3일

0 개 추천

You need to adjust a parameter and recompile. See page 181 of the user guide.

댓글 수: 6

Leon
Leon 2018년 9월 3일
Thank you very much! Unfortunately, that instruction is for the UNIX version of divagrid, instead of the Matlab version. Do you know how to fix that in the Matlab version?
Walter Roberson
Walter Roberson 2018년 9월 4일
The solution is what I posted above. What you are referring to as the "Matlab version" prepares data files and then uses system() to invoke diva.exe . The error message is coming from diva.exe so you need to make the source code change described on pages 180 to 181 and then rebuild diva.exe
Many thanks!
Sorry for not lack of knowledge on exe files, but would you mind to elaborate on how specifically to make the source code change described on pages 180 to 181 and then rebuild diva.exe?
The manuals says: "recompile the sources after reducing the values of parameters nrea and nent in file ./src/Fortran/Calc/divainc.h".
I have no idea how to access the divainc.h file in diva.exe.
Walter Roberson
Walter Roberson 2018년 9월 4일
You are looking on page 180 instead of page 181. The error you are getting is page 181 and for it you need to increase the values.
The compilation scripts they provide are configured more for Linux. It is possible to edit the files without great difficulty if you are accustomed to using gcc/gfortran and Make files. You would need something like MinGW installed.
Leon
Leon 2018년 9월 6일
Unfortunately, I do not know how to use gcc/gfortran and MinGW to edit exe files, but thank you very much anyway!
Walter Roberson
Walter Roberson 2018년 9월 6일
You would edit the .h file they indicate to change those two parameters; that would require a plain text editor.
More of a nuisance is that you would need to edit the Makefile (using a text editor) to reconfigure the locations of the include files and libraries and possibly to change the names of the compilers. It is not a big deal for someone who is accustomed to using those compilation tools, but it could certainly be somewhat baffling to someone who has not used those tools before.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

태그

질문:

2018년 9월 2일

댓글:

2018년 9월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by