IMSL Library

IMSL Library

Hi all,

I have installed the IMSL Library first time on my computer. Now, I try to use it but I could not use. The code I try to compile is below:

PROGRAM MAIN

USE IMSL_LIBRARIES
IMPLICIT NONE
INTEGER ISEED, NCAT, NDFEST, NELM
PARAMETER (ISEED=123457, NCAT=6, NDFEST=0, NELM=1000)
!
INTEGER I, IX(NELM), NOUT
REAL CDF, CHISQ(NCAT+1), COUNTS(NCAT), CUTP(NCAT-1), DF, &
EXPECT(NCAT), P, RNGE(2), X(NELM)
EXTERNAL CDF
!
DATA RNGE/0.0, 0.0/

DATA CUTP/.5, 1.5, 2.5, 3.5, 4.5/
!
CALL RNSET (ISEED)
! Generate the data
CALL RNBIN (5, 0.3, IX)
DO 10 I=1, NELM
X(I) = IX(I)
10 CONTINUE
!
CALL CHIGF (CDF, NELM, X, NCAT, RNGE, NDFEST, CUTP, P, &
COUNTS=COUNTS, EXPECT=EXPECT, CHISQ=CHISQ, DF=DF)
! Print results
CALL WRRRN ('Counts', COUNTS, 1, NCAT, 1)
CALL WRRRN ('Expect', EXPECT, 1, NCAT, 1)
CALL WRRRN ('Contributions to Chi-squared', CHISQ, 1, NCAT, 1)
CALL UMACH (2, NOUT)
WRITE (NOUT,99999) CHISQ(NCAT+1), P, DF
99999 FORMAT (///'0Chi-squared ', F8.4, /, ' P-value ' &
, F8.4, /, ' Degrees of freedom', F8.4)
END
!
REAL FUNCTION CDF (Y)
REAL Y
!
INTEGER I
REAL BINDF
EXTERNAL BINDF
!
I = Y
CDF = BINDF(I,5,0.3)
RETURN
END

The compiler gives an error message at 2nd line that "error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IMSL_LIBRARIES]". Is the problem related to install IMSL Library on my computer?

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

Please read Installing and using the IMSL* Libraries

If after reading that you have further questions, feel free to ask here.

Steve

I'm starting to work with intel VF 11.0.066 and I tried to use the IMSL by calling "use numerical_libraries", but is not that simple. I don't know if you can help me on this. This is very basic: how to add imsl functionality to IVF?

Thanks in advance

See my post above.

Steve

Quoting - Steve Lionel (Intel)
See my post above.

I'm working with the following file (is the traditional foxes vs. rabits problem)

PROGRAM ZORROSVSCONEJOS
USE IMSL_LIBRARIES
INTEGER, PARAMETER :: MXPARM = 50, N = 2
INTEGER :: IDO, ISTEP
REAL :: PARAM(MXPARM), T, TEND, TOL, Y(N)
EXTERNAL :: FCN

!! initial conditions
T = 0.0
Y(1) = 1.0
Y(2) = 3.0

!! tolerance
TOL = 0.0005

! set parameters to defaults
CALL SSET (MXPARM, 0.0, PARAM, 1)

PARAM(10) = 1.0

!print header
WRITE(*,*) 'ISTEP ', TIME ' , 'Y1 ', 'Y2 '
WRITE(*,*) '==================================='

IDO = 1
ISTEP = 0

DO WHILE (ISTEP <= 10)
ISTEP = ISTEP + 1
TEND = ISTEP
CALL IVPRK (IDO, N, FCN, T, TEND, TOL, PARAM, Y)
IF (ISTEP <= 10) THEN
WRITE (*,*) ISTEP, T, Y
END IF
END DO
IF (ISTEP == 10) THEN
IDO = 3
END IF

END PROGRAM ZORROSVSCONEJOS

and I got the following error:
Error 1 error #6285: There is no matching specific subroutine for this generic subroutine call. [IVPRK] C:Documents and SettingsjbaezapMis documentosVisual Studio 2005ProjectsQWin2QWin2Source1.F90 32

Any advise on this one?

Change USE IMSL_LIBRARIES to USE NUMERICAL_LIBRARIES

