Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

problem with USE

roddur
Beginner
447 Views
in a old fixed format f77 routine, is it possible to use "USE" statement? I have a old routine, and a module just to pass name of directories:
[cpp]module parameters
	 character(25)::ASR_DIR='/home/rudra/Recursion/ASR/' 
	character(28)::LMA_DIR='/home/rudra/Recursion/LMTO_A/' 
	character(28)::LMB_DIR='/home/rudra/Recursion/LMTO_B/' 
       	end module parameters
[/cpp]

in a f77 routine atompp as

[cpp]subroutine atompp(avw,clabl,kap2,lfree,lmx,lrel,nclass,nl,nsp,pp,
     .                  sigma,ves,vmtz,wsr,z)

	use parameters 
...[/cpp]
while compiling, i am getting error,

ATOM/atompp.o: In function `atompp_':
ATOM/atompp.f:(.text+0x318): undefined reference to `parameters_mp_asr_dir_'

so whats wrong with this?
0 Kudos
4 Replies
Steven_L_Intel1
Employee
447 Views
There's nothing wrong with the USE. The problem is that when linking, you have to supply the .o that resulted from compiling module "parameters".
0 Kudos
roddur
Beginner
447 Views
There's nothing wrong with the USE. The problem is that when linking, you have to supply the .o that resulted from compiling module "parameters".
thats what is strange! in makefile, .o file is present, but yet not linking!is it because any f90-f77 mismatch?
0 Kudos
Steven_L_Intel1
Employee
447 Views
When you say f90-f77 mismatch, are you using two different compilers or are you applying the "f77" term to fixed-form source compiled with ifort? If two different compilers, that's not supported. If it's a mixture of fixed-form and free-form, that doesn't matter.

Perhaps using nm to examine the symbols in the .o would be enlightening, looking to see if anything similar to the missing symbol is defined.
0 Kudos
roddur
Beginner
447 Views
Perhaps using nm to examine the symbols in the .o would be enlightening, looking to see if anything similar to the missing symbol is defined.
i am using one compiler only.
how can i check .o files? this in not human readable...iam in linux
0 Kudos
Reply