wyoui
07-19-2012, 04:42 PM
Hi everyone,
That's my first post here. I am French, so please, excuse my bad accent.
First, thanks to the NR authors and to all of you who are answering questions so precisely. It has been like 5 years that I am reading the forum from time to time and it is actually the first time I did not find a precise answer to my question.
Here is my issue: I have to create a very large vector (size >2GB), and do its FFT. I use the NR program "realft" and allocate the memory of the vector with "vector" from "nrutil". The program is in C.
I am using DEV-C++ as a compiler, or visual studio 2012. I am running on windows 7 64 bits and have 16 GB of RAM.
With both compilers, I can create a vector of 2^28 floats, i.e. about 1 GB. However, I cannot create a vector of more than 2 GB in size (2^29 floats). I get the following error message: "Numerical Recipes run time error... Allocation failure in vector()"
I assumed that it's because my compilers are both 32 bits.
Am I correct? If yes, will the issue be solved with a 64 bits compiler? Or can I modify the "nrutil" function to overcome this limit (using __int64 instead of long for the dimensions)?
Well, to summarize: does anyone have a solution/explanation for me?
Thanks a lot in advance for your help.
That's my first post here. I am French, so please, excuse my bad accent.
First, thanks to the NR authors and to all of you who are answering questions so precisely. It has been like 5 years that I am reading the forum from time to time and it is actually the first time I did not find a precise answer to my question.
Here is my issue: I have to create a very large vector (size >2GB), and do its FFT. I use the NR program "realft" and allocate the memory of the vector with "vector" from "nrutil". The program is in C.
I am using DEV-C++ as a compiler, or visual studio 2012. I am running on windows 7 64 bits and have 16 GB of RAM.
With both compilers, I can create a vector of 2^28 floats, i.e. about 1 GB. However, I cannot create a vector of more than 2 GB in size (2^29 floats). I get the following error message: "Numerical Recipes run time error... Allocation failure in vector()"
I assumed that it's because my compilers are both 32 bits.
Am I correct? If yes, will the issue be solved with a 64 bits compiler? Or can I modify the "nrutil" function to overcome this limit (using __int64 instead of long for the dimensions)?
Well, to summarize: does anyone have a solution/explanation for me?
Thanks a lot in advance for your help.