CudafyModule km = CudafyTranslator.Cudafy(); causing an error, can't find compiler - cudafy.net

I'm trying to run my 1st cudafy project but I'm getting the following error on the following line:
CudafyModule km = CudafyTranslator.Cudafy();
Below is a screenshot of the exact error message I'm getting.
I've run the example projects which come with Cudafy and they run fine so I don't understand why its saying it can't find the compiler. I've added the Cudafy.net to the references, see screenshot below, and all the info is exactly the same as the example projects, on the right hand side of the image, and that works.
Anyone have any ideas??
EDIT
It appears a similar issue has been answered on SO already but I don't understand where the path environment variable is that he is referring to.
Similar SO question
EDIT 2
Below are the following cl.exe I found. I'm not sure which one to use though. I'm running an Intel processor so I'm leaning towards the bottom one but that's just a guess.

Glad to hear it worked out for you. Here's the comments in answer form...
The linked SO answer is referring to the system PATH. In Windows 7 you can set it through:
Right-click on the My Computer icon
Choose Properties from the context menu
Click the Advanced tab
Click the Environment Variables button
Click on the variable called 'Path' and then click on Edit and enter the path for cl.exe
As for choosing the correct cl.exe, if you're on a non-itanium intel processor (i.e. x86) you'll want x86_amd64

Related

Haskero not finding definitions

I installed the Haskero plugin into VS Code as per the instructions there. I then followed the steps outlined in https://gitlab.com/vannnns/haskero/blob/master/client/doc/installation.md, or specifically Steps 5 and 6 as I already had a Stack project built in that directory. VS code starts up and it opens the project folder. When I hover over a function for example it shows the signature for that function, but when I select "Go to Definition", after thinking for a bit, it returns "No definition found for XXX". This is even when the definition is in the same file. For types, the hover displays nothing at all.
P.S. What puzzles me is that I don't recall anywhere associating ghc with the VS Code project so I am curious as to how it knows which compiler to use?
It appears to be working now. I had to do a complete build before it was able to construct the necessary indices

Unable to add breakpoint in eclipse

I have same problem as mentioned in this question.
Unable to install breakpoint in sample.java due to missing line number attribute. Modify compiler options to generate line number attributes.
Reason:
Absent line number information
But the interesting part is my preference has already have the setting suggested as the answer. Could anyone please tell me if we have any other working solution for that.
I had the same issue and couldnt find a solution.
I eventualy selected "Restore Defaults" button and selected "apply" button and my problem was solved.
Are you trying to set a breakpoint in the source file? Or did you open the Class file and trying to set the breakpoint? If the source file is in a different project and if you have added the compiled jar of that project in another project, you might get this error.
Check if those settings are different for your project, by right-clicking it on Project Explorer and selecting Properties.

NetBeans Development - Windows 7 64-bit ... modules appear to not be loading

Being new to NetBeans 7 (this is running on Windows 7 64-bit Ultimate Edition) I found it extremely interesting that I can't get any POC (proof of concept applications) to be "viewable." Allow me to explain.
Going through the tutorials - about as simple as anything can ever be in software dev:
1) I create may NetBeans Development application ... but using a product location other than the default. NetBeans wants to use C:\Users{user_name}\Documents\NetBeanProjects as the root path to your projects, then create project folders underneath. Reasonable, but I have dedicated "development drives" where all my development happens, which is not where NetBeans wants to put it.
2) Create a Module for the application. Here I created an Installer and placed a System.out.println() in an overriden restored() method .... you never see this in the Output windows of the IDE. I also added a new Window with a button and textArea, and set the new Window's properties to be shown on application startup and in the Editor location .... you never see these either.
Long story short, I uninstalled NetBeans v7.0 from the computer, and reinstalled it again, but this time allowing the IDE to use the location it wants for project folders. Though, I still do not get the System.out.println() text in the Output window, I do get my new Windows with the button and TextArea.
I've added this post because I did a bunch of seaches trying to find an answer to all this to no avail. I certainly don't have the real answer, but if someone else is strugling with the same problem you'll at least have a "partial answer" if you've changed default project locations and your applications "don't seem to run or be visible."
If anyone knows the real answer to these questions PLEASE advise.
EDIT #1 ... thinking this might be a security or privilege issue I tried running the IDE "as Administrator" and this didn't make any difference. I do not see any prompts or anything in the OS' logs that indicate a problem either, so I'm assuming it's NetBeans.
EDIT #2 ... Found it. Finally discovered where all my System.out.println()'s are ending up. Not in the IDE's Output Window as I would have expected (pretty sure I'm not the only one) but in a "message.log" text file located at
C:\Users\{User_Name}\Documents\NetBeansProjects\{Project_Name}\build\testuserdir\var\log
That was fun - Not! I am assuming that this probably means the System.out is currently set to do this in a property somewhere. But at least I know it's not disappearing off into space somewhere now.
re. the System.out "Not in the IDE's Output Window", have you tried to instantiate a logger instead?
Directly after the class declaration, paste in the following field definition:
private static final Logger logger = Logger.getLogger("thePackageName.andYourClassNameHere");
import the import java.util.logging.Logger; library.
then simply log what ever you want to trace on the output console.
ie: logger.info(" ... " + ....);

