- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear,
I'm struggling in finding the correct options to compiple a fortran program.
with f77 I normally use
f77 -fno-automatic refit_IRMM_06c.f -o refit_IRMM_06c
with ifort I tried
ifc -automatic refit_IRMM_06c.f -o refit_IRMM_06c
ifc -noautomatic refit_IRMM_06c.f -o refit_IRMM_06c
without success. The program is compiled qnd the executable created but something is wrong.
I got the following warnings:
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F1]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F2]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
.......................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F3]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
..............................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F4]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
.....................................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F5]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
............................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F6]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F7]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...........................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F8]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F9]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...........................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F10]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
..................................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F11]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F12]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..........................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F13]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F14]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..........................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F15]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................................................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C1]
3 C1(40), C2(40),C3(2)
...................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C2]
3 C1(40), C2(40),C3(2)
...........................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C3]
3 C1(40), C2(40),C3(2)
Thanks for the help,
I'm struggling in finding the correct options to compiple a fortran program.
with f77 I normally use
f77 -fno-automatic refit_IRMM_06c.f -o refit_IRMM_06c
with ifort I tried
ifc -automatic refit_IRMM_06c.f -o refit_IRMM_06c
ifc -noautomatic refit_IRMM_06c.f -o refit_IRMM_06c
without success. The program is compiled qnd the executable created but something is wrong.
I got the following warnings:
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F1]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F2]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
.......................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F3]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
..............................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F4]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
.....................................^
fortcom: Info: refit_IRMM_06c.f, line 251: Symbol in BLOCK DATA program unit is not in a COMMON block. [F5]
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
............................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F6]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F7]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...........................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F8]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F9]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
...........................................^
fortcom: Info: refit_IRMM_06c.f, line 252: Symbol in BLOCK DATA program unit is not in a COMMON block. [F10]
1 F6(60), F7(60), F8(60), F9(60),F10(60),
..................................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F11]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F12]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..........................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F13]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F14]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..........................................^
fortcom: Info: refit_IRMM_06c.f, line 253: Symbol in BLOCK DATA program unit is not in a COMMON block. [F15]
2 F11(60),F12(60),F13(60),F14(60),F15(3),
..................................................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C1]
3 C1(40), C2(40),C3(2)
...................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C2]
3 C1(40), C2(40),C3(2)
...........................^
fortcom: Info: refit_IRMM_06c.f, line 254: Symbol in BLOCK DATA program unit is not in a COMMON block. [C3]
3 C1(40), C2(40),C3(2)
Thanks for the help,
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you can see, Intel Fortran doesn't allow BLOCK DATA to do anything beyond standard Fortran there. I don't believe there's an option to change that. If you were using an f77 compiler, meaning in accordance with the Fortran 77 standard, you would not have been able to do that.
If your -fno-automatic has the meaning which it does for g77, the corresponding ifort option would be -save.
If your -fno-automatic has the meaning which it does for g77, the corresponding ifort option would be -save.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Indeed the part of the code where I have the problem is:
BLOCK DATA
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
C
INCLUDE 'cino1.ref'
INCLUDE 'acino1.ref'
INCLUDE 'fairy.ref'
INCLUDE 'prisel.ref'
C
C TABLES FOR SAMPLE THICKNESS CORRECTION IN SLAB GEOMETRY
C FOR FIA(J,I),J=1,3,I=1,281 6 NUMBERS PER LINE
C AND CA(J,I),J=1,2,I=1,41 4 NUMBERS PER LINE
C
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
1 F6(60), F7(60), F8(60), F9(60),F10(60),
2 F11(60),F12(60),F13(60),F14(60),F15(3),
3 C1(40), C2(40),C3(2)
DIMENSION FIA1(843),CA1(82)
EQUIVALENCE(FIA1(1),F1(1)),(FIA1(61),F2(1))
I never had problem with f77 both under linux and sun.
So I guess the code is ok.
Thanks,
BLOCK DATA
C
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
C
INCLUDE 'cino1.ref'
INCLUDE 'acino1.ref'
INCLUDE 'fairy.ref'
INCLUDE 'prisel.ref'
C
C TABLES FOR SAMPLE THICKNESS CORRECTION IN SLAB GEOMETRY
C FOR FIA(J,I),J=1,3,I=1,281 6 NUMBERS PER LINE
C AND CA(J,I),J=1,2,I=1,41 4 NUMBERS PER LINE
C
DIMENSION F1(60),F2(60),F3(60),F4(60),F5(60),
1 F6(60), F7(60), F8(60), F9(60),F10(60),
2 F11(60),F12(60),F13(60),F14(60),F15(3),
3 C1(40), C2(40),C3(2)
DIMENSION FIA1(843),CA1(82)
EQUIVALENCE(FIA1(1),F1(1)),(FIA1(61),F2(1))
I never had problem with f77 both under linux and sun.
So I guess the code is ok.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I managed to make it work like this
ifc -O2 -save -nowarn refit_IRMM_06c.f -o refit_IRMM_06c
but I don't understand why suppressing the warning it's ok.
Can anybody explain it to me?
ifc -O2 -save -nowarn refit_IRMM_06c.f -o refit_IRMM_06c
but I don't understand why suppressing the warning it's ok.
Can anybody explain it to me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not legal Fortran to declare variables in a BLOCK DATA subprogram that are not part of a COMMON block. Evidently, your code does so (without seeing the INCLUDE files, I can't tell for sure.) The compiler correctly warns you about this programming error, but otherwise lets it go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I see. But I don't understand is why if I put the -nowarn options everyhing runs smooth.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program would "run smooth" in either case. -nowarn turned off the compiler warnings which you were seeing before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you aeright. I don't know what i was doing anymore.
sorry for troubling.
Gino

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