Re: [Daqpp-forum] vmedaq analysis on 64bit ...
Brought to you by:
lacasta
From: Matej <mat...@ij...> - 2007-02-12 14:23:28
|
I have just realised that the problem lies in using unsigned long when=20 writing/reading data. On 32bit sizeof(int)=3Dsizeof(unsigned=20 int)=3Dsizeof(long)=3Dsizeof(unsigned long) whereas on 64 bit=20 sizeof(int)=3Dsizeof(unsigned int) but sizeof(unsigned long) is twice the=20 sizeof(unsigned int). Would find/replace script converting "unsigned long" to "unsigned int" on=20 vmedaq/ folder (recursively) solve the problem? Best, etc Matej On Monday 12 February 2007 09:10:24 Matej Bati=C4=8D 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 =E2=80=98gboolean do_send_command(Runmenu*)=E2=80= =99: > RunMenu.cc:32: error: cast from =E2=80=98void*=E2=80=99 to =E2=80=98int= =E2=80=99 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 precisi= on > MyModuleGuiConfig.cc:270: error: cast from 'void*' to 'int' loses precisi= on > MyModuleGuiConfig.cc: In static member function 'static void > MyModuleGuiConfig::onTxtChanged(GtkWidget*, MyModuleGuiConfig*)': > MyModuleGuiConfig.cc:345: error: cast from 'void*' to 'int' loses precisi= on > > > These errors are solved with casting to long instead of int: > //mat...@ij... > //int thing =3D (int)ptr_to_sth; > long thing =3D (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 =3D 4 > size of long =3D 4 > > but on 64bit: > size of int =3D 4 > size of long =3D 8 > > I expect that everything would work if the data were taken on 64bit machi= ne > 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=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > Daqpp-forum mailing list > Daq...@li... > https://lists.sourceforge.net/lists/listinfo/daqpp-forum |