Skip to content

Instantly share code, notes, and snippets.

@wesbarnett
Created May 22, 2014 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesbarnett/c60ced3ec2d01fdc860d to your computer and use it in GitHub Desktop.
Save wesbarnett/c60ced3ec2d01fdc860d to your computer and use it in GitHub Desktop.
program main
implicit none
integer, parameter :: max_greeting_length=30
character(len=max_greeting_length), allocatable :: greeting[:]
integer :: IMAGE
allocate(greeting[*])
write(greeting,"(2(a,i2))") "Hello from image ", this_image()," of ",num_images()
sync all
if (this_image()==1) then
do concurrent (IMAGE=1:num_images())
print *,greeting[IMAGE]
end do
end if
end program main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment