bathsite.blogg.se

Link sequential program with multithread mkl
Link sequential program with multithread mkl









When I run the resulting executable, I get the following output and error messages: I have ran the above reproducer on another machine (CPU Intel Xeon Gold 6248 CPU, CentOS Linux release with Kernel 3.10.0-957.21.3.el7.x86_64) with a more recent version of the compiler (ifort version 19.1.0.166) and I still get the same error. I am the academic supervisor of Nils Lange. INTEGER:: handle_number !stores handle pointer ! Allocate the solution vector and solve the problem.Įrror = dss_solve_real(handle, MKL_DSS_DEFAULTS, rhs, nRhs, solution ) ! Define the non-zero structure of the matrix.Įrror = dss_define_structure( handle, MKL_DSS_SYMMETRIC, rowIndex, nRows, &Įrror = dss_reorder( handle, MKL_DSS_DEFAULTS, )Įrror = dss_factor_real( handle, MKL_DSS_DEFAULTS, values ) TYPE(MKL_DSS_HANDLE) :: handle ! Allocate storage for the solver handle. SUBROUTINE factor_and_solve(handle_number) WRITE(*,*)'only solve, do not factor matrix' WRITE(*,*) 'create problem, factor and solve' Tnr = omp_get_thread_num() ! Threadnumber

link sequential program with multithread mkl

INCLUDE 'mkl_dss.f90' ! Include the standard DSS "header file."

Without using openMP and only one thread the Code works and produces no error. I'm solving the standard DSS example problem in one thread by factorizing the matrix and all that stuff, then in another thread use that factorized matrix to only solve the problem. I created a working code with a minimalistic example, that simulates my problem. It can be assured from my side, that the saved and not deleted factorized matrix is only accessed from one thread at a time. Whats also working is that in a single thread computation I can save the factorized matrix by NOT calling DSS_DELETE at the end, and when my programm is called again from abaqus I do handle%dummy=pointer (where pointer is the Integer Number I saved) and it's working (lets say I have 1000 not deleted matrixes and I save all the pointers).īut this method is not working in a multithread computation. I think its not possible to bring it to a small pseudocode, I'm sorry.īut here whats working: I can run Abaqus in multithread mode and then in each thread (each thread computation is compleatly separated) I go through the hole process (dss_create.dss_factor_real.DSS_DELETE) and its working. The problem is, my program has already around 2000 lines of code, then maybe more 1500 lines of code I only took from my institute, maybe 1500 lines of code in Python Preprocessing and then my program is called from abaqus, a commercial FE Program. Do you have an idea where this could come frome? I thought Intel MKL would be thread safe? It should be said, that it is possible that one thread factorizes the matrix and then another thread uses this stored matrix (in theory, but not working this way). Now the Problem is, when the Program runs with multiple threads, it produces an illegal memory reference type error the first time the not deleted factorized matrix is accessed again. My ifort Version is 11.0 (which is very old I know). For solvinig I use the Intel MKL DSS solver. My program is already working with one thread, but I like to performe multithread computations. This needs a lot of memory, but is way faster. So the idea is to store the factorized matrix and not delete it at theĮnd of the program. The system solved at first ist the same system solved in the last iteration increment at the end.

link sequential program with multithread mkl

Every time the program is called, there are two systems of equations to be solved. I'm currently working on a finite element program I wrote by myself. Hello to all, I'm new to this forum and I got a question on the MKL dss.









Link sequential program with multithread mkl