I am come from modern Fortran with nuclear quantum Monte Carlo (QMC) applications, which, seems many codes are written in modern Fortran.
For example, some codes such as Green’s Function Monte Carlo (GFMC) for Carbon 12 needs 10^8 core hours in MIRA. Path Integral QMC (PIMC) can requires more.
I know Julia is aiming at high performance computing, which in my shallow opinion, means that it should be MPI ready, and it should support MPI just as good as Fortran does.
So I wanted to ask,
-
Are there any Julia + MPI projects on Supercomputer?
If so, is there some open source code that available on Github or Gitlab or somewhere? -
Is MPI on Julia mature enough?
I mean is it easy enough to use MPI with Julia?
Is there some good packages or something?
To be specific, eg, a small piece of my Fortran MPI wrapper,
module mympi
implicit none
include 'mpif.h'
integer, private, parameter :: i4=selected_int_kind(9)
integer, private, parameter :: i8=selected_int_kind(15)
integer, private, parameter :: r8=selected_real_kind(15,9)
integer, private, save :: mpii4,mpii8,mpir8
integer(kind=i4), private, save :: irank,iproc
interface bcast ! broadcast from process 0
module procedure bcastirn
module procedure bcasti1,bcasti1d,bcasti2d,bcasti3d,bcasti4d
module procedure bcastr1,bcastr1d,bcastr2d,bcastr3d,bcastr4d
module procedure bcastlogi
module procedure bcastchar
end interface bcast
subroutine bcastlogi(i)
logical :: i
integer :: ierror
call mpi_bcast(i,1,mpi_logical,0,mpi_comm_world,ierror)
return
end subroutine bcastlogi
subroutine bcastirn(i)
integer(kind=i8) :: i
integer :: ierror
call mpi_bcast(i,1,mpii8,0,mpi_comm_world,ierror)
return
end subroutine bcastirn
subroutine bcasti1(i)
integer(kind=i4) :: i
integer :: ierror
call mpi_bcast(i,1,mpii4,0,mpi_comm_world,ierror)
return
end subroutine bcasti1
subroutine bcasti1d(i)
integer(kind=i4) :: i(:)
integer :: ierror
call mpi_bcast(i,size(i),mpii4,0,mpi_comm_world,ierror)
return
end subroutine bcasti1d
subroutine bcasti2d(i)
integer(kind=i4) :: i(:,:)
integer :: ierror
call mpi_bcast(i,size(i),mpii4,0,mpi_comm_world,ierror)
return
end subroutine bcasti2d
subroutine bcasti3d(i)
integer(kind=i4) :: i(:,:,:)
integer :: ierror
call mpi_bcast(i,size(i),mpii4,0,mpi_comm_world,ierror)
return
end subroutine bcasti3d
subroutine bcasti4d(i)
integer(kind=i4) :: i(:,:,:,:)
integer :: ierror
call mpi_bcast(i,size(i),mpii4,0,mpi_comm_world,ierror)
return
end subroutine bcasti4d
subroutine bcastr1d(r)
real(kind=r8) :: r(:)
integer :: ierror
call mpi_bcast(r,size(r),mpir8,0,mpi_comm_world,ierror)
return
end subroutine bcastr1d
subroutine bcastr2d(r)
real(kind=r8) :: r(:,:)
integer :: ierror
call mpi_bcast(r,size(r),mpir8,0,mpi_comm_world,ierror)
return
end subroutine bcastr2d
subroutine bcastr3d(r)
real(kind=r8) :: r(:,:,:)
integer :: ierror
call mpi_bcast(r,size(r),mpir8,0,mpi_comm_world,ierror)
end subroutine bcastr3d
subroutine bcastr4d(r)
real(kind=r8) :: r(:,:,:,:)
integer :: ierror
call mpi_bcast(r,size(r),mpir8,0,mpi_comm_world,ierror)
end subroutine bcastr4d
subroutine bcastr1(r)
real(kind=r8) :: r
integer :: ierror
call mpi_bcast(r,1,mpir8,0,mpi_comm_world,ierror)
end subroutine bcastr1
subroutine bcastchar(w)
integer(kind=i4) :: ierror
character(len=*) :: w
call mpi_bcast(w,len(w),mpi_character,0,mpi_comm_world,ierror)
return
end subroutine bcastchar
end
in this wrapper, I can easy use MPI without everytime input many arguments on MPI functions such as
call mpi_bcast(i,size(i),mpii4,0,mpi_comm_world,ierror)
I just need to do
call bcast(xxxx)
Is it easy to write such kind of wrapper in Julia, or is there such wrapper already in Julia?
Thanks in advance!