How do I set my source path for STS/Eclipse (using Groovy grails) and make it stick?

When I debug a Groovy/Grails program in STS, the first time in a session that it hits a breakpoint it asks me where the source code is.
When I click on that dialog, I need to add my "Project" and then it will work until I exit STS and restart.
(But for DEBUGGING only! Lines of code mentioned in the console, whether or not they're displayed as links, will NEVER display the source when clicked on.)
1) How do I make it remember it forever? I looked through all the properties/settings I could find.
And
2) How can I click on an line of code that's mentioned in the console window (say an Exception) and have it automatically go to that line? (Micsosoft Visual Studio will do it...and it's never had to ask me where my source code is. In my 15 years of using it....)
Not everything gets hyperlinked, and even when it does, it will never find the source code, even though I can navigate to it in the Project or Package explorers:
I can answer the second part of the question here. If you see a reference to a stack frame in the console window and it is not there is no hyperlink (often the hyperlink exists, but in certain situations it will not be), then you should select and copy the stack trace and paste it into a Java stack trace console:

Setting breakpoint w/Eclipse PDT

I am SOOOOO discouraged. This seems so simple, but being a complete novice in Drupal and Eclipse PDT I have absolutely no idea where to look. My DAYS of searching seems to indicate that I am the only person on the planet with this problem.
Eclipse IDE for PHP Developers (1.2.1.20090918-0703)
WampServer Version 2.0
Apache 2.2.11
PHP 5.2.9-2
MySQL 5.1.33
Drupal 6.15
xDebug php_xdebug-2.0.5-5.2.dll
I setup my project in Eclipse to point to my Drupal directory (C:\wamp\www\drupal-6.15). I start the debugger (xdebug) and I stop at the first line of code. I can step through the code line by line -- so I think I am in the debugger, and when I terminate the app, I see the xdebug termination message in the tab heading.
But I cannot set a breakpoint in any of the PHP code files -- specifically a new .module file.
When I right click in the breakpoint column on the left in index.php (main) I see "toggle breakpoint" and the little blue circle next to the line of code...so I think I know how to set a breakpoint. But when I try to set a breakpoint in my .module, I see a menu that asks me to "add a bookmark" and no option to set a breakpoint.
Why can I not set a breakpoint in this file? Is my project path not set up correctly? Do I need to amend my include path? I can't get Eclipse to recognize even core modules not just site/all modules. I've seen posts about "importing" files into the project, and making sure the correct php.ini file is used for configuring xdebug. I'm lost.
There are so many posts about using Eclipst PDT and xDebug and they all end with "have fun debugging" or "just set some breakpoints and off you go" -- but what if you CAN'T set a breakpoint? Any ideas about where Eclipse is lost? Where in Eclipse can you get a list of files it has included in its build?
I think I just need to know understand why Eclipse cannot find these modules within the project (i.e. drupal application) path to allow me to set breakpoints. Then I think I can carry on. So discouraging...
Thanks to anyone listening.
Thanks for the tip. I think I had seen your similar response in another post somewhere.
Actually, the solution for me was to make sure to include all of the standard Drupal file extensions in the Eclipse file associations preferences: Preferences->General->Content Types->Text->PHP Content Type. The defaults are various *.php, *.phpX, *.phtml extensions, but not the extensions used in Drupal modules -- *.info, *.inc, *.module, *.install, etc.
Simple and obvious once you figure it out. I'm surprised with all the Eclipse-xDebug-Drupal setup instructions out there that this had not shown up. Lots of details about matching project paths with server paths, but nothing about this.
I hope my struggle helps someone. I did learn a lot about Eclipse PDT along the way :-). Good luck.
Breakpoints are tricky in PDT projects:
for php files, you need to be careful
One thing that gets me a lot is that there a lot of "invalid" places where you set breakpoints. You can put the dot there in the IDE, but the debugger won't stop at it:
blank/non-code lines
on switch statements
in some types of callbacks (for example, preg_replace)
But for breakpoints in .module files, this should be related to a setup issue.
I made the following changes to my setup:
Upgraded from php 5.2.1 to php 5.2.3
Installed the Zend debugger client in Eclipse/PDT (theoretically not necessary from what I understand, but I decided to give it a try)
Made sure that the Drupal files were fully imported into my project, not just referenced as include libraries.
I did that last step after I created a tiny test case and discovered that I could get the debugger to stop on a breakpoint in an externally included file only if that file was imported into the project, not if it was referenced as part of an include library directory.
To my mind this seems like a bug - the debugger could certainly see that the files in the include library directories were source files and it let me set breakpoints in them, so it seems that it should stop on them.
(For comparison from a separate (java) IDE, IntelliJ will let you define breakpoints in jar files as long as you tell it where the source is. Once you've defined it, it will stop on it.)
I think it was principally that last step that did the trick, so I'd suggest that anyone else with a similar problem make sure that isn't an issue in their setup first, and then try the other steps.
check whether you opened your java file in java editor mode.
ie ctrl+shift+R, in this popup check the button beside OPEN option and select java editor.
The problem of not being able to set a breakpoint can occur if you have recently created a file. You must close and re-open the file for it to be recognised as a source file that can be debugged, and to enable the code highlighting.