- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
I'm quite new to MKL and LAPACK, however, I'm trying to execute the following piece of code on an SGI Altix (Itanium2):
!$omp parallel do default(private) shared(tb, S2, failed)
do k = 1, tb%nk
S2(:, :, k) = tb%S(:, :, k)
call hegvd(tb%evecs(:, :, k), S2(:, :, k), tb%evals(:, k), jobz='V', info=info)
if (info /= 0) then
!$omp critical
failed = .true.
!$omp end critical
endif
enddo
!$omp end parallel do
S2, tb%evecs are complex matrices, tb%evals is real (double precision). It works perfectly when running with a single thread, I do however get a segfault when using multiple threads. Am I doing something wrong are is MKL not thread-safe for HEGVD?
Thanks for your help!
Lars
I'm quite new to MKL and LAPACK, however, I'm trying to execute the following piece of code on an SGI Altix (Itanium2):
!$omp parallel do default(private) shared(tb, S2, failed)
do k = 1, tb%nk
S2(:, :, k) = tb%S(:, :, k)
call hegvd(tb%evecs(:, :, k), S2(:, :, k), tb%evals(:, k), jobz='V', info=info)
if (info /= 0) then
!$omp critical
failed = .true.
!$omp end critical
endif
enddo
!$omp end parallel do
S2, tb%evecs are complex matrices, tb%evals is real (double precision). It works perfectly when running with a single thread, I do however get a segfault when using multiple threads. Am I doing something wrong are is MKL not thread-safe for HEGVD?
Thanks for your help!
Lars
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
at line 3 you assign to a shared array S2 in each cycle. It looks like it should have been private.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you set the environment variable MKL_SERIAL=yes , in accordance with the recommendation to start parallel threads either outside or inside MKL functions, but not both ways?
I'm wondering whether implicitly creating temporary argument vectors for each call is the best way.
I'm wondering whether implicitly creating temporary argument vectors for each call is the best way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried using MKL_SERIAL=yes with the same outcome. I actually also tried to use the F77 interface and create a seperate work area for each thread manually. In that case, I do not get a SEGFAULT, it rather boils out with an MKL error complaining some matrix is malformed (different error and different location every time, so that sort of hints that there is some information that is shared between the threads although it shouldn't).
Lars
Lars
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page