Re: [Daqpp-forum] vmedaq analysis on 64bit ...
Brought to you by:
lacasta
From: Carlos L. <Car...@if...> - 2007-02-16 06:22:11
|
Hi Matej, Thanks for spottig that. I'll fix that. REgards, CArlos On Mon, 2007-02-12 at 15:22 +0100, Matej Batič wrote: > I have just realised that the problem lies in using unsigned long when > writing/reading data. On 32bit sizeof(int)=sizeof(unsigned > int)=sizeof(long)=sizeof(unsigned long) whereas on 64 bit > sizeof(int)=sizeof(unsigned int) but sizeof(unsigned long) is twice the > sizeof(unsigned int). > > Would find/replace script converting "unsigned long" to "unsigned int" on > vmedaq/ folder (recursively) solve the problem? > > Best, etc > Matej > > > On Monday 12 February 2007 09:10:24 Matej Batič wrote: > > I have tried to compile vmedaq on 64bit machine and it fails... > > > > The problem lies in (output from make command) > > > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/gui' > > RunMenu.cc: In function ‘gboolean do_send_command(Runmenu*)’: > > RunMenu.cc:32: error: cast from ‘void*’ to ‘int’ loses precision > > > > make[3]: Entering directory `/opt/brachy/daqpp-cvs/vmedaq/modules' > > MyModuleGuiConfig.cc: In static member function 'static void > > MyModuleGuiConfig::onBtnToggled(GtkWidget*, MyModuleGuiConfig*)': > > MyModuleGuiConfig.cc:269: error: cast from 'void*' to 'int' loses precision > > MyModuleGuiConfig.cc:270: error: cast from 'void*' to 'int' loses precision > > MyModuleGuiConfig.cc: In static member function 'static void > > MyModuleGuiConfig::onTxtChanged(GtkWidget*, MyModuleGuiConfig*)': > > MyModuleGuiConfig.cc:345: error: cast from 'void*' to 'int' loses precision > > > > > > These errors are solved with casting to long instead of int: > > //mat...@ij... > > //int thing = (int)ptr_to_sth; > > long thing = (long)ptr_to_sth; > > > > So, compiled code seems to work somehow. But simple observer class with > > only DataRecord implemented, where some variable is increased on each new > > data record (so data counting observer) tells me that there are exactly > > 5000 data records in the file with 10000 data records. The is to be > > expected, since on 32bit machine: > > size of int = 4 > > size of long = 4 > > > > but on 64bit: > > size of int = 4 > > size of long = 8 > > > > I expect that everything would work if the data were taken on 64bit machine > > and then analyzed on 64bit as well, but I have 32bit machine in my setup, > > but I would like to use (brand new and very fast :-) ) 4-processor 64bit > > computer for analysis. I also would not like to use 32bit precompiled > > binaries on 64bit, since I use shared libraries (ROOT mostly). > > > > So, any suggestion will be highly appreciated and forever praised :-) > > > > Best, etc, > > Matej > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Daqpp-forum mailing list > > Daq...@li... > > https://lists.sourceforge.net/lists/listinfo/daqpp-forum > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum -- ___________________________________________________________________ Carlos Lacasta ^^^^^^^^^^^^^^^ Inst. de Fisica Corpuscular (IFIC) Edificio Institutos de Investigacion P.O. Box 22085 E-46071 VALENCIA Spain Tel.: +34 96 354 3490 Fax.: +34 96 354 3488 Car...@if... ___________________________________________________________________ |