gutmann / coarray_icar

Testing implementation of CoArrays for the basic ICAR algorithms
MIT License
5 stars 6 forks source link

Cray compiler error with src/tests/test-initialization.f90 #8

Closed bcfriesen closed 7 years ago

bcfriesen commented 7 years ago

Good afternoon,

I'm trying to compile the latest version of the master branch with the Cray compiler CCE v8.5.4. I used the CMake command:

cmake -DCMAKE_Fortran_FLAGS="-e T" ..

(The -e T flag tells CCE to run the pre-processor on all files, not just those with capital .F90 suffixes.)

The compiler fails on test-initialization.f90 with this error:


cd /global/homes/f/friesen/coarrays/coarray_icar/build/src/tests && /opt/cray/pe/craype/2.5.7/bin/ftn  -I/global/homes/f/friesen/coarrays/coarray_icar/src -I/global/homes/f/friesen/coarrays/coarray_icar/build/mod  -e T -em -J.   -c /global/homes/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90 -o CMakeFiles/initialization-test.dir/test-initialization.f90.o

ftn-942 crayftn: ERROR block, File = ../../../global/u2/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90, Line = 10, Column = 23
  Object "DOMAIN" is a type with a coarray ultimate component, so it must be a dummy argument or have the ALLOCATABLE or SAVE attribute.

ftn-942 crayftn: ERROR block, File = ../../../global/u2/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90, Line = 16, Column = 23
  Object "DOMAIN" is a type with a coarray ultimate component, so it must be a dummy argument or have the ALLOCATABLE or SAVE attribute.

Cray Fortran : Version 8.5.4 (20160920191524_bfcbad9dba1deb728a485dee62483f6acb821568)
Cray Fortran : Mon Jul 24, 2017  17:38:21
Cray Fortran : Compile time:  0.0120 seconds
Cray Fortran : 28 source lines
Cray Fortran : 2 errors, 0 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each message.```
gutmann commented 7 years ago

Sorry, Damian should have mentioned which code to use. Take the develop branch and just use the makefile in src/tests/ then run cafrun test-ideal. This is all VERY experimental still but I think the parallel scaling characteristics are correct.

We kept having issues with cmake and haven't used it for a while now.

On Jul 24, 2017, at 6:42 PM, Brian Friesen notifications@github.com wrote:

Good afternoon,

I'm trying to compile the latest version of the master branch with the Cray compiler CCE v8.5.4. I used the CMake command:

cmake -DCMAKE_Fortran_FLAGS="-e T" ..

(The -e T flag tells CCE to run the pre-processor on all files, not just those with capital .F90 suffixes.)

The compiler fails on test-initialization.f90 with this error:

cd /global/homes/f/friesen/coarrays/coarray_icar/build/src/tests && /opt/cray/pe/craype/2.5.7/bin/ftn -I/global/homes/f/friesen/coarrays/coarray_icar/src -I/global/homes/f/friesen/coarrays/coarray_icar/build/mod -e T -em -J. -c /global/homes/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90 -o CMakeFiles/initialization-test.dir/test-initialization.f90.o

ftn-942 crayftn: ERROR block, File = ../../../global/u2/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90, Line = 10, Column = 23 Object "DOMAIN" is a type with a coarray ultimate component, so it must be a dummy argument or have the ALLOCATABLE or SAVE attribute.

ftn-942 crayftn: ERROR block, File = ../../../global/u2/f/friesen/coarrays/coarray_icar/src/tests/test-initialization.f90, Line = 16, Column = 23 Object "DOMAIN" is a type with a coarray ultimate component, so it must be a dummy argument or have the ALLOCATABLE or SAVE attribute.

Cray Fortran : Version 8.5.4 (20160920191524_bfcbad9dba1deb728a485dee62483f6acb821568) Cray Fortran : Mon Jul 24, 2017 17:38:21 Cray Fortran : Compile time: 0.0120 seconds Cray Fortran : 28 source lines Cray Fortran : 2 errors, 0 warnings, 0 other messages, 0 ansi Cray Fortran : "explain ftn-message number" gives more information about each message.``` — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

gutmann commented 7 years ago

Also, I shouldn't have focused on the cmake part.

I'm not sure if that error makes sense. Damian @rouson would know the standard better than I, but I didn't think an object with a coarray inside would have to be allocatable itself... you can try adding the save (or allocatable) attribute. We don't allocate domain, though we probably could if it is required. I'd like to know what the standard says though. I don't have access to a system with a cray compiler to test.

rouson commented 7 years ago

@bcfriesen Thanks for testing this so fast and for submitting the issue! I just submitted pull request #9 to fix this issue and to add an option to src/tests/Makefile to build with Cray compiler. For your convenience, Cray is the default. I tested this in an interactive queue on a Cray XC40 by executing with aprun -n8 ./test-ideal. The code now compiles without error and the execution gets far enough that I believe it's working correctly, but the interactive queue timed out before the run completed.

gutmann commented 7 years ago

9 fixes, thanks Damian.