- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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_refinementchange_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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page