Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

coarray mpd error

$
0
0

The hello work coarray code

  1 program Hello_World
  2 implicit none
  3 integer :: i  ! Local variable
  4 character(len=20) :: name[*] ! scalar coarray, one "name" for each image.
  5 ! Note: "name" is the local variable while "name[<index>]" accesses the
  6 ! variable in a specific image; "name[this_image()]" is the same as "name".
  7
  8 ! Interact with the user on Image 1; execution for all others pass by.
  9 if (this_image() == 1) then
 10 write(*,'(a)',advance='no') 'Enter your name: '
 11 read(*,'(a)') name
 12
 13 ! Distribute information to other images
 14 do i = 2, num_images()
 15 name[i] = name
 16 end do
 17 end if
 18
 19 sync all ! Barrier to make sure the data have arrived.
 20
 21 ! I/O from all images, executing in any order, but each record written is intact.
 22 write(*,'(3a,i0)') 'Hello ',trim(name),' from image ', this_image()
 23 end program Hello_world

 

ifort -coarray hello.f90 -o hello
./hello
  File "/opt/intel/composerxe/mpirt/bin/intel64/mpd", line 1545
    except Exception, errmsg:
                    ^
SyntaxError: invalid syntax
  File "/opt/intel/composerxe/mpirt/bin/intel64/mpdallexit", line 99
    print __doc__
                ^
SyntaxError: invalid syntax

ifort -v
ifort version 14.0.2

python --version
Python 3.4.1

How to solve the mpd error?


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>