由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - MPI Write?
相关主题
a question about mpi-fortranFortran code optimization
关于文件输出,请教大家?[转载] 问一个fortran的问题
problem about Fortran 77 in unixFotran77程序的移植问题
请教一个程序调用问题(FORTRAN DLL),谢谢!Problems about Mex-file to call Fortran
Fortran里面哪个函数显示系统时间?fortran的random number 相关的函数lib是啥?
help on interface for Matlab and Fortran再问个Fortran得问题
Re: fortran subroutine and function发现一个有趣的事情,关于fortran IMSL library
偶也问一fortran问题请教fortran debuger
相关话题的讨论汇总
话题: mpi话题: write话题: so话题: filename话题: processor
进入Computation版参与讨论
1 (共1页)
s*****l
发帖数: 167
1
I have a simple MPI-Fortran 90 program and I want each individual
to write data to a different file: so I am expecting:
processor 1 to pos001.dat
processor 2 to pos002.dat
... ...
So I convert the rank to a string by subroutine 'num2str' then
put it in the filename. But strangely I always have some files missing.
I might have all the file pos001.dat to pos020.dat except pos003.dat
Can anyone tell me what is wrong. Is there a better way to deal with
situation?
r*y
发帖数: 706
2
I just begin to learn some MPI. First, I feel that MPI is not the best for what you want to do. I used a codine system , which might be closer to what you want. 2ndly, you have to post yr function, so others can comment on it.
踨ay

【在 s*****l 的大作中提到】
: I have a simple MPI-Fortran 90 program and I want each individual
: to write data to a different file: so I am expecting:
: processor 1 to pos001.dat
: processor 2 to pos002.dat
: ... ...
: So I convert the rank to a string by subroutine 'num2str' then
: put it in the filename. But strangely I always have some files missing.
: I might have all the file pos001.dat to pos020.dat except pos003.dat
: Can anyone tell me what is wrong. Is there a better way to deal with
: situation?

p******o
发帖数: 216
3
I just do like this:
call mpi_comm_rank(..., proc_id, ...)
filename = "data"//achar(proc_id + 48)
open(..., file = filename, ...)
...
it works for me. don't know if there's other better way. :)

【在 s*****l 的大作中提到】
: I have a simple MPI-Fortran 90 program and I want each individual
: to write data to a different file: so I am expecting:
: processor 1 to pos001.dat
: processor 2 to pos002.dat
: ... ...
: So I convert the rank to a string by subroutine 'num2str' then
: put it in the filename. But strangely I always have some files missing.
: I might have all the file pos001.dat to pos020.dat except pos003.dat
: Can anyone tell me what is wrong. Is there a better way to deal with
: situation?

1 (共1页)
进入Computation版参与讨论
相关主题
请教fortran debugerFortran里面哪个函数显示系统时间?
问个fortran和python编程的问题help on interface for Matlab and Fortran
Fortran里面子程序用END和END SUBROUTINE结尾有什么区别?Re: fortran subroutine and function
g77与f90结合的问题偶也问一fortran问题
a question about mpi-fortranFortran code optimization
关于文件输出,请教大家?[转载] 问一个fortran的问题
problem about Fortran 77 in unixFotran77程序的移植问题
请教一个程序调用问题(FORTRAN DLL),谢谢!Problems about Mex-file to call Fortran
相关话题的讨论汇总
话题: mpi话题: write话题: so话题: filename话题: processor