Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openblas hangs in Windows #307

Closed
Maxxan opened this issue Oct 15, 2013 · 4 comments
Closed

Openblas hangs in Windows #307

Maxxan opened this issue Oct 15, 2013 · 4 comments
Labels
Milestone

Comments

@Maxxan
Copy link

Maxxan commented Oct 15, 2013

I don't know if there is a way to free OpenBLAS if it's used in a DLL, but when I load a DLL that uses OpenBLAS , and then tries to free it, the FreeLibrary function hangs (deadlock?) and never returns.

I use pre-built package downloaded from http://sourceforge.net/projects/openblas/files/v0.2.8/
compiling the test program with Visual Studio 2010.

Here is code to reproduce the issue:

Dummy DLL using OpenBLAS, does nothing:

include "stdafx.h"

include "cblas.h"

BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
return TRUE;
}

void FunctionNeverCalled()
{
float f = 1;
cblas_sasum(1, &f, 1);
}


Program calling the DLL:

include "stdafx.h"

include "Windows.h"

int _tmain(int argc, _TCHAR* argv[])
{
HINSTANCE hInstance = ::LoadLibraryExW(L"..\Debug\DllUsingOpenBlas.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
::FreeLibrary(hInstance); // Hangs on FreeLibrary
return 0;
}

@xianyi
Copy link
Collaborator

xianyi commented Oct 15, 2013

Hi @Maxxan ,

Thank you for the report. We didn't test free OpenBLAS dll on Windows. We will try it.

Xianyi

@Maxxan
Copy link
Author

Maxxan commented Oct 15, 2013

Great! And if you find a workaround, then please tell, so I can use current version until bug is fixed.

@xianyi
Copy link
Collaborator

xianyi commented Nov 13, 2013

Hi @Maxxan ,
I think I fixed this hang bug. Please checkout the latest develop branch.

Xianyi

@Maxxan
Copy link
Author

Maxxan commented Nov 14, 2013

Confirmed, now it works! Great work Xianyi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants