Visual Studio 2010 - configuring environment problem

General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

Visual Studio 2010 - configuring environment problem

Postby jm668 » Mon Mar 12, 2012 11:13 am

Hi,

I am using Visual Studio 2010 on Windows Vista. When setting it up, I followed all the steps from
http://www.culatools.com/cula_dense_pro ... nvironment
including Project Settings and Runtime Path. However when compiling, I get
fatal error LNK1104: cannot open file 'C:\Program Files\CULA\R14\lib\cula_core.lib\.obj'


First of all, I included full directories in Additional Dependencies field, written inside " ", such that this line looks like:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;
oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;"C:\Program Files\CULA\R14\lib\cula_core.lib" "C:\Program Files\CULA\R14\lib\cula_lapack.lib";%(AdditionalDependencies)

Where between first and second CULA address there is a whitespace. There is no error, if instead of whitespace between the adresses, I put ";" - the program compiles, however get error when running, that cula_core.dll was not found. Still, in the manual there is whitespace between the adresses, not ";", so I believe there is something about it.

Can you help me?
J Mosakowski
jm668
 
Posts: 3
Joined: Fri Mar 09, 2012 8:46 am

Re: Visual Studio 2010 - configuring environment problem

Postby john » Mon Mar 12, 2012 11:43 am

Have you looked at the project files in the examples folder? They're for VS 2008, but should import cleanly into 2010 and you should be able to follow along from there.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Visual Studio 2010 - configuring environment problem

Postby jm668 » Mon Mar 12, 2012 5:13 pm

I tried the simplest one - "basicUsage". Two things:

In VS -> Project Properties -> Configuration Properties -> Build Events -> Pre-Build Event, I realized that the "Command Line" field contained "../checkenvironment.bat" option. And, similarly, in the Post-Buill Event section, the field "Command Line" contained "../copydeps.bat "$(OutDir)" release x86 lapack". If they were left like this, the the compiler fails and returns error:
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: The command "../checkenvironment.bat
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(103,5): error MSB3073: :VCEnd" exited with code 9009.


However, if I delete both entries, then again, the compiler succeeds, however during running it returns error "cula_core.dll was not found" + standard suggestion that reinstalling may help. Also, this is what is then shown in the Output window in VS (debug):
'basicUsage.exe': Loaded 'C:\Users\Jacek\Desktop\Basic2\Debug\basicUsage.exe', Symbols loaded.
'basicUsage.exe': Loaded 'C:\WINDOWS\System32\ntdll.dll', Cannot find or open the PDB file
'basicUsage.exe': Loaded 'C:\WINDOWS\System32\kernel32.dll', Cannot find or open the PDB file
'basicUsage.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll', Cannot find or open the PDB file
Debugger:: An unhandled non-continuable STATUS_DLL_NOT_FOUND exception was thrown during process load
The thread 'Win32 Thread' (0xe00) has exited with code -1073741515 (0xc0000135).
The program '[5124] basicUsage.exe: Native' has exited with code -1073741515 (0xc0000135).

I tried running VS as the administrator, and still the same. In VC++ Directories, I have entries like:
Executable directories: $(CULA_BIN_PATH_32);$(ExecutablePath)
Include directories: $(CULA_INC_PATH);$(IncludePath)
Library directories: $(CULA_LIB_PATH_32);$(LibraryPath)
And in the linker, I left as it was:
cula_core.lib;cula_lapack.lib;%(AdditionalDependencies)

so it should be working. CULA is installed in some other folder, however this should not make a difference, since the address is included in the Macros $(CULA_...).

Finally, in Environmental Variables, under "System Variables" list, I have CULA_LIB_PATH_32 (which was already specified, I did not need to enter it as the Manual suggests http://www.culatools.com/cula_dense_pro ... nvironment )
I have few doubts if I have the Environmental Variables set correctly, especially that they were already done, while the Manual suggests that it should be added by myself?
jm668
 
Posts: 3
Joined: Fri Mar 09, 2012 8:46 am

Re: Visual Studio 2010 - configuring environment problem

Postby john » Tue Mar 13, 2012 5:29 am

The copydeps.bat script makes sure that your example is able to find the necessary CULA DLLs. By removing it, you're ensuring that you'll get the the "DLL not found" message. If you can't get the batch script to work for you, then you'll either need to do the operation manually (ie copy %CULA_BIN_PATH_[32 or 64]%/* to the directory with the target exe), or you can just add %CULA_BIN_PATH_[32 or 64]% to your main PATH variable.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re: Visual Studio 2010 - configuring environment problem

Postby jm668 » Wed Mar 14, 2012 5:59 am

Strangely, adding CULA_BIN_PATH_32 did not help, however the other tip - to insert manually all the libraries in the folder - did the job. Both the Example program and my own code run correctly. Visual Studio was complaining in the second cas that "Binary was not built with debug information." (for cula_core.dll, cula_lapack.dll, cudart32_41_28.dll and cublas32_41_28.dll), however running in no debugging mode solves the case.

Thank you for your help!
jm668
 
Posts: 3
Joined: Fri Mar 09, 2012 8:46 am


Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron