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

JAFULLER at UP.COM JAFULLER at UP.COM
Thu Jan 17 10:26:43 EST 2008


In a case like this I've tended to use subsets to sparsely allocate.

    MP_set PERIODS(numPeriods);
    MP_set PRODUCTS(numProducts);
    MP_set SITES(numSites);
    MP_subset<3> my_subset(PERIODS,PRODUCTS,SITES);
    MP_data availability(my_subset);

(I also then use this subset on my variables)




                                                                           
             yo yo                                                         
             <yoyovicks at yahoo.                                             
             fr>                                                        To 
             Sent by:                  flopcpp at list.coin-or.org            
             flopcpp-bounces at l                                          cc 
             ist.coin-or.org                                               
                                                                   Subject 
                                       [FlopCpp] FLOPC++ in C++/CLI with   
             01/17/2008 09:14          VS2005 does not work.               
             AM                                                            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




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

_______________________________________________
FlopCpp mailing list
FlopCpp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/flopcpp



.                                                                                                                                                    This message and any attachments contain information from Union Pacific which may be confidential and/or privileged.
If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited by law. If you receive this message in error, please contact the sender immediately and delete the message and any attachments.




More information about the FlopCpp mailing list