Commit bdaaa67b authored by Francois Tessier's avatar Francois Tessier

Bug fix on fortran code

parent 007a94c7
......@@ -2,30 +2,30 @@
PROGRAM main
use mpi
integer ierr, i, myrank, BUFSIZE, filehandle
character(*), parameter :: filepath = "/projects/visualization/ftessier/debug/"
integer ierr, i, myrank, mysize, BUFSIZE, filehandle
parameter (BUFSIZE=100)
integer buf(BUFSIZE)
integer(kind=MPI_OFFSET_KIND) disp
call MPI_INIT(ierr)
call MPI_COMM_RANK(MPI_COMM_WORLD, myrank, ierr)
call MPI_COMM_SIZE(MPI_COMM_WORLD, mysize, ierr)
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
do i = 0, BUFSIZE
buf(i) = myrank * BUFSIZE + i
enddo
! filepath//"f90_HACC.dat"
call MPI_FILE_OPEN(MPI_COMM_WORLD, "f90HACC", &
call MPI_FILE_OPEN(MPI_COMM_WORLD, '/projects/visualization/ftessier/debug/f90_HACC.dat', &
MPI_MODE_WRONLY + MPI_MODE_CREATE, &
MPI_INFO_NULL, filehandle, ierr)
disp = myrank * BUFSIZE * 4
call MPI_FILE_WRITE_AT(filehandle, disp, buf, BUFSIZE, MPI_INTEGER, &
call MPI_FILE_WRITE_AT_ALL(filehandle, disp, buf, BUFSIZE, MPI_INTEGER, &
MPI_STATUS_IGNORE, ierr)
call MPI_BARRIER(MPI_COMM_WORLD, ierr)
call MPI_FILE_CLOSE(filehandle, ierr)
call MPI_FINALIZE(ierr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment