"CF77 directives not supported by CF90" update

Note: This article is reprinted with permission from the July 1996 Cray Research Service Bulletin. It also appeared on SCD's ConsultWeb as a "Gotcha!" Each month, ConsultWeb offers a special hint to help users avoid pitfalls in their computing environment. The August 1996 "Gotcha!" is available here.

Systems:     Cray PVP 
OS:          UNICOS 8.0 or later 
Product:     CF90, CF77 
Audience:    Programmers, end users


This is an update of the "CF77 directives not supported by CF90" article from the July 1994 Service Bulletin.

Because the CF90 Fortran compiler does not include the FMP and FPP preprocessors, you cannot use some of the CF77 compiler directives with the CF90 compiler. The CF77 developers strongly urge users to use CF77 Autotasking directives rather than microtasking directives; Table 1, at the end of this article, lists FMP microtasking directives and their equivalent Autotasking directives.

You also cannot use the CF77 FPP directives with the CF90 compiler. Table 2, at the end of this article, lists the FPP directives that have CF90 equivalents. The following FPP directives do not have equivalents and cannot be used with CF90 programs:

ALTCODE/NOALTCODE     NOLIST/LIST
ASSOC/NOASSOC         NOLSTVAL/LSTVAL 
COUNT                 PRIVATEARRAY 
DEPCHK/NODEPCH        RELATION 
DENSE                 SCHEDULE 
EQVCHK/NOEQVCHK       SEARCH
INNER/NOINNER         SKIP/NOSKIP 
ITERATIONS            SPARSE
MAXCPUS               SPLIT/NOSPLIT 
NEXPAND               SWITCH

Although no INNER compiler directive is available in CF90 2.0, a -O taskinner compile line option enables Autotasking of innermost loops.

The CF77 compiler recognizes another group of directives; you can use some of them with the CF90 compiler. Table 3, at the end of this article, lists those other directives that are supported by both compilers. The CF90 compiler does not recognize the following directives that apply to the compiler phase in CF77:

CODE/NOCODE     LIST/NOLIST
DYNAMIC         REGFILE 
EJECT           STATIC

If the program is written in fixed format (the CDIR$ or CMIC$ is in columns 1 through 5), CDIR$ (or CMIC$ for the Autotasking directives) may precede the CF90 directives. Both !DIR$ and !MIC$ preceding CF90 directives will work regardless of whether the program is in fixed or free format.

CF77 Commands and Directives, Cray Research publication SR- 3771 6.0, documents the CF77 directives; the CF90 Commands and Directive Reference Manual, Cray Research publication SR-3901 2.0, documents the CF90 directives.


Table 1. Microtasking and Autotasking equivalents

Obsolete FMP             Equivalent CF77      Equivalent CF90 
microtasking directives  Autotasking (FMP)    Autotasking
(do not use with CF90)   directives           directives

CMIC$ GUARD              CMIC$ GUARD          !MIC$ GUARD
CMIC$ END GUARD          CMIC$ END GUARD      !MIC$ END GUARD
CMIC$ DO GLOBAL          CMIC$ DO PARALLEL    !MIC$ DO PARALLEL
                         CMIC$ DOALL          !MIC$ DOALL
                         CMIC$ PARALLEL       !MIC$ PARALLEL
                         CMIC$ END PARALLEL   !MIC$ END PARALLEL
                         CMIC$ WAIT
                         CMIC$ SEND
                         CMIC$ NUMCPUS
CMIC$ PROCESS            CMIC$ CASE           !MIC$ CASE
CMIC$ ALSO PROCESS
CMIC$ END PROCESS        CMIC$ END CASE       !MIC$ END CASE
CMIC$ STOP ALL PROCESS   CMIC$ SOFT EXIT      No CF90 directive; the
                                              Fortran 90 EXIT statement
                                              provides this functionality.

Table 2. CF77 FPP directives and their CF90 equivalents

CF77 FPP directives (do not use with CF90)   Equivalent CF90 directive

CFPP$ AUTOEXPAND/NOAUTOEXPAND                !DIR$ INLINE/NOINLINE *
CFPP$ CNCALL                                 !MIC$ CNCALL
CFPP$ CONCUR/NOCONCUR                        !DIR$ TASK/NOTASK
CFPP$ EXPAND                                 !DIR$ INLINE ALWAYS *
CFPP$ PERMUTATION                            !MIC$ PERMUTATION
CFPP$ SELECT [VECTOR]                        !DIR$ PREFERVECTOR
CFPP$ SELECT CONCUR                          !DIR$ PREFERTASK
CFPP$ UNROLL/NOUNROLL                        !DIR$ UNROLL/NOUNROLL *
CFPP$ VECTOR/NOVECTOR                        !DIR$ VECTOR/NOVECTOR

* The CF90 INLINE and UNROLL directives require the use of command-line 
options.


Table 3. Other CF77 directives and their equivalents

CF77 directives                   Equivalent CF90 directives

CDIR$ ALIGN                       !DIR$ ALIGN
CDIR$ AUXILIARY                   !DIR$ AUXILIARY
CDIR$ BL/NOBL                     !DIR$ BL/NOBL
CDIR$ BOUNDS/NOBOUNDS             !DIR$ BOUNDS/NOBOUNDS
CDIR$ FLOW/NOFLOW                 !DIR$ FLOW/NOFLOW
CDIR$ INLINE/NOINLINE             !DIR$ INLINE/NOINLINE *
CDIR$ INTEGER                     !DIR$ INTEGER
CDIR$ IVDEP                       !DIR$ IVDEP
CDIR$ NEXTSCALAR                  !DIR$ NEXTSCALAR
CDIR$ NO SIDE EFFECTS             !DIR$ NO SIDE EFFECTS
CDIR$ RECURRENCE/NORECURRENCE     !DIR$ RECURRENCE/NORECURRENCE
CDIR$ SHORTLOOP                   !DIR$ SHORTLOOP
CDIR$ STACK                       !DIR$ STACK
CDIR$ SUPPRESS                    !DIR$ SUPPRESS
CDIR$ TASKCOMMON                  !DIR$ TASKCOMMON
CDIR$ VFUNCTION                   !DIR$ VFUNCTION
CDIR$ VSEARCH/NOVSEARCH           !DIR$ VSEARCH/NOVSEARCH

* The CF90 INLINE directive requires the use of command-line options.


Back to contents