[FlopCpp] FLOPC++ in C++/CLI with VS2005 does not work.

yo yo yoyovicks at yahoo.fr
Thu Jan 17 10:13:35 EST 2008


Hello,

I am having a problem with flopc++ used in Microsoft C++/CLI 2005.
The MP_data declaration fails because it try to allocate a huge amount of memory. (4 billions bytes).

    MP_set PERIODS(numPeriods);          
    MP_set PRODUCTS(numProducts);
    MP_set SITES(numSites);
    MP_data availability(PRODUCTS,SITES,PERIODS); fails here.


MP_data(const MP_set_base &s1 = MP_set::getEmpty(), 
        const MP_set_base &s2 = MP_set::getEmpty(), 
        const MP_set_base &s3 = MP_set::getEmpty(),
        const MP_set_base &s4 = MP_set::getEmpty(), 
        const MP_set_base &s5 = MP_set::getEmpty()) :
        RowMajor(s1.size(),s2.size(),s3.size(),s4.size(),s5.size()),
        S1(s1),S2(s2),S3(s3),S4(s4),S5(s5),
        v(new double[size()]), manageData(true)     <<<<<fails here on new double[size()].
        {
        initialize(0); 
        }

I tried to debug with VS2005 and apparently the 2 last sets that are supposed to be empty got a cardinality of 160 million which cause the size to be huge.

To make the flopclib compatible with Managed code in .Net I have been obliged to compile with /MD switch instead of MT.
I have also noticed that between the exemple "Transport" and this code, VS2005 does not follow the same path. It looks like the getEmpty code is not executed or it is after the size in rowmajor is set.

Any idea of what is causing the problem.?
Thanks,
YO.






      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr



More information about the FlopCpp mailing list