Errors compiling Magma 0.2 for Win32

Open discussion for MAGMA

Errors compiling Magma 0.2 for Win32

Postby mslezak » Wed Dec 02, 2009 1:09 am

It seems I almost have testing_sgeqlf.cpp linked to everything and ready to compile. I have the LAPACK and BLAS standard libraries (not Intel MKL) and headers, linked to the project in Visual C++ Express 2008 on the Win32 platform (Windows XP). I have linked libmagma_32.a and libmagmablas_32.a from the Magma v0.2 distribution.

However, I get these errors when compiling:

1>testing_sgeqlf.obj : error LNK2019: unresolved external symbol _GetTimerValue referenced in function _main
1>testing_sgeqlf.obj : error LNK2019: unresolved external symbol _get_current_time referenced in function _main
1>testing_sgeqlf.obj : error LNK2019: unresolved external symbol _magma_sgeqlf referenced in function _main
1>testing_sgeqlf.obj : error LNK2019: unresolved external symbol _magma_get_sgeqlf_nb referenced in function _main
1>testing_sgeqlf.obj : error LNK2019: unresolved external symbol _printout_devices referenced in function _main
1>Debug\MAGMA.exe : fatal error LNK1120: 5 unresolved externals

I look to GetTimerValue, get_current_time, and printout_devices which are defined in the #include <auxiliary.h> file. I don't see an issue with this file.
magma_sgeqlf and magma_get_sgeqlf_nb are defined in the #include <magma.h> file. Again, I don't see an issue here.

Is this because the libraries are designed to run on Linux only? Or some other reason? Any help would be appreciated.

Thanks,

Matt Slezak
mslezak
 
Posts: 6
Joined: Tue Dec 01, 2009 11:08 pm

Re: Errors compiling Magma 0.2 for Win32

Postby mslezak » Tue Jan 05, 2010 10:13 pm

Note for those trying to compile on Windows:

You may be able to compile the Magma code. Here's the modifications you have to make:

1) Get the source code for the function you need (should be out next Magma release).

1) Move all variable declarations to the beginning of each program/function if using Visual Studio. Otherwise, the compiler will error out.

2) If you can substitute Cublas calls for Magma calls, do that so you don't need the source code for Magma functions. Or you can use your own LAPACK / BLAS library instead if it isn't an important (parallelized GPU) function. If you do need the Magma sub function, you'll have to get the source and make the above modifications.

3) Don't link to the compiled Magma library, don't include magma.h, auxillary.h.

4) Don't use the Linux time functions (write a Windows version, or just comment out).

That will at least get you started converting functions. My results weren't interesting enough to post, but I could compile 1 program using the above steps. This isn't easy, and is time consuming. I suggest you try out the MKL or ACML function before attempting - for my situation, the CPU function was fast enough. Good luck!

-Matt
mslezak
 
Posts: 6
Joined: Tue Dec 01, 2009 11:08 pm


Return to User discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron