Benchmarking a simple PDE algorithm in Julia, Python, Matlab, C++, and Fortran

Tried it, but it didn’t work. After compiling and running with ulimit -s unlimited and Nx=8192, the stack trace in gdb is

gibson@sophist$ gdb ksbenchmark-f90 
...
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaadc9153 in dfftw_execute_ () from /usr/lib64/libfftw3.so.3
(gdb) where
#0  0x00002aaaaadc9153 in dfftw_execute_ () from /usr/lib64/libfftw3.so.3
#1  0x00000000004010b0 in ksintegrate (nt=3200, 
    u=<error reading variable: value requires 131072 bytes, which is more than max-value-size>) at ksbenchmark.f90:118
#2  0x00000000004018bb in MAIN__ () at ksbenchmark.f90:55
(gdb) 

Clearly a memory error. I guess an Nx=8192 complex double-precision array totals 8192 * 2 * 8 = 131072 bytes. I suppose I’ll try to understand max-value-size in Fortran.

I did revise the Fortran code to use heap-allocated arrays but got the same error --which is hard to understand. I’ll double-check that and post the revised code.