Problem with MonoDevelop/OS X

Nov 15, 2011 at 8:26 PM

New user, and I have a problem. My code builds correctly on Windows 7 under VC# Express 2010. In MonDevelop on OS X.  The underlined (indexed) assignment to the double Matrix that is passed to this method throws "Internal Compiler Error: Could not import type 'MathNet.Numerics.LinearAlgebra.Double.Matrix' from 'MathNet.Numerics, Version =2011.04.17.0, Culture=Neutral, PublicKeyToken=cd8b63ad3d691a37'. Since the application expects a dense matrix, I attempted forcing the DenseMatrix type. Same error (save for replacing 'Matrix' with 'DenseMatrix' in the error message. 

As I said, the code runs correctly on VC# 2010. Have not tried MonoDevelop/Windows 7.

THANKS in advance!

		public override void BuildMatrix (int row, Matrix A, Vector B) {
			int col = 0;
			double spec_pot = this.aquifer.HeadToPotential(this.xc, this.yc, this.specified_head);
			foreach (SolverUnknown un in this.aquifer.ActiveUnknowns) {
				Complex[] infl = un.AssociatedElement.PotentialInfluence(this.xc, this.yc);
				for (int i=0; i<infl.Length; ++i) {
					 A[row,col] = infl[i].Real;

Nov 16, 2011 at 11:40 PM

Interesting, this might be related to a weird compiler error (around generic type constraints not properly being propagated to generic methods) I recently noticed when I tried to compile the current Math.NET Numerics mainline sources directly on Mono.

Just curious, what version of Mono are you using?

I don't think we changed much around that so I assume this will be the same on newer Math.NET Numerics builds (current version being 2.1.2)


Nov 17, 2011 at 10:13 PM

Thanks for the help! Maybe I'm having a version issue. I'm running Mono on OS X, and `mcs --version` gives "Mono C# compiler". MonoDevelop 2.8.2. And Math.NET.Numerics 2011.04.17.0 (downloaded from the link on the Math.Net Numerics home page. Is there another Math.NET Numerics version? 

Sorry if I sound like a newbie. I *sigh* guess I am with this stuff...


Nov 18, 2011 at 5:24 PM

OK. Now I really don't understand. The Nuget option (won't work on my platform, Mono/OS X) offers a download of version 2.1.2 that was built in October. The Codeplex page offers only a version built on April 17. I wish I knew what to do.