mpi_io test…

test 01

nrecl4 = 4*nze*(iend-ista+1)

call open_file (myrank+10, ‘test01_’//rank, nrecl4)
write (unit=myrank+10, rec=1) vp4(1:nze,ista:iend)
close (unit=myrank+10)

test 02

nrecl = nze*(iend-ista+1)

call mpi_file_open (mpi_comm_self, ‘test02_’//rank, mpi_mode_wronly+mpi_mode_create, mpi_info_null, myfile, ierr)
call mpi_file_write (myfile, vp4, nrecl, mpi_real, mpi_status_ignore, ierr)
call mpi_file_close (myfile, ierr)

test 03

nrecl = nze*(iend-ista+1)
disp = 4*nrecl*myrank

call mpi_file_open (mpi_comm_world, ‘test03_all’, mpi_mode_wronly+mpi_mode_create, mpi_info_null, myfile, ierr)
call mpi_file_set_view (myfile, disp, mpi_real, mpi_real, ‘native’, mpi_info_null, ierr)
call mpi_file_write (myfile, vp4, nrecl, mpi_real, mpi_status_ignore, ierr)
call mpi_file_close (myfile, ierr)

오랫만에 병렬프로그래밍이라 기억이 가물가물.

domain decomposition한 이후 병렬io를 이용하여 파일 작성.
테스트 01은 병렬io상관없는 코드, 테스트 02는 병렬io랑 상관은 있으나 테스트 01과 별다를바 없음.
테스트 03이야 말로 병렬io의 진수(??)를 보여주는… 글적글적. 여튼 그렇다는 이야기.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s