Your call to IVPRK is using the older "Fortran 77" argument style, but IMSL_LIBRARIES defines the new "Fortran 90" style which has different arguments. You can see the IMSL documentation for IVPRK if you want the details.

USE NUMERICAL_LIBRARIES will declare the older interfaces.

Steve

Quoting - Steve Lionel (Intel)
....
USE NUMERICAL_LIBRARIES will declare the older interfaces.

I did the change and these were the error messages:
Error 2 error LNK2019: unresolved external symbol _IVPRK referenced in function _MAIN__ Source1.obj
Error 1 error LNK2019: unresolved external symbol _SSET referenced in function _MAIN__ Source1.obj

Add the following lines after the USE NUMERICAL_LIBRARIES

include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

If you are using the version 10.x IMSL, replace the second line with:

!DEC$ OBJCOMMENT LIB:'libguide.lib'

Steve

It works nicely! Thanks Steve!

Quoting - Steve Lionel (Intel)
Add the following lines after the USE NUMERICAL_LIBRARIES

include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

If you are using the version 10.x IMSL, replace the second line with:

!DEC$ OBJCOMMENT LIB:'libguide.lib'

It works! Thanks Steve!

Quoting - Steve Lionel (Intel)
Add the following lines after the USE NUMERICAL_LIBRARIES

include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

If you are using the version 10.x IMSL, replace the second line with:

!DEC$ OBJCOMMENT LIB:'libguide.lib'

What should I do for using the fortran 90 call to IMSL?

CALL IVPRK (IDO, FCN, T, TEND, Y, TOL=TOL, PARAM=PARAM)

Steve

Quoting - Steve Lionel (Intel)

CALL IVPRK (IDO, FCN, T, TEND, Y, TOL=TOL, PARAM=PARAM)

Ok, I did some changes to the program to adecuate it to the sample code of the IMSL

PROGRAM FOXESANDRABITS
USE IMSL_LIBRARIES

INTEGER, PARAMETER :: MXPARM = 50, N = 2
INTEGER            :: IDO, ISTEP
REAL               :: PARAMETERS(MXPARM), T, TEND, TOLERA, Y(N)
EXTERNAL           :: FCN

!! INITIAL CONDITIONS
    T = 0.0
    Y(1) = 1.0
    Y(2) = 3.0
!! TOLERANCE
    TOLERA = 0.0005

! PARAM TO DEFAULT VALUES
    PARAMETERS= 0.E0
! ABSOLUTE ERROR CONTROL 
     PARAMETERS(10) = 1.0
!PRINT HEADER
     WRITE(*,*) 'ISTEP   ', 'TIEMPO   ', 'Y1   ', 'Y2   '
	 WRITE(*,*) '==================================='
	 IDO = 1
     ISTEP = 0
	 DO WHILE (ISTEP <= 10)
	    ISTEP = ISTEP + 1
        TEND = ISTEP
        CALL IVPRK (IDO, FCN, T, TEND, Y, TOL = TOLERA, PARAM = PARAMETERS)
        IF (ISTEP <= 10) THEN  
		        WRITE (*,*) ISTEP, T, Y
		END IF
	 END DO
     IF (ISTEP == 10) THEN 
	     IDO = 3
	 END IF
END PROGRAM FOXESANDRABITS

And the message that appears is:

Error 1 error LNK2019: unresolved external symbol _S_IVPRK referenced in function _MAIN__ PRINCIPALZORROSYCONEJOS.obj

What I did wrong?

You left out the include and !DEC$ lines again.

Steve

Quoting - Steve Lionel (Intel)
You left out the include and !DEC$ lines again.

So, either the program is F77 or F90 I have to put them? Ok

Those lines are the easiest way to specify which IMSL library set you are linking with. If you do not specify the libraries another way, you need them, no matter which style of call you use.

Steve

Quoting - Steve Lionel (Intel)
Those lines are the easiest way to specify which IMSL library set you are linking with. If you do not specify the libraries another way, you need them, no matter which style of call you use.

Steve,

On may laptop, which is still runnig version 10 of the compiler together with Compaq VF and Visual Studio Express I had no problem running the IMSL Validate program. On my office machine which is running version 11 of IMSL and Intel Fortran as well as CVF, Visual Studio.Net 2003 and VC++ the compiler gets confused and when I try to compilie Validate it says: warning #10268 Microsoft compiler version 6 or earlier is not supported.

