- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get these errors after compile it with ifort or gfortran:
with ifort
[mosaddeghi@localhost Desktop]$ ifort gfor.f
/opt/intel/Compiler/11.1/064/lib/ia32/for_main.o: In function `main':
/export/users/nbtester/x86linux_nightly/branch-11_1/20091202_010000/libdev/frtl/src/libfor/for_main.c:(.text+0x4d): undefined reference to `MAIN__'
---------------------------------------------------------------------
with gfortran
[mosaddeghi@localhost Desktop]$ gfortran gfor.f
gfor.f:681.50:
dimension aaa(nmax*nmax),bbb(nmax*nmax),bbi(bmax)
1
Error: Expression at (1) must be of INTEGER type, found REAL
gfor.f:681.50:
dimension aaa(nmax*nmax),bbb(nmax*nmax),bbi(bmax)
1
Error: Expression at (1) must be of INTEGER type, found REAL
----------------------------------------------
please help to me for solve it.
Best!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use the option -stand f95, for example, among other messages you get
[bash]gfor.f(681): warning #6187: Fortran 95 requires an INTEGER data type in this context. dimension aaa(nmax*nmax),bbb(nmax*nmax),bbi(bmax) --------------------------------------------------^[/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The gfortran errors appear related to the implicit real statement at line 676 and thevariable name "bmax"used in line 681. If you rename "bmax" to "ibmax" in lines 680-681 the code compiles with gfortran.
676 implicit real*8(a-h,o-z)
677 c
678 c maximum matrix (mbig*mbig) to invert
679
680 parameter (mbig =100, bmax = mbig*(mbig+1)/2)
681 dimension aaa(nmax*nmax),bbb(nmax*nmax),bbi(bmax)
It appears the specification expression for the array is supposed to be of type integer, so ifort may have missed flagging this like gfortran has. I'll have to lean on those who are more knowledgeable about the Fortran standard to chime in about that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use the option -stand f95, for example, among other messages you get
[bash]gfor.f(681): warning #6187: Fortran 95 requires an INTEGER data type in this context. dimension aaa(nmax*nmax),bbb(nmax*nmax),bbi(bmax) --------------------------------------------------^[/bash]

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