- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
when i tried compiling my code with -stand f03 on, i get these warnning message
warning #7410: Fortran 2003 does not allow this keyword. [AUTOMATIC]
real(8),automatic,dimension(lorbit) :: p2,p3,p4
here lorbit is a parameter defined in another module and "use"d
warning #6477: Fortran 2003 does not allow this statement or directive.
!$OMP PARALLEL
this warnning is issued for all !$OMP declaration
So what is the wayout? specially what is the replacement for AUTOMATIC attribute?
warning #7410: Fortran 2003 does not allow this keyword. [AUTOMATIC]
real(8),automatic,dimension(lorbit) :: p2,p3,p4
here lorbit is a parameter defined in another module and "use"d
warning #6477: Fortran 2003 does not allow this statement or directive.
!$OMP PARALLEL
this warnning is issued for all !$OMP declaration
So what is the wayout? specially what is the replacement for AUTOMATIC attribute?
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For AUTOMATIC, remove that keyword and add RECURSIVE to the routine. When you're using OpenMP this is the default anyway.
We decided that directives were the equivalent of statements and issue standards warnings for them.
We decided that directives were the equivalent of statements and issue standards warnings for them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
For AUTOMATIC, remove that keyword and add RECURSIVE to the routine. When you're using OpenMP this is the default anyway.
We decided that directives were the equivalent of statements and issue standards warnings for them.
We decided that directives were the equivalent of statements and issue standards warnings for them.
is the way you suggest are supposed to have same effect or i SHOULD check? and there is one automatic in main routine. what to do with that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RECURSIVE will make all local variables automatic (except for those with initialization or SAVE.
The AUTOMATIC in the main routine could just be removed.
The AUTOMATIC in the main routine could just be removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
RECURSIVE will make all local variables automatic (except for those with initialization or SAVE.
The AUTOMATIC in the main routine could just be removed.
The AUTOMATIC in the main routine could just be removed.
! use automatic to place on stack
! otherwise may get placed in static storage (SAVE)
! depending on compile time options
I am just using the commadline argument ifort -c -O3 -static -openmp -stand f03
hope this will not affect!right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Since you are watching, one more idiotic question:
f03 standard seems not to accept generic function like dabs/dfloat etc.
do it take the precision depending upon the precision of the result?i.eif i say,
xx=float(yy)
so float will be as precision declared for xx or what?
Since you are watching, one more idiotic question:
f03 standard seems not to accept generic function like dabs/dfloat etc.
do it take the precision depending upon the precision of the result?i.eif i say,
xx=float(yy)
so float will be as precision declared for xx or what?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - roddur
few days ago Jim Dempsey was kind enough to comment on the code that:
! use automatic to place on stack
! otherwise may get placed in static storage (SAVE)
! depending on compile time options
I am just using the commadline argument ifort -c -O3 -static -openmp -stand f03
! use automatic to place on stack
! otherwise may get placed in static storage (SAVE)
! depending on compile time options
I am just using the commadline argument ifort -c -O3 -static -openmp -stand f03
ifort doesn't default to SAVE status for scalars unless you request it specifically. Default SAVE status for arrays can be prevented by taking Steve's advice. As you and Steve said, -openmp on the compile command line also avoids any default SAVE problems.
-static refers to library linkage. It has been years since I saw a compiler where it referred to default SAVE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tim18
Jim Dempsey nearly always gives good advice. This is one point where I would advise you to take Steve Lionel's advice.
ifort doesn't default to SAVE status for scalars unless you request it specifically. Default SAVE status for arrays can be prevented by taking Steve's advice. As you and Steve said, -openmp on the compile command line also avoids any default SAVE problems.
-static refers to library linkage. It has been years since I saw a compiler where it referred to default SAVE.
ifort doesn't default to SAVE status for scalars unless you request it specifically. Default SAVE status for arrays can be prevented by taking Steve's advice. As you and Steve said, -openmp on the compile command line also avoids any default SAVE problems.
-static refers to library linkage. It has been years since I saw a compiler where it referred to default SAVE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - roddur
Dear Steve,
Since you are watching, one more idiotic question:
f03 standard seems not to accept generic function like dabs/dfloat etc.
do it take the precision depending upon the precision of the result?i.eif i say,
xx=float(yy)
so float will be as precision declared for xx or what?
Since you are watching, one more idiotic question:
f03 standard seems not to accept generic function like dabs/dfloat etc.
do it take the precision depending upon the precision of the result?i.eif i say,
xx=float(yy)
so float will be as precision declared for xx or what?
I recommend using generics. In the case of ABS, if you say xx=ABS(yy), the result will be the kind of yy, so if yy is a double, ABS(yy) will be double.
The standard way of saying DFLOAT is DBLE. You can also say REAL(yy,kind=KIND(0.0D0)).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page