MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Converting Mathematica code to C++

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88269] Re: Converting Mathematica code to C++
  • From: Joseph Gwinn <joegwinn at comcast.net>
  • Date: Wed, 30 Apr 2008 04:24:27 -0400 (EDT)
  • Organization: Gwinn Instruments
  • References: <fv6up4$rph$1@smc.vnet.net>

In article <fv6up4$rph$1 at smc.vnet.net>,
 "Charlie Brummitt" <cbrummitt at wisc.edu> wrote:

> Hi all,
> I am considering running my research project on a computer cluster on
> campus. However, the computer cluster requires the programs to be in C++,
> and I've already coded much of the project in Mathematica. Do converters
> such as MathCode C++
> <http://library.wolfram.com/infocenter/TechNotes/4694/> work
> well? Or do I need to re-write everything in C++ (not to mention learn how
> to code in C++)?
> 
> If it's relevant, my project calculates the Lyapunov exponents of partial
> differential equations, and the goal is to find the simplest chaotic PDE.
> 
> I'm considering trying Intel's Compiler 10.1 for MacOSX, but I am very
> reluctant to abandon Mathematica to learn to use Intel's interface and
> others' PDE solvers in C++.

Mathematica will happily generate C code, which C++ compilers will 
happily compile as is, as C++ is a superset of C.  See "CForm[]".  
Mathematica will also generate Fortran, using FortranForm[].

Joe Gwinn


  • Prev by Date: Re: Wolfram User Interface Research?
  • Next by Date: Re: Converting Mathematica code to C++
  • Previous by thread: Re: Converting Mathematica code to C++
  • Next by thread: Re: Converting Mathematica code to C++