- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello =)
Does anybody know how to call a library from within a function? I'm trying to convert some individual programs into functions for a larger program. When I was running the individual program, a declaration of USE GQRUL_INT and CALL GQRUL (N, QX, QW, ALPHA=ALPHA, BETAW=BETAW) to use the library was working fine. After I converted the program to a function, which is being called from a module in another file, everything to do with that library call is coming up as an error.
The module is able to call other functions without problems. Am I supposed to change that library call in some way?
Thanks!!
Eve
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Eve,
Could you please provide more details?
Is it computational or compiling/linking error? How do you convert the program into function?
-Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
USE GQRUL_INT
IMPLICIT NONE
IMPLICIT NONE
Hello, Eve,
Could you please provide more details?
Is it computational or compiling/linking error? How do you convert the program into function?
-Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Eve,
I have some more questions.
Lets see: you have a program which calls subroutine GQRUL from the library %link_FNL%. The interface GQRUL is described in the module GQRUL_INT. So the module file gqrul_int.mod exists somewhere, maybe in the %INCLUDE% paths.
You converted the program to a function. A function should have a type and should return a value. What is the type of your function? What is the returned value? How do you call your function in the main program?
Then you build your application something like: ifort main_program.f90 INTEG.f90 %link_FNL%. It is not clear from you message when the error comes up. While compiling the program? While executing the program? Could you please provide the error message?
Of course, you can report the problem on another Forum.
Thanks,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page