standard output in Fortran MPI code

前端 未结 3 1523
Happy的楠姐
Happy的楠姐 2021-01-19 03:28

I have a parallel fortran code in which I want only the rank=0 process to be able to write to stdout, but I don\'t want to have to litter the code with:

if(r         


        
3条回答
  •  清酒与你
    2021-01-19 03:54

    I am not so concerned with the two disadvantages mentioned by steabert. We can work that out by introducing another file descriptor that clearly indicates that it is stdout only on master process, e.g. stdout -> stdout0.

    But my concern is here: The /dev/null will work in UNIX-like environment. Will it work on Windows environment? How about the funky BlueGene systems?

提交回复
热议问题