Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Coarray tutotial example for Windows

Albert_Stone
Beginner
359 Views

Hello,

I have followed a Coarray Tutorial using the Intel® Parallel Studio XE 2017.

program hello_image

        write(*,*)  "Hello from image ",  this_image(), &
              "out of ", num_images()," total images!"

end program hello_image

But the output shows:

 Hello from image            1 out of            1  total images!
Press any key to continue . . .

...although my Windows 10 PC has 2 cores, not 1 (see below) and that is what I have indicated at 
Configuration Properties > Fortran > Language > Coarray Images (set to 2).

Name=Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
NumberOfCores=2
NumberOfEnabledCore=2
NumberOfLogicalProcessors=4

Thanks for help.

0 Kudos
4 Replies
Kevin_D_Intel
Employee
359 Views

You will see that result when the Configuration Properties > Fortran > Language > Enable Coarrays is set to No. You might double check this setting. This must be set to Yes. (It is in the tutorial version from https://software.intel.com/en-us/product-code-samples).

I have a system with a CPU very close to yours and I see 4 images by default when following the tutorial steps and then 2 when setting Configuration Properties > Fortran > Language > Coarray Images as per the later steps of the tutorial.

0 Kudos
Steven_L_Intel1
Employee
359 Views

By the way, we will soon be replacing this "tutorial" with one that actually uses coarrays.

0 Kudos
Albert_Stone
Beginner
359 Views

Thanks, it was my bad. I did not use the supplied project sample, but rather created one using the same example code. And I  just realized that I updated the properties of the Release Configuration, but ran the program in Debug mode :) Works as expected now. Regards.

 

0 Kudos
Kevin_D_Intel
Employee
359 Views

Ok, good to hear its working. I've done that very thing with properties countless times myself.

0 Kudos
Reply