On both machines, no interpretation of the instructions above or in the basic imsl article results in 'link_fnl_static.h' being read when I try to use the IDE.

christ

christ,

Are you building this from the IDE? Please go into Tools > Options > Intel Fortran > Compilers. Click the ... next to Executable files. Copy the contents and paste it into a reply here. Do the same for Library Files and Executable Files.

Steve

Quoting - Steve Lionel (Intel)
christ,

Are you building this from the IDE? Please go into Tools > Options > Intel Fortran > Compilers. Click the ... next to Executable files. Copy the contents and paste it into a reply here. Do the same for Library Files and Executable Files.

Steve,

Here is the info:

EXecutables

$(IFortInstallDir)binia32
$(CommonProgramFiles)IntelShared FilesIa32Bin
$(VSInstallDir)Common7ide
$(VCInstallDir)bin
$(VSInstallDir)Common7Tools
$(VSInstallDir)Common7Toolsbin
$(VCInstallDir)PlatformSDKbin
$(FrameworkSDKDir)bin
$(FrameworkDir)$(FrameworkVersion)
$(PATH)

Libraries

$(IFortInstallDir)libia32
$(VCInstallDir)atlmfclib
$(VCInstallDir)lib
$(VCInstallDir)PlatformSDKlib
$(FrameworkSDKDir)lib
$c:Program FilesIntelArray Visualizerlib
$c:Program FilesVNIimslfnl600IA32lib

INCLUDES

$(IFortInstallDir)include
$(IFortInstallDir)includeia32
$(VCInstallDir)atlmfcinclude
$(VCInstallDir)include
$(VCInstallDir)PlatformSDKinclude
$(FrameworkSDKDir)include
$c:Program FilesIntelArray Visualizerinclude
$C:Program FilesVNIimslfnl600IA32includedll

Lines from my code:

INCLUDE 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

Thanks,

christ

Please attach (see instructions below) the Buildlog.htm from the Debug or Release folder after you do a Rebuild of the solution and it fails.

Steve

Quoting - Steve Lionel (Intel)
Please attach (see instructions below) the Buildlog.htm from the Debug or Release folder after you do a Rebuild of the solution and it fails.

Stevew,

Log file should be in folder cf_check

cf

Quoting - Steve Lionel (Intel)
Please attach (see instructions below) the Buildlog.htm from the Debug or Release folder after you do a Rebuild of the solution and it fails.

Oh, I missed this before. In the Tools > Options > Intel Fortran > Compilers lists of directories, remove the $ before each line that contains C:: The $ is only for references to environment variables.

So for the Include paths, you would have:

c:Program FilesIntelArray Visualizerinclude
C:Program FilesVNIimslfnl600IA32includedll

and for Libraries:

c:Program FilesIntelArray Visualizerlib
c:Program FilesVNIimslfnl600IA32lib

Steve

Quoting - Steve Lionel (Intel)
Oh, I missed this before. In the Tools > Options > Intel Fortran > Compilers lists of directories, remove the $ before each line that contains C:: The $ is only for references to environment variables.

So for the Include paths, you would have:

c:Program FilesIntelArray Visualizerinclude
C:Program FilesVNIimslfnl600IA32includedll

and for Libraries:

c:Program FilesIntelArray Visualizerlib
c:Program FilesVNIimslfnl600IA32lib

OK that got me a lot closer to compiling. The new log file is attached. No matter whether or not I used a USE statement or which USE statement I used (imsl_libraries, numerical_libraries) it could not find smaths.lib which I think is a CVF name and must be left over from Visual Studio importing the project file. When I use the command line environment I still get the error message about version 6 not supported.

cf

Yes, the library names have changed. Remove all library names you have specified in the project. Add these two lines to your main program:

include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

For the command line, make sure you are starting your session with the "Fortran Build Environment" shortcut provided. If this does not help, please attach a log of a complete command prompt session (starting with the first lines output) to show me what is happening.

Steve

Quoting - Steve Lionel (Intel)
Yes, the library names have changed. Remove all library names you have specified in the project. Add these two lines to your main program:

