FAQ  •  Login

Midterm Project - Problems with debugging

<<

RSme964uw

Newbie
Newbie

Posts: 12

Joined: Mon Aug 18, 2008 9:33 am

Unread post Thu Nov 06, 2008 6:04 pm

Midterm Project - Problems with debugging

I seem to have this weird problem with both the debug and emudebug modes in VS. When I am in debug or emudebug mode the program does not find the data file (i have tired giving the full path etc...). This causes a lot of other problems. I am not sure what the problem is. The surprising thing is that when I use the command line the data seems to be read in without any issues. Sai and I seem to have the same problem. Anyone know what I should do ??
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Thu Nov 06, 2008 6:12 pm

Re: Midterm Project - Problems with debugging

Try this: start a clean DevStudio session and then load the executable you want to debug instead of a project (like you'd normally do).  Then try to debug it by "Stepping In" (press F10).

If you get confused by what i said above, read on.
This might have to do with the fact that the Collision Detection Developer Studio *Solution* has three projects.  Note that there might be three main.cpp files and although you think that you run the executable that you just compiled, Developer Studio actually runs a different executable associated with one of the other two projects that make up the Solution.  You can address this by setting the default starting project to be the one you are trying to debug. 

I hope this helps.
Dan
<<

HammadM

Supreme Overlord
Supreme Overlord

Posts: 37

Joined: Wed Sep 03, 2008 12:23 pm

Unread post Thu Nov 06, 2008 7:27 pm

Re: Midterm Project - Problems with debugging

try running the executable from the release/debug directory where all three exe's are.


The reason  no data file is found is because visual studio runs the program form it's code directory. This directory is different for all 3 projects. so if you run the data generator from visual studio it saves the data file to the folder that contains the code for the data generator. Then when you run the cuda code from visual studio it looks for the data file in it's own code directory and cannot find it.

So either copy the data file to the directory where the cuda code is saved (.cu etc) or run the data generator and cuda collision programs from the release/debug directory (or a directory with both executable).

NOTE: that the data generator and bullet collision programs do NOT build with emu release and emu debug, wierd things happen if you try building them in these modes.
<<

RSme964uw

Newbie
Newbie

Posts: 12

Joined: Mon Aug 18, 2008 9:33 am

Unread post Thu Nov 06, 2008 8:32 pm

Re: Midterm Project - Problems with debugging

I am able to debug when the some data gets read in. So, it seems that there is something I am doing wrong with reading the data.txt file when in EmuDebug mode.
I have checked to make sure that I am running the correct executable and the data file is in the right location and I even tried using the full path. So I am still stuck. For now it looks like i can debug from the command line with a bunch of printf statements, i'll go with this until I can get the issue resolved.
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Fri Nov 07, 2008 6:58 am

Re: Midterm Project - Problems with debugging

Hammad - when you get a chance, can you please spend 15 minutes with Ram to verify that he's trying to debug with the right setup.

Ram - can you please post the times and room where Hammad can find you.

Thank you,
Dan
<<

RSme964uw

Newbie
Newbie

Posts: 12

Joined: Mon Aug 18, 2008 9:33 am

Unread post Fri Nov 07, 2008 11:12 am

Re: Midterm Project - Problems with debugging

I am in rm 2263 Mechanical Engr. The best time today would be before 12:00noon or after 4pm
<<

Dan Negrut

Global Moderator
Global Moderator

Posts: 833

Joined: Wed Sep 03, 2008 12:24 pm

Unread post Sat Nov 08, 2008 6:49 am

Re: Midterm Project - Problems with debugging

Ram,
Hammad stopped by after 4 pm but apparently you guys didn't meet.

I'm going to be in today (Sat) till probably 5 PM with a two hour break at 11 am.  Come and see me if you need help with the project.
Dan
<<

RSme964uw

Newbie
Newbie

Posts: 12

Joined: Mon Aug 18, 2008 9:33 am

Unread post Sat Nov 08, 2008 1:43 pm

Re: Midterm Project - Problems with debugging

Prof. Negrut,

I met with Hammad yesterday and he helped me out.

ram

Return to ME964 Fall 2008: High Performance Computing

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software.