简体   繁体   中英

Ways to pass few huge arrays to an Fortran executable as command line arguments

I am trying to run my program from a parent program by getting a few big arrays (~ 5 to 6 real*8 arrays of size 15 Million) as inputs and using the function execute_command_line() in Fortran. Making my program a subroutine to the parent program is not an option as my program is MPI based while the parent program is purely sequential and cannot be ported to MPI for now.

I tried writing the arrays as binary files and reading them in my program but I am facing serious memory constraints and performance hits. I am looking for other options and was wondering if passing arrays as command line arguments is an option for such huge arrays and if so how to do it. Any help would be appreciated.

Thank You

If your program is running on Linux, try to use a named pipe to avoid IO.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM