Changeset f85d3e in git


Ignore:
Timestamp:
Sep 29, 2010, 6:12:45 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
Children:
49a64cf3866667ef2b1dca559f7d269fbccd0965
Parents:
f9201ca20a18d3dedfea7a9b2a551f034a6ef251
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2010-09-29 18:12:45+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:55:31+01:00
Message:
1. Better makefile (debug test-g/no debug: test)
2. Zn Z2m seems to interfere with GMP folating point global init.
Location:
coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coeffs/Makefile.in

    rf9201c rf85d3e  
    3636CXXTEMPLFLAGS   = -fno-implicit-templates --no-exceptions
    3737CPPFLAGS        = -I${srcdir} -I${includedir} -I${prefix}/include
    38 LDFLAGS         = -L${libdir} -L${prefix}/lib
     38LDFLAGS         = -L${libdir} -L${prefix}/lib -L${srcdir}
    3939DEFS            = -DNDEBUG -DOM_NDEBUG @DEFS@
    4040
    41 LIBSG           =  @LIBPREFIX@ -lcoeffs_g -lreporter -lresource -lomalloc -lgmp
     41LIBS            =  @LIBPREFIX@ -lcoeffs -lreporter -lresource -lgmp -lomalloc_ndebug
     42LIBSG           =  @LIBPREFIX@ -lcoeffs_g -lreporter -lresource -lgmp -lomalloc
    4243
    4344#-DHAVE_RINGS
     
    6970
    7071OBJS := $(CXXSOURCES:.cc=.o) $(CSOURCES:.c=.o)
     72
     73
     74all: libcoeffs.a libcoeffs_g.a
     75
    7176
    7277.cc.o: 
     
    103108
    104109cleantest:
     110        -rm -f test test-g
    105111        -rm -Rf test test.dSYM/
    106112
    107113clean: mostlyclean cleantest
    108         -rm -f *.bak *.d *.dd depend *.a *.so*
     114        -rm -f *.bak *.d *.dd depend *.a *.so* 
    109115
    110116tags:   
    111117        ctags *.c *.h *.cc *.inc
    112 
    113 all: libcoeffs.a libcoeffs_g.a
    114118
    115119install: all
     
    120124        $(INSTALL_DATA) coeffs.h $(includedir)/coeffs.h
    121125
    122 test: test.cc libcoeffs_g.a
    123         ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} test.cc ${LDFLAGS} ${LIBSG} -o test
     126test: test.cc libcoeffs.a
     127        ${CXX} ${CXXFLAGS} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFS} test.cc ${LDFLAGS} ${LIBS} -o test
     128
     129
     130test-g: test.cc libcoeffs_g.a
     131        ${CXXG} ${CXXFLAGSG} ${CXXTEMPLFLAGS} ${CPPFLAGS} ${DEFSG} test.cc ${LDFLAGS} ${LIBSG} -o test-g
  • coeffs/test.cc

    rf9201c rf85d3e  
    251251
    252252  // rings needed for: n_Zp_a, n_Q_a ?
     253#ifdef HAVE_RINGS
     254  TODO(Frank, Segmentation fault! (if used wihout omalloc???). Please_ investigate!);
     255/*
     256  type = nRegister( n_Z2m, nr2mInitChar); assume( type == n_Z2m );
     257  if( Test(type, (void*) 2) )
     258    c ++;
     259*/
     260#endif
    253261
    254262  type = nRegister( n_Zp, npInitChar); assume( type == n_Zp );
     
    256264    c ++;
    257265
     266#ifdef HAVE_RINGS
     267  TODO(Frank, memmory corruption_ if used wihout omalloc??? Please_ investigate!);
     268/*
     269  type = nRegister( n_Z2m, nr2mInitChar); assume( type == n_Z2m );
     270  if( Test(type, (void*) 2) )
     271    c ++;
     272*/   
     273#endif
     274
    258275 
    259276  type = nRegister( n_Q, nlInitChar); assume( type == n_Q );
     
    265282    c ++;
    266283
    267 
    268 #ifdef HAVE_RINGS
    269   type = nRegister( n_Z, nrzInitChar); assume( type == n_Z );
    270   if( Test(type) )
    271     c ++;
    272 
    273   type = nRegister( n_Z2m, nr2mInitChar); assume( type == n_Z2m );
    274   if( Test(type, (void*) 2) )
    275     c ++;
    276 #endif
    277 
     284#ifdef HAVE_RINGS
     285  type = nRegister( n_Z, nrzInitChar); assume( type == n_Z ); // No need in GMP?
     286  if( Test(type) )
     287    c ++;
     288#endif
    278289
    279290   type = nRegister( n_GF, nfInitChar); assume( type == n_GF );
     
    283294   param.GFChar= 5;
    284295   param.GFDegree= 12;
    285 
    286296   param.GFPar_name= (const char*)"q";
    287297
     
    289299     c ++;
    290300 
    291  
    292   TODO(Somebody, floating arithmetics via GMP rely on two global variables (see setGMPFloatDigits). Fix it!);
    293  
    294   setGMPFloatDigits( 10, 5 ); // Init global variables in mpr_complex.cc for gmp_float's...
    295      
     301   param.GFChar= 5;
     302   param.GFDegree= 2;
     303   param.GFPar_name= (const char*)"Q";
     304
     305   if( Test(type, (void*) &param) )
     306     c ++;
     307
     308  TODO(Somebody, floating arithmetics via GMP rely on two global variables (see setGMPFloatDigits). Please fix it!);
     309
     310
     311
     312#ifdef HAVE_RINGS
     313  TODO(Somebody, This will result in memory corruption at Z_2^m later on (due to the succs. setGMPFloatDigits?)...!?);
     314/*
     315  type = nRegister( n_Zn, nrnInitChar); assume( type == n_Zn );
     316
     317  if( Test(type, (void*) 3) )
     318    c ++;
     319*/
     320#endif
     321
     322  setGMPFloatDigits( 10, 5 ); // Init global variables in mpr_complex.cc for gmp_float's... // Note that this seems also to be required for Z_2^m (and Zn?)!????
     323
     324
    296325  type = nRegister( n_long_C, ngcInitChar); assume( type == n_long_C );
    297326  if( Test(type) )
     
    301330  if( Test(type) )
    302331    c ++;
    303  
    304  
     332
     333#ifdef HAVE_RINGS
     334  type = nRegister( n_Z2m, nr2mInitChar); assume( type == n_Z2m );
     335  if( Test(type, (void*) 2) )
     336    c ++;
     337#endif
     338
     339
    305340#ifdef HAVE_RINGS
    306341  type = nRegister( n_Zn, nrnInitChar); assume( type == n_Zn );
    307342
    308   TODO(Frank, this seems to be a trivial BUG: the parameter 'm' is ignored now in nrnSetExp. Please fix someday!!!)
    309343  if( Test(type, (void*) 3) )
    310344    c ++;
    311345#endif
    312 
    313346 
    314347 
Note: See TracChangeset for help on using the changeset viewer.