I have a fortran program has some command line parameters.
I want to use Mathematica’s Run
function to realize simple parallelization to loop over a set of command line paramters.
What is more, there is a system size parameter L
in my fortran program. With larger L
, more memory needed.
I first done test with L=100
, the mathematica script run.m
is simply
Run["./a.out",0,0,0,0,0,0,0]
and math -script run.m
works great.
However, if I change L=300
in fortran and recompile. math -script run.m
got errors like
[q@i02n18 no_v]$ math -script run.m getting sparse matrix ... getting dos by chebyshev ... forrtl: severe (174): SIGSEGV, segmentation fault occurred Image PC Routine Line Source a.out 00000000004D70E1 Unknown Unknown Unknown a.out 00000000004D521B Unknown Unknown Unknown a.out 0000000000479AB4 Unknown Unknown Unknown a.out 00000000004798C6 Unknown Unknown Unknown a.out 0000000000436029 Unknown Unknown Unknown a.out 0000000000439C16 Unknown Unknown Unknown libpthread-2.17.s 00002AC56B1F0370 Unknown Unknown Unknown a.out 00000000004166F0 chebyshev_ldos_ 78 module_chebyshev.f90 a.out 00000000004127D6 twoband_ 118 model_twoband.f90 a.out 0000000000411228 MAIN__ 39 main.f90 a.out 0000000000403BDE Unknown Unknown Unknown libc-2.17.so 00002AC56B720B35 __libc_start_main Unknown Unknown a.out 0000000000403AE9 Unknown Unknown Unknown
As we can see, it did start calculation because it print two lines of message, but then subject to “segmentation fault occurred”
However, at the time, if I run ./a.out 0 0 0 0 0 0 0
, it works, and if I look at the memory usage, it is quite small as 145MB. So it probably not due to memory issue maybe?
Is anybody know whether there is some implicit limit of Run
function?