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
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
(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.
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
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.