Subroutine missing

Subroutine missing

hi, this maybe sound strange but im using a program developed by some scientists many years ago which means there aint any problems with the program itself. the problem i face in it is a subroutine that is missing in the original program yet when i run the program, the program calls that subroutine and makes the calculations and outputs the results. i checked if there was an external function defined in the program with that name but there isnt any. I dont understand how can the program make calculation for a missing subroutine. i hope these words describe the problem correctly.

im using CVF on windows

thnx

Zone: 

11 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What is the name of the missing routine?

Is it perhaps a non-standard built-in function?

David

the subroutine name is CONVER. i dont it is a built-in function

Please show the CALL CONVER(... statement with all the arguments and, if needed, the declarations of those arguments.

If the program is built by linking to a user-provided library, that library could contain the code for the subroutine. 

the program has a library but that only has declarations of different parameters. it does not define and functions. all the functions are coded in the program in different subroutines. here is how CONVER is being called in the program.

c.... check convergence norm
      call conver(iconv,icout,ncrit,mphas,amaxa,bcura,acura,toler,errmx
     1,anom1,anom2,normc,iiter,fcura,fconv,gmaxa,icdat,tolmx)

(real, integer, integer, integer, real array, real array, real array, real, real array,

integer, real array, real array, real array, integer, real array, real array, real array, integer, real array)

That is definitely not an intrinsic routine.

So one of your libraries must be defining it. It may however be that it is a compiled library only and that you do not have the source code for it.

 

So any suggestions now? i should look for the source code? 

Well, that depends: the program runs, so that is not the problem. Subroutines and functions can be defined in libraries and if the right libraries are included in the link step, the linker can find all the routines it needs and create an executable program.

If you want to change something about the program or its libraries, for instance because a big was found - or you simply want to understand how the program and its libraries work, the source code is often indispensable. Or you have good documentation at hand.

So, it depends on what you want to achieve

i want to understand how the program works, specially the calculations inside CONVER. the documentation provided with the program isnt enough. anyways thank you for the responses all of you

Quote:

Abbas H. wrote:
 The program has a library but that only has declarations of different parameters. it does not define and functions. all the functions are coded in the program in different subroutines. 

By "library" we usually mean "object module library", and object code does not have any declarations; thus, your statements are not consistent with the common meaning of "library".

Which library do you use? Is it IMSL? What happens if you attempt to link without including that library? If you provide answers to these questions, we may be able to help you with CONVER. The names of the arguments to CONVER suggest that the routine tests whether an iterative calculation has converged to a set of specified tolerances.

You have to contend with the fact that, especially if the source code of CONVER is not available, you need a textual description of the arguments of CONVER. If you have neither the source code nor the description, there is not much that you can do except to use the code as long as it "works" but treat the results with wariness.

The routine must be linked in from somewhere - you may have just overlooked it. If in the project options for the linker you enable the link map, the .map file will tell you where CONVER comes from.

Steve (aka "Doctor Fortran") - Retired from Intel

Leave a Comment

Please sign in to add a comment. Not a member? Join today