Created
May 22, 2014 14:04
-
-
Save wesbarnett/c60ced3ec2d01fdc860d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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