Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
ustatic
Total Points:
170
Status Points:
0
Green Belt
July 17, 2008 10:50 AM PDT
About DLL's
I've compiled pardiso solver into a dll. In the computer where i have installed fortran and delphi i can compile in delphi the access to the dll and works fine. But in another computer it crash. May i have installed in this computer some other files ??
Todd Rosenquist (Intel)
Total Points:
2,900
Status Points:
2,400
Brown Belt
July 17, 2008 6:09 PM PDT
Rate
 
#1
Could it be that runtime library dependencies were not statically linked into the DLL and so you're missing those on the other computer? Anybody else have any ideas? We probably need more info, or a test case.
-Todd


ustatic
Total Points:
170
Status Points:
0
Green Belt
July 20, 2008 5:17 AM PDT
Rate
 
#2 Reply to #1

The main file of dll is:

 

! ss.f90

!

! FUNCTIONS/SUBROUTINES exported from ss.dll:

! ss - subroutine

!

subroutine ss

! Expose subroutine ss to users of this DLL

!

!DEC$ ATTRIBUTES DLLEXPORT::ss

! Variables

! Body of ss

IMPLICIT NONE

!.. Internal solver memory pointer for 64-bit architectures

!.. INTEGER*8 pt(64)

!.. Internal solver memory pointer for 32-bit architectures

!.. INTEGER*4 pt(64)

!.. This is OK in both cases

INTEGER*8 pt(64)

!.. All other variables

INTEGER maxfct, mnum, mtype, phase, n, nrhs, error, msglvl,nia,nja

INTEGER iparm(64)

INTEGER, ALLOCATABLE :: ia(:),ja(:)

REAL*8, ALLOCATABLE :: a(:),b(:,:), x(:,:)

INTEGER i, j, idum, fdense, fngdl, fn, fbanda, fh, fnh,typ

REAL*8 waltime1, waltime2, ddum

open(10,file='1.tmp',status='old',action='read')

open(11,file='2.tmp',status='old',action='read')

open(12,file='3.tmp',status='replace',action='write')

read(10,*) typ,fdense,fngdl,fn,fbanda,nia

n = fn

ALLOCATE (ia(nia))

do i = 1,nia

read(10,*) ia(i)

end do

read(10,*) nja

ALLOCATE (ja(nja),a(nja))

do i=1,nja

read(10,*) ja(i)

end do

do i=1,nja

read(10,*) a(i)

end do

read(11,*) fh,fnh

ALLOCATE (b(fnh,fh),x(fnh,fh))

nrhs = fh

maxfct = 1

mnum = 1

do i=1,fh

do j=1,fnh

read(11,*) b(j,i)

end do

end do

!

! .. Setup Pardiso control parameters und initialize the solvers

! internal adress pointers. This is only necessary for the FIRST

! call of the PARDISO solver.

!

mtype = typ

call pardisoinit(pt, mtype, iparm)

! .. Numbers of Processors ( value of OMP_NUM_THREADS )

iparm(3) = 1

!.. Reordering and Symbolic Factorization, This step also allocates

! all memory that is necessary for the factorization

phase = 11 ! only reordering and symbolic factorization

msglvl = 1 ! with statistical information

CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja, idum, nrhs, iparm, msglvl, ddum, ddum, error)

WRITE(*,*) 'Reordering completed ... '

IF (error .NE. 0) THEN

WRITE(*,*) 'The following ERROR was detected: ', error

WRITE(12,'(a)') error

STOP

END IF

WRITE(*,*) 'Number of nonzeros in factors = ',iparm(18)

WRITE(*,*) 'Number of factorization MFLOPS = ',iparm(19)

!.. Factorization.

phase = 22 ! only factorization

CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja,idum, nrhs, iparm, msglvl, ddum, ddum, error)

WRITE(*,*) 'Factorization completed ... '

IF (error .NE. 0) THEN

WRITE(*,*) 'The following ERROR was detected: ', error

STOP

END IF

!.. Back substitution and iterative refinement

iparm(8) = 1 ! max numbers of iterative refinement steps

phase = 33 ! only factorization

CALL pardiso (pt, maxfct, mnum, mtype, phase, n, a, ia, ja,idum, nrhs, iparm, msglvl, b, x, error)

WRITE(*,*) 'Solve completed ... '

WRITE(*,*) 'The solution of the system is '

if (fnh<20) then

DO i = 1, fh

do j= 1, fnh

WRITE(*,*) ' x(',j,',',i,') = ', x(j,i)

end do

END DO

end if

DO i = 1, fh

do j= 1, fnh

WRITE(12,*) x(j,i)

end do

END DO

!.. Termination and release of memory

phase = -1 ! release internal memory

CALL pardiso (pt, maxfct, mnum, mtype, phase, n, ddum, idum, idum,idum, nrhs, iparm, msglvl, ddum, ddum, error)

CLOSE(10)

CLOSE(11)

CLOSE(12)

DEALLOCATE (ia,ja,a,b,x)

end subroutine ss

 

In the computer on I have installed intel visual fortran and delphi dll access works fine but in another computer where i don't have installed intel visual fortran the program compiled in delphi crashes at start.

The only entries in configuration of ss are:

Linker->Additional Library Directories = C:Program FilesIntelMKL10.0.3.021ia32lib

Linker->Input->Additional Dependencies = mkl_c.lib libguide.lib mkl_solver.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib

Hope this helps





Intel Software Network Forums Statistics

8491 users have contributed to 31629 threads and 100770 posts to date.
In the past 24 hours, we have 28 new thread(s) 120 new posts(s), and 168 new user(s).

In the past 3 days, the most popular thread for everyone has been Implicite multithreading ??? The most posts were made to Crash when loading skeleton The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member shadowwolf99