include 'link_fnl_static.h'
!DEC$ OBJCOMMENT LIB:'libiomp5md.lib'

For the command line, make sure you are starting your session with the "Fortran Build Environment" shortcut provided. If this does not help, please attach a log of a complete command prompt session (starting with the first lines output) to show me what is happening.

Hi Steve,

Good news. I cleaned out the converted project file and was able to compile and run debug and release versions of the code in the IDE. I did not have success in the command line though and the capture file of the commands I ran and the output is attached.

christ

Very strange. Would you please, in this command session, do a:

set > set.txt

and attach the set.txt to a reply?

Steve

Quoting - Steve Lionel (Intel)
Very strange. Would you please, in this command session, do a:

set > set.txt

and attach the set.txt to a reply?

set.txt is attached. I notice the imsl setup bat is hard wired to identify the OS as Windows Server 2003?

cf

The OS identification isn't used for anything important.

I notice that PATH is very long and has some duplicate entries. Try this.

Open a command prompt window. Type this:

SET PATH=
SET LIB=
SET INCLUDE=
call C:Program FilesIntelCompiler11.066fortranbinifortvars.bat ia32

Now try the compile.

Steve

Quoting - Steve Lionel (Intel)
The OS identification isn't used for anything important.

I notice that PATH is very long and has some duplicate entries. Try this.

Open a command prompt window. Type this:

SET PATH=
SET LIB=
SET INCLUDE=
call C:Program FilesIntelCompiler11.066fortranbinifortvars.bat ia32

Now try the compile.

Steve,

Sorry, got the same error window as before. I do have a different versions of libmmd.dll on my computer (Matlab and Intel) but the path statement should have fixed all that. In the spirit of voodoo debugging I downloaded a second version of the IMSL Libraries and used the repair option on installation but it did not help.

christ

christ, are you building from the command line or from Visual Studio?

Steve

Quoting - Steve Lionel (Intel)
christ, are you building from the command line or from Visual Studio?

I am building the imsl example programs from the command line according to the directions in the imsl examples directory. When I write my applications I normally use the IDE but I can't validate the imsl installation - see validate directory in the imsl examples.

cf

cf, are you the same user as "okale"? I'm getting confused as to who is seeing what.

Please try this from the command line - add the switch /watch after %F90FLAGS% and then attach the output (copy and paste to a text file and attach the text file.)

Steve

Please also do this. From the command session that gives you the error about Visual C++ 6, type:

cl

and paste the output into a reply.

Steve

Quoting - Steve Lionel (Intel)
cf, are you the same user as "okale"? I'm getting confused as to who is seeing what.

Please try this from the command line - add the switch /watch after %F90FLAGS% and then attach the output (copy and paste to a text file and attach the text file.)

Steve,

Here is the watch file.

christ

Quoting - ftaclas@ifa.hawaii.edu

Steve,

Here is the watch file.

christ

Steve,

snap of command line session and error window attached. "cl" command always gives:
Microsoft 32-bit C/C++ Standard Compiler Version 10.10.6030 for 80x86

christ

Attachments: 

AttachmentSize
Download sessioncl.jpg150.28 KB

Actually, it said 13.10, which is correct. Strange. I think you can ignore that message for now, but there's something else going on. Let me study what you have posted a bit more...

Steve

Hi, I have installed Fortran 11, MVS 2008 and IMSL Library in my computer. However, the following error message appears:

"error #7002: Error in opening the compiled module file. Check INCLUDE paths. [IMSL]".

I already have read Installing and using the IMSL* Libraries. Then, I inserted the lines:

A) At the right of Libraries., click the "..." button.
C:Program FilesVNIimslfnl600IA32lib

B) At the right of Includes, click the "..." button.
C:Program FilesVNIimslfnl600IA32includedll

Unfortunately, the problem persists.
What I have to do?
Following there is a simple sample of the program that I am trying to run.

program Console1
use IMSL
implicit none
real T
! Variables

! Body of Console1
T = DTIN( 0.975 , 10.0 )
print *, 'T=', T

end program Console1

Replace "use IMSL" with "use NUMERICAL_LIBRARIES".

Steve

Login to leave a comment.