- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am a user of Snow Leopard 10.6.1, Xcode 3.2,Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20090827 Package ID: m_cprof_p_11.1.067.
I am trying to compile one program for physical calculations and I met the problem. The structure of my Program the following: folder "src" -> "unix" (*.f), "module"(*.f), "include"(*.h)
Following the instruction (which is really very poor), firstly I've compiled all files in /src/module with success. It was created the files *.mod and *.o in the folder "module". Then I should compile all files in src/unix (it works) and /src and here I have the problem:
This is example when I start from the first fileaamain.f(I attached it):
ifort -c aamain.f
aamain.f(2): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [BEAMCM]
USE BEAMCM
------------^
aamain.f(3): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [BBCOM]
USE BBCOM
------------^
aamain.f(4): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [LASRDATA]
USE LASRDATA
------------^
include/lasrcm.h(4): error #6756: A COMMON block data object must not be an automatic object. [LRLSR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
--------------^
include/lasrcm.h(4): error #6591: An automatic object is invalid in a main program. [LRLSR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
--------------^
include/lasrcm.h(4): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association [MLSR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
--------------------^
include/lasrcm.h(4): error #6756: A COMMON block data object must not be an automatic object. [LTRLSR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
--------------------------^
include/lasrcm.h(4): error #6591: An automatic object is invalid in a main program. [LTRLSR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
--------------------------^
include/lasrcm.h(4): error #6756: A COMMON block data object must not be an automatic object. [LTPAR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
---------------------------------------^
include/lasrcm.h(4): error #6591: An automatic object is invalid in a main program. [LTPAR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
---------------------------------------^
include/lasrcm.h(4): error #6756: A COMMON block data object must not be an automatic object. [LSPAR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
---------------------------------------------------^
include/lasrcm.h(4): error #6591: An automatic object is invalid in a main program. [LSPAR]
INTEGER LRLSR(MLSR),LTRLSR(MLSR),LTPAR(MLSR),LSPAR(MLSR),NLSR
---------------------------------------------------^
include/lasrcm.h(5): error #6756: A COMMON block data object must not be an automatic object. [WLLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------^
include/lasrcm.h(5): error #6591: An automatic object is invalid in a main program. [WLLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------^
include/lasrcm.h(5): error #6756: A COMMON block data object must not be an automatic object. [OMGLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------------------^
include/lasrcm.h(5): error #6591: An automatic object is invalid in a main program. [OMGLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------------------^
include/lasrcm.h(5): error #6756: A COMMON block data object must not be an automatic object. [PLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
--------------------------------------^
include/lasrcm.h(5): error #6591: An automatic object is invalid in a main program. [PLSR]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
--------------------------------------^
include/lasrcm.h(5): error #6756: A COMMON block data object must not be an automatic object. [TXYSLS]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------------------------------------------^
include/lasrcm.h(5): error #6591: An automatic object is invalid in a main program. [TXYSLS]
REAL*8 WLLSR(MLSR),OMGLSR(MLSR),PLSR(MLSR),TXYSLS(0:3,MLSR),
-------------------------------------------------^
include/lasrcm.h(6): error #6756: A COMMON block data object must not be an automatic object. [EVLSR]
% EVLSR(3,3,MLSR),TPAR(3,MLSR),
--------^
include/lasrcm.h(6): error #6591: An automatic object is invalid in a main program. [EVLSR]
% EVLSR(3,3,MLSR),TPAR(3,MLSR),
--------^
include/lasrcm.h(6): error #6756: A COMMON block data object must not be an automatic object. [TPAR]
% EVLSR(3,3,MLSR),TPAR(3,MLSR),
------------------------^
include/lasrcm.h(6): error #6591: An automatic object is invalid in a main program. [TPAR]
% EVLSR(3,3,MLSR),TPAR(3,MLSR),
------------------------^
include/lasrcm.h(7): error #6756: A COMMON block data object must not be an automatic object. [SPAR]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
--------^
include/lasrcm.h(7): error #6591: An automatic object is invalid in a main program. [SPAR]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
--------^
include/lasrcm.h(7): error #6756: A COMMON block data object must not be an automatic object. [TDL]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
---------------------^
include/lasrcm.h(7): error #6591: An automatic object is invalid in a main program. [TDL]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
---------------------^
include/lasrcm.h(7): error #6756: A COMMON block data object must not be an automatic object. [ZETAMAX]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
---------------------------------^
include/lasrcm.h(7): error #6591: An automatic object is invalid in a main program. [ZETAMAX]
% SPAR(6,MLSR),TDL(2,MLSR),ZETAMAX(MLSR),
---------------------------------^
(367): catastrophic error: Too many errors, exiting
compilation aborted for aamain.f (code 1)
It is my first experience and I can not understand what's wrong, why it can't find the module? How I can check that INCLUDE path is correct?
Thank you very much for help.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - kseagull
Thank you very much.
Now, Everything is compiled. (I used ifort -c -module /src/module *.f)
Following the instruction i should "link all", what does it mean and how I can do it? Should I link all files with/and modules as well?
Thank you in advance.
1) just compile the code if the -c option is used (like you do above). -c says "compile ONLY, no link"
2) compile and link the code: ifort -module /src/module *.f
3) link the code: ifort *.o
You can add the option -o to change the name of the executable file. Right now your code creates a file "a.out" that can be run.
If you want to name the executable program something else, let's say "fred.exe" you could use this command:
ifort -module /src/module *.f -o fred.exe
then run fred.exe:
./fred.exe
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should add option:
-module /src/module
This compiler option tells the compiler where to find your compiled .mod file
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald W. Green (Intel)
You should add option:
-module /src/module
This compiler option tells the compiler where to find your compiled .mod file
ron
Now, Everything is compiled. (I used ifort -c -module /src/module *.f)
Following the instruction i should "link all", what does it mean and how I can do it? Should I link all files with/and modules as well?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - kseagull
Thank you very much.
Now, Everything is compiled. (I used ifort -c -module /src/module *.f)
Following the instruction i should "link all", what does it mean and how I can do it? Should I link all files with/and modules as well?
Thank you in advance.
1) just compile the code if the -c option is used (like you do above). -c says "compile ONLY, no link"
2) compile and link the code: ifort -module /src/module *.f
3) link the code: ifort *.o
You can add the option -o to change the name of the executable file. Right now your code creates a file "a.out" that can be run.
If you want to name the executable program something else, let's say "fred.exe" you could use this command:
ifort -module /src/module *.f -o fred.exe
then run fred.exe:
./fred.exe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Ronald W. Green (Intel)
The ifort command can:
1) just compile the code if the -c option is used (like you do above). -c says "compile ONLY, no link"
2) compile and link the code: ifort -module /src/module *.f
3) link the code: ifort *.o
You can add the option -o to change the name of the executable file. Right now your code creates a file "a.out" that can be run.
If you want to name the executable program something else, let's say "fred.exe" you could use this command:
ifort -module /src/module *.f -o fred.exe
then run fred.exe:
./fred.exe
1) just compile the code if the -c option is used (like you do above). -c says "compile ONLY, no link"
2) compile and link the code: ifort -module /src/module *.f
3) link the code: ifort *.o
You can add the option -o to change the name of the executable file. Right now your code creates a file "a.out" that can be run.
If you want to name the executable program something else, let's say "fred.exe" you could use this command:
ifort -module /src/module *.f -o fred.exe
then run fred.exe:
./fred.exe
I appreciate greatly your patience and help.

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