unexpected result with mcmodel=medium

Hi,

I’ve got a bunch of code that compile and run well both with or without -mcmodel=medium.
However with mcmodel=medium, it gives completely false results in some cases. I don’t really know where to begin to debug that… any clue I can follow?

Hi WillDan,

Do the false results occur with the same datasets or do they only occur on datasets that need the medium memory model?

Since you’re able to compile without “-mcmodel=medium”, you code most likely doesn’t require it’s use. Can you try compiling with “-Mlarge_arrays” instead? The main difference is that “-mcmodel=medium” allows your programs total data size (things like static arrays and local variables) to be greater than 2GB. While “-Mlarge_arrays” allows allocated arrays to be larger than 2GB.

If your only getting false results on datasets that need large arrays, the first thing to check is if your index variables are integer8. The default is integer4.

  • Mat

by the way the dataset I used does not require mcmodel=medium, it’s just a test case but I expected the mcmodel=medium version to give an identical result. I compiled with -Mlarge_arrays but it also give a false result (not the same one though :) )

Hi WillDan,

I’m really sure then since you shouldn’t see a difference in answers with and without -mcmodel=medium. You may need to get out the debugger and try and track down where the problem is. Also, if you can put together an example, please feel free to send it to customer service at trs@pgroup.com.

  • Mat