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

Getting error messages with IMSL example

uldry__pierre
Beginner
287 Views

Hello,

I am trying to run an example namely "parallel_ex01.f90" supplied with the IMSL library. I paste the code here:

use linear_operators

use mpi_setup_int

implicit none

INCLUDE 'mpif.h'

! This is Parallel Example 3 for .i. and iterative

! refinement with box date types, operators and functions.

integer, parameter :: n=32, nr=4

integer IERROR

real(kind(1e0)) :: one=1e0, zero=0e0

real(kind(1e0)) :: A(n,n,nr), b(n,1,nr), x(n,1,nr)

real(kind(1e0)) change_old(nr), change_new(nr)

real(kind(1d0)) :: d_zero=0d0, c(n,1,nr), D(n,n,nr), y(n,1,nr)

! Setup for MPI.

MP_NPROCS=MP_SETUP()

! Generate a random matrix and right-hand side.

A = rand(A); b= rand(b)

! Save double precision copies of the matrix and right-hand side.

D = A

c = b

! Get single precision inverse to compute the iterative refinement.

A = .i. A

! Start solution at zero. Update it to a more accurate solution

! with each iteration.

y = d_zero

change_old =

huge(one)

ITERATIVE_REFINEMENT:

DO

! Compute the residual with higher accuracy than the data.

b = c - (D .x. y)

! Compute the update in single precision.

x = A .x. b

y = x + y

change_new = norm(x)

! All processors must share the root's test of convergence.

CALL MPI_BCAST(change_new, nr, MPI_REAL, 0, &

MP_LIBRARY_WORLD, IERROR)

! Exit when changes are no longer decreasing.

if (ALL(change_new >= change_old)) exit iterative_refinement

change_old = change_new

end DO ITERATIVE_REFINEMENT

IF(MP_RANK == 0) write (*,*) 'Parallel Example 3 is correct.'

! See to any error messages and quit MPI.

MP_NPROCS=MP_SETUP('Final')

end

I used to use CVF and did not need to do much to make the IMSL library work. At least I don't remember that I had had a complicated setup. Now I am using Visual Studio 2005 andI corrected the Libraries and Include.I am getting the following error messages:

1>------ Build started: Project: Console6, Configuration: Debug Win32 ------

1>Compiling with Intel Fortran Compiler 10.1.011 [IA-32]...

1>parallel_ex01.f90

1>Linking...

1>parallel_ex01.obj : error LNK2019: unresolved external symbol __imp__MPI_NODE_INT_mp_MP_RANK referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol __imp__MPI_NODE_INT_mp_MP_LIBRARY_WORLD referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol __imp__MPI_NODE_INT_mp_MP_NPROCS referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _MPI_SETUP_INT_mp_MP_DEF referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _RAND_INT_mp_SBR referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _OPERATION_I_mp_SBI referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _OPERATION_X_mp_DBDBP referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _OPERATION_X_mp_SBSBP referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _NORM_INT_mp_SBN referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _MPI_BCAST referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2019: unresolved external symbol _MPI_SETUP_INT_mp_MP_END referenced in function _MAIN__

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_DUP_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_NULL_DELETE_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_NULL_COPY_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_COMM_DUP_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_COMM_NULL_DELETE_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_COMM_NULL_COPY_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_WIN_DUP_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_WIN_NULL_DELETE_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_WIN_NULL_COPY_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_TYPE_ DUP_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_TYPE_NULL_DELETE_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_TYPE_NULL_COPY_FN

1>parallel_ex01.obj : error LNK2001: unresolved external symbol _MPI_CONVERSION_FN_NULL

1>DebugConsole6.exe : fatal error LNK1120: 24 unresolved externals

And my question simly is :) what should I do now?

Thank you very much for your help,

Pierre

0 Kudos
1 Reply
Steven_L_Intel1
Employee
287 Views
You will want to read the IMSL documentation on how to specify the correct libraries. Unlike CVF where there was just one IMSL library set (static, not thread safe), IMSL 6 provides a number of sets of libraries with different characteristics. You specify the set you want with the appropriate INCLUDE 'link_fnl_xxx.h' line. Please also see the Intel Fortran documentation under Building Applications > Using Libraries > Using IMSL.
0 Kudos
Reply