I'm thinking about using Raspberry Pi to support a course on numerical analysis. Most programming would be done in C and Mathematica has C code generation facilities that would be useful.
http://reference.wolfram.com/mathematic ... #509267359
Specifically, I'm thinking of this example:
cFun = Compile[{{x}}, x^2 + Sin[x^2]];
Export[ "cFun.c", cFun, "C"]
However, I can't seem to get it to work. Instead I get the error
Get::noopen : Cannon open CCodeGenerator`.
Needs::nocont : Context CCodeGenerator` was not created when Needs was evaluated
So I am wondering, am I doing something wrong?
I'm using 20140107wheezyraspbian.
If someone could verify whether this example works or not with their Pi I would greatly appreciate it.
Re: Cannot open CCodeGenerator
Certainly not my area, but glancing at this page http://reference.wolfram.com/mathematic ... erate.html seems to suggest you might need first?
Code: Select all
Needs["CCodeGenerator`"]
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smartquestions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
Re: Cannot open CCodeGenerator
The Needs statement gives me the error messages reported by the OP.DeeJay wrote:Certainly not my area, but glancing at this page http://reference.wolfram.com/mathematic ... erate.html seems to suggest you might needfirst?Code: Select all
Needs["CCodeGenerator`"]
raspberrypi.stackexchange.com  mathematica.stackexchange.com
Re: Cannot open CCodeGenerator
Ok, so this is confirmed. It appears a bug in the Raspberry Pi version of Mathematica that the CCodeGenerator package is missing. I've looked in
/opt/Wolfram/WolframEngine/10.0/SystemFiles
and there is no files that contain CCodeGenerator in them.
I wonder who the point of contact should be for reporting this bug?
/opt/Wolfram/WolframEngine/10.0/SystemFiles
and there is no files that contain CCodeGenerator in them.
I wonder who the point of contact should be for reporting this bug?
Re: Cannot open CCodeGenerator
Mathematica on the Raspberry Pi is a subset of the desktop Mathematica product. There are many functions intentionally omitted at this time so they're not necessarily considered bugs but feature requests. Since this is a free distribution, we do not provide support on it, so the fastest way to get in touch with the team is to create a topic on the Wolfram Community Raspberry Pi group.ejolson wrote:Ok, so this is confirmed. It appears a bug in the Raspberry Pi version of Mathematica that the CCodeGenerator package is missing. I've looked in
/opt/Wolfram/WolframEngine/10.0/SystemFiles
and there is no files that contain CCodeGenerator in them.
I wonder who the point of contact should be for reporting this bug?
The CCodeGenerator is a relatively lightweight component, so it should be easy to add it in this case. We should be able to integrate it in a future update.
Re: Cannot open CCodeGenerator
"And it’s the whole system. Nothing is left out. All 5000+ Wolfram Language functions. All capabilities of Mathematica and its notebook interface." http://blog.stephenwolfram.com/2013/11/ ... pberrypi/alexatwri wrote:Mathematica on the Raspberry Pi is a subset of the desktop Mathematica product. There are many functions intentionally omitted at this time so they're not necessarily considered bugs but feature requests. Since this is a free distribution, we do not provide support on it, so the fastest way to get in touch with the team is to create a topic on the Wolfram Community Raspberry Pi group.
I believed this and told people this, but now I should contact a lot of people and say I was misinformed.
Have Pi0&1A&1B&1B+&2B&3B&4B w/ rasPiOS. Started w/ BASIC on ABC80&ZX81 then Forth, Z80… https://scratch.mit.edu/users/mobluse/ https://github.com/mobluse/ https://twitter.com/mobluse/ https://YouTube.com/MOBiL4u/
Re: Cannot open CCodeGenerator
Ok. I have posted at Wolfram communities a feature request.
http://community.wolfram.com/groups//m ... h=MnluK0fd
I agree that it seems inconsistent to say nothing left out in the press release and then lots of things intentionally left out later.
For Mathematica to be useful on the Raspberry Pi for education at least what is left out needs to be clearly documented. Otherwise, like me, a student could become frustrated and discouraged because things don't work as the documentation suggests.
http://community.wolfram.com/groups//m ... h=MnluK0fd
I agree that it seems inconsistent to say nothing left out in the press release and then lots of things intentionally left out later.
For Mathematica to be useful on the Raspberry Pi for education at least what is left out needs to be clearly documented. Otherwise, like me, a student could become frustrated and discouraged because things don't work as the documentation suggests.
Re: Cannot open CCodeGenerator
Something to keep in mind is that the current release of Mathematica for Raspberry Pi is referred to as a pilot release* and that this version (10) hasn't been released yet for other platforms. As such, I would consider it "beta" and not necessarily complete.
* in both
http://blog.wolfram.com/2013/11/21/putt ... pberrypi/
and
http://www.wolfram.com/raspberrypi/
* in both
http://blog.wolfram.com/2013/11/21/putt ... pberrypi/
and
http://www.wolfram.com/raspberrypi/
raspberrypi.stackexchange.com  mathematica.stackexchange.com
Re: Cannot open CCodeGenerator
The course targets computer science, mathematics and statistics students. Our goal is to learn how to develop efficient numerical codes that run in the Linux environment, which is standard on supercomputers. One technique we will explore is the use of a computer algebra system to generate error free C code. Preinstalled Mathematica and standard Linux programming tools in Raspbian make the Raspberry Pi look like a great resource to support the course. I sure hope this feature request gets sorted quickly.
Re: Cannot open CCodeGenerator
Is there any news on a version of Mathematica for the Pi with CCodeGenerator?
Re: Cannot open CCodeGenerator
The update is currently going through QA and it includes CCodeGenerator. Should be out shortly.ejolson wrote:Is there any news on a version of Mathematica for the Pi with CCodeGenerator?
Re: Cannot open CCodeGenerator
Dear Alexa,
This is great news. Thanks for the update.
All the best,
Eric
This is great news. Thanks for the update.
All the best,
Eric
Re: Cannot open CCodeGenerator
I thoroughly agree with that. It is acceptable that some features are omitted in this free version, but unreasonable that the omissions are not documented. I am selfstudying Mathematica using the text by Roozbeh Hazrat that someone hereabouts recommended, but got stuck when I realised thatejolson wrote:Ok. I have posted at Wolfram communities a feature request.
http://community.wolfram.com/groups//m ... h=MnluK0fd
I agree that it seems inconsistent to say nothing left out in the press release and then lots of things intentionally left out later.
For Mathematica to be useful on the Raspberry Pi for education at least what is left out needs to be clearly documented. Otherwise, like me, a student could become frustrated and discouraged because things don't work as the documentation suggests.
Code: Select all
DictionaryLookup[]
I understand that the dictionary files are probably large and have been elided to reduce the file size  but it would be nice to have been forewarned.
Alan.
IT Background: Honeywell H2000 ... CA Naked Mini ... Sinclair QL ... WinTel ... Linux ... Raspberry Pi.
Re: Cannot open CCodeGenerator
In a headless server, only using cli I am tempted to do the following:
Although disk space is not my primary concern, this is a lot to free up when you are never gonna use the program anyway.
Essentially i was triggered because my aptget upgrade failed on the wolframengine.
For now I assume that failure to be due to my (cheap) flash card but it made me aware of the amount of space taken by this addon.
Yes!!!root@raspberrypi:/home/pi# aptget purge wolframengine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
wolframengine*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 454 MB disk space will be freed.
Do you want to continue [Y/n]?
Although disk space is not my primary concern, this is a lot to free up when you are never gonna use the program anyway.
Essentially i was triggered because my aptget upgrade failed on the wolframengine.
For now I assume that failure to be due to my (cheap) flash card but it made me aware of the amount of space taken by this addon.

 Posts: 116
 Joined: Mon Feb 04, 2013 9:50 am
 Location: Fieberbrunn, Austria
Re: Cannot open CCodeGenerator
Confirming that CCodeGenerator is included in the latest version: 2014072903.alexatwri wrote:The update is currently going through QA and it includes CCodeGenerator. Should be out shortly.ejolson wrote:Is there any news on a version of Mathematica for the Pi with CCodeGenerator?
Example is working.
Re: Cannot open CCodeGenerator
"DictionaryLookup" seems to be implemented in this latest release also.
I'll do more testing.
Alan.
I'll do more testing.
Alan.
IT Background: Honeywell H2000 ... CA Naked Mini ... Sinclair QL ... WinTel ... Linux ... Raspberry Pi.