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

yo yo yoyovicks at yahoo.fr
Mon Jan 21 05:50:05 EST 2008


I finally managed to make it work with C++/CLI. I just put the code directly into my program instead of using a lib file, and it worked.
I think the issue was a problem of linking probably due to a wrong version of the header files compared to the lib.

Thanks for your help.
YO.

----- Message d'origine ----
De : yo yo <yoyovicks at yahoo.fr>
À : JAFULLER at up.com
Cc : flopcpp at list.coin-or.org; flopcpp-bounces at list.coin-or.org
Envoyé le : Jeudi, 17 Janvier 2008, 17h53mn 30s
Objet : [FlopCpp] Re :  FLOPC++ in C++/CLI with VS2005 does not work.

I tried that but I still have the same memory issue.
GetEmpty does not seem to be executed because cardinality of supposed
 empty sets is 170 million this time.


----- Message d'origine ----
De : "JAFULLER at UP.COM" <JAFULLER at UP.COM>
À : yo yo <yoyovicks at yahoo.fr>
Cc : flopcpp at list.coin-or.org; flopcpp-bounces at list.coin-or.org
Envoyé le : Jeudi, 17 Janvier 2008, 16h26mn 43s
Objet : Re: [FlopCpp] FLOPC++ in C++/CLI with VS2005 does not work.

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.






    
  _____________________________________________________________________________ 
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





      ____________________________________________________________________________________________
Yahoo! Mail innove : interface hyper pratique, messenger intégré, couleurs - http://mail.yahoo.fr



More information about the FlopCpp mailing list