Back Midas Rome Roody Rootana
  Midas DAQ System, Page 136 of 136  Not logged in ELOG logo
ID Date Authorup Topic Subject
  426   06 Feb 2008 qinzeng pengForumrpc timeout, related to event_size and watch dog? need help

Stefan Ritt wrote:
Most likely you changed the maximal event size in midas.h, but you did not re-compile all programs.

Every time I changed midas.h or system header files, I did the re-compile with following procedure:
ipcrm
rm .*.SHM
mcleanup
make clean
make
su
make install

Stefan Ritt wrote:
The maximal event size goes into the size of the shared memory buffer, so all participating programs have to have the same setting, especially the mserver program.

Question here:
How to compile mserver seperately? I think make and make install under midas directory already did the job.


Stefan Ritt wrote:
update to the latest midas version, which is revision 4116

I used latest svn version, so I believe I'm using the latest version 4116.
svn co svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/meg/svn/midas/trunk midas
svn co svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/meg/svn/mxml/trunk mxml

I followed your instructions and did the following:
1)
svn co svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/meg/svn/midas/trunk midas
svn co svn+ssh://svn@savannah.psi.ch/afs/psi.ch/project/meg/svn/mxml/trunk mxml
2)
changed two parameters in midas.h
#define MAX_EVENT_SIZE 0xa00000 //0x400000 /**< maximum event size 4MB->10MB*/
#define BANKLIST_MAX 640 //64 /**< max # of banks in event, I need 356 */
3) make
su
make install
I don't know if I need compile mserver seperately.
4) running only two programs:
odbedit -s 10000000
./frontend

And I still got the same problem as before.

[qzpeng@phy2-dhcp140 simu]$ odbedit -s 10000000
[local:simu:S]/>ls
System
Programs
Experiment
Logger
Runinfo
Alarms
[local:simu:S]/>mkdir Equipment
12:44:12 [WFD Simu,INFO] Program WFD Simu on host phy2-dhcp140 started
[local:simu:S]/>start
Run number [1]:
Are the above parameters correct? ([y]/n/q):
Starting run #1
Run #1 started
[local:simu:R]/>stop
[midas.c:9231:rpc_client_call,ERROR] rpc timeout, routine = "rc_transition", host = "phy2-dhcp140.bu.edu"
Error: Unknown error 504 from client 'WFD Simu' on host phy2-dhcp140.bu.edu
[local:simu:R]/>


And I know that the run stopped after a while on frontend, but after the eroor message showed above. If I tried to stop again in odb after a while, it did stopped.
[local:simu:R]/>stop
Run #1 stopped


By the way, thanks for the quick response. I've been working on this for a couple of weeks and I am a newbie.

I also attached my frontend.cpp code and output of make with warning message but comilation completed. Thanks in advance.

In frontend.cpp I only use simulation and don't need any hardware realted issue or function calls but I jsut leave some of them there.
Attachment 1: frontend.cpp
/********************************************************************\

  Name:         frontend.c
  Created by:   Stefan Ritt

  Contents:     Experiment specific readout code (user part) of
                Midas frontend. This example simulates a "trigger
                event" and a "scaler event" which are filled with
                CAMAC or random data. The trigger event is filled
                with two banks (ADC0 and TDC0), the scaler event
                with one bank (SCLR).

  $Id: frontend.c 3384 2006-10-21 04:29:18Z amaudruz $

  Modifed by:   qp Jan/20/2008 for simulation
                Jan 21, add on ROOT
                method: keep old C functions in extern "C" {}
                        define new c++ funcions with ROOT
                read pulse shape from pulseTemplate#.txt
\********************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <time.h>

#include "midas.h"
//#include "mcstd.h"
#include "experim.h"

#include <string.h>

/* ROOT include */
#include "TSystem.h"
#include "TROOT.h"
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"

#include "WFDIndex.h"
WFDIndex *myWFDIndex;

/* for WFD Simu */
const INT n_fills=5000; /*** number of fills per segment from ODB ***/
const INT n_pulses_max=30;
INT n_pulses = 30; /*** number of muons decayed in one fill ***/ 
const int N_WFD=340;
const int N_SHAPE=2400;
const int N_ISLAND=24;
int       N_STEP = N_SHAPE/N_ISLAND;

int debug = 1;    // 0 for no message, 1 for message, 2 for verbose message

typedef struct {
  char  ADC[24];
  DWORD separator;
  DWORD time;
} ISLAND;

static ISLAND island, island_random;

ISLAND gIsland[N_WFD][n_fills*n_pulses_max+1];
INT    gCount[N_WFD];
float  gShape[N_WFD][N_SHAPE];
INT    gPeak[N_WFD];

TFile *f, *fout;
char   histname0[80], histname[80];

/* make frontend functions callable from the C framework */
#ifdef __cplusplus
extern "C" {
#endif

#include "mcstd.h"

/*-- Globals -------------------------------------------------------*/

/* The frontend name (client name) as seen by other MIDAS clients   */
char *frontend_name = "WFD Simu"; //"Sample Frontend";
/* The frontend file name, don't change it */
char *frontend_file_name = __FILE__;

/* frontend_loop is called periodically if this variable is TRUE    */
BOOL frontend_call_loop = TRUE;

/* a frontend status page is displayed with this frequency in ms */
INT display_period = 3000;

/* maximum event size produced by this frontend */
INT max_event_size = 5 * 1024 * 1024;

/* maximum event size for fragmented events (EQ_FRAGMENTED) */
  INT max_event_size_frag = 2* max_event_size;

/* buffer size to hold events */
  INT event_buffer_size = 2 * max_event_size;

/* number of channels */
#define N_ADC  4
#define N_TDC  4
#define N_SCLR 4

  /* CAMAC crate and slots */
#define CRATE      0
#define SLOT_IO   23
#define SLOT_ADC   1
#define SLOT_TDC   2
#define SLOT_SCLR  3

/*-- Function declarations -----------------------------------------*/

INT frontend_init();
INT frontend_exit();
INT begin_of_run(INT run_number, char *error);
INT end_of_run(INT run_number, char *error);
INT pause_run(INT run_number, char *error);
INT resume_run(INT run_number, char *error);
INT frontend_loop();

INT read_simu_event(char *pevent, INT off);
INT read_scaler_event(char *pevent, INT off);
void register_cnaf_callback(int debug);

INT poll_event(INT source, INT count, BOOL test);
INT interrupt_configure(INT cmd, INT source, POINTER_T adr);

/*-- Equipment list ------------------------------------------------*/

#undef USE_INT

EQUIPMENT equipment[] = {

   {"WFD_SIMU",              /* equipment name */
    {1, 0,                   /* event ID, trigger mask */
     "SYSTEM",               /* event buffer */
#ifdef USE_INT
     EQ_INTERRUPT,           /* equipment type */
#else
     EQ_POLLED,              /* equipment type */
#endif
     LAM_SOURCE(0, 0xFFFFFF),        /* event source crate 0, all stations */
     "MIDAS",                /* format */
     TRUE,                   /* enabled */
     RO_RUNNING, // |            /* read only when running */
     //     RO_ODB,                 /* and update ODB */
     5000,                     /* poll for 500ms */
     0,                      /* stop run after this event limit */
     0,                      /* number of sub events */
     0,                      /* don't log history */
     "", "", "",},
    read_simu_event,         /* readout routine */
    },

   {"Scaler",                /* equipment name */
    {2, 0,                   /* event ID, trigger mask */
     "SYSTEM",               /* event buffer */
     EQ_PERIODIC | EQ_MANUAL_TRIG,   /* equipment type */
     0,                      /* event source */
     "MIDAS",                /* format */
     TRUE,                   /* enabled */
     RO_RUNNING | RO_TRANSITIONS |   /* read when running and on transitions */
     RO_ODB,                 /* and update ODB */
     10000,                  /* read every 10 sec */
     0,                      /* stop run after this event limit */
     0,                      /* number of sub events */
     0,                      /* log history */
     "", "", "",},
    read_scaler_event,       /* readout routine */
   },

   {""}
};

#ifdef __cplusplus
}
#endif

INT wfd_get_shape(void);
INT wfd_get_hist(void);
double wfd_get_random(int sn, int choice);

/********************************************************************\
              Callback routines for system transitions

  These routines are called whenever a system transition like start/
  stop of a run occurs. The routines are called on the following
  occations:

  frontend_init:  When the frontend program is started. This routine
                  should initialize the hardware.

  frontend_exit:  When the frontend program is shut down. Can be used
                  to releas any locked resources like memory, commu-
                  nications ports etc.

  begin_of_run:   When a new run is started. Clear scalers, open
                  rungates, etc.

  end_of_run:     Called on a request to stop a run. Can send
                  end-of-run event and close run gates.

  pause_run:      When a run is paused. Should disable trigger events.

  resume_run:     When a run is resumed. Should enable trigger events.
\********************************************************************/

/*-- Frontend Init -------------------------------------------------*/

INT frontend_init()
{
  /* hardware initialization */

  cam_init();
  cam_crate_clear(CRATE);
  cam_crate_zinit(CRATE);

  /* enable LAM in IO unit */
  camc(CRATE, SLOT_IO, 0, 26);

  /* enable LAM in crate controller */
  cam_lam_enable(CRATE, SLOT_IO);

  /* reset external LAM Flip-Flop */
  camo(CRATE, SLOT_IO, 1, 16, 0xFF);
  camo(CRATE, SLOT_IO, 1, 16, 0);

  /* register CNAF functionality from cnaf_callback.c with debug output */
  register_cnaf_callback(1);

  /* print message and return FE_ERR_HW if frontend should not be started */

  wfd_get_hist();

  wfd_get_shape();

  myWFDIndex = new WFDIndex();

   return SUCCESS;
}

/*-- Frontend Exit -------------------------------------------------*/

INT frontend_exit()
{
   return SUCCESS;
}

/*-- Begin of Run --------------------------------------------------*/

INT begin_of_run(INT run_number, char *error)
{
   /* put here clear scalers etc. */
  island.ADC[0] = 5;
  island.ADC[1] = 6;
  island.ADC[2] = 7;
  island.ADC[3] = 5;
  island.ADC[4] = 7;
  island.ADC[5] = 20;
  island.ADC[6] = 30;
  island.ADC[7] = 50;
  island.ADC[8] = 90;
  island.ADC[9] = 120;
  island.ADC[10] = 150;
  island.ADC[11] = 200;
  island.ADC[12] = 165;
  island.ADC[13] = 130;
  island.ADC[14] = 110;
  island.ADC[15] = 90;
  island.ADC[16] = 30;
  island.ADC[17] = 10;
  island.ADC[18] = 7;
  island.ADC[19] = 4;
  island.ADC[20] = 6;
  island.ADC[21] = 5;
  island.ADC[22] = 3;
  island.ADC[23] = 6;
  //island.ADC[24] = 7;
  //island.ADC[25] = 6;
  //island.ADC[26] = 6;
  //island.ADC[27] = 7;   
  //island.ADC[28] = 5;
  //island.ADC[29] = 5;
  //island.ADC[30] = 6;
  //island.ADC[31] = 5;

  island.separator = 0x0;
  island.time = 0x00010001;

  //  wfd_get_hist();

   return SUCCESS;
}

INT wfd_get_hist(void)
{
  gROOT->Reset();

  char filename0[] = "IslandParameters";
  char runname[] = "57140-57170"; 
... 338 more lines ...
Attachment 2: make-output.txt
[qzpeng@phy2-dhcp140 midas]$ make
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/midas.o src/midas.c
src/midas.c: In function ¡Æbm_open_buffer¡Ç:
src/midas.c:4020: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/midas.c: In function ¡Ærpc_server_connect¡Ç:
src/midas.c:8259: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/midas.c:8261: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/midas.c:8263: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/midas.c:8376: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
src/midas.c:8378: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
src/midas.c:8380: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
src/midas.c: In function ¡Ærpc_register_server¡Ç:
src/midas.c:10533: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/midas.c: In function ¡Ærpc_server_accept¡Ç:
src/midas.c:11230: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
src/midas.c:11239: warning: pointer targets in passing argument 3 of ¡Ægetpeername¡Ç differ in signedness
src/midas.c: In function ¡Ærpc_client_accept¡Ç:
src/midas.c:11493: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/system.o src/system.c
src/system.c: In function ¡Æss_suspend_init_ipc¡Ç:
src/system.c:2948: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/system.c: In function ¡Æss_suspend¡Ç:
src/system.c:3416: warning: pointer targets in passing argument 6 of ¡Ærecvfrom¡Ç differ in signedness
src/system.c:3443: warning: pointer targets in passing argument 6 of ¡Ærecvfrom¡Ç differ in signedness
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/mrpc.o src/mrpc.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/odb.o src/odb.c
src/odb.c: In function ¡Ædb_open_database¡Ç:
src/odb.c:891: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/odb.c: In function ¡Ædb_lock_database¡Ç:
src/odb.c:1441: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/ybos.o src/ybos.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/ftplib.o src/ftplib.c
src/ftplib.c: In function ¡Æftp_data¡Ç:
src/ftplib.c:288: warning: pointer targets in passing argument 3 of ¡Ægetsockname¡Ç differ in signedness
src/ftplib.c:310: warning: pointer targets in passing argument 3 of ¡Æaccept¡Ç differ in signedness
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/mxml.o ../mxml/mxml.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/cnaf_callback.o src/cnaf_callback.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/history.o src/history.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/alarm.o src/alarm.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/elog.o src/elog.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/strlcpy.o ../mxml/strlcpy.c
rm -f linux/lib/libmidas.a
ar -crv linux/lib/libmidas.a linux/lib/midas.o linux/lib/system.o linux/lib/mrpc.o linux/lib/odb.o linux/lib/ybos.o linux/lib/ftplib.o linux/lib/mxml.o linux/lib/cnaf_callback.o linux/lib/history.o linux/lib/alarm.o linux/lib/elog.o linux/lib/strlcpy.o
a - linux/lib/midas.o
a - linux/lib/system.o
a - linux/lib/mrpc.o
a - linux/lib/odb.o
a - linux/lib/ybos.o
a - linux/lib/ftplib.o
a - linux/lib/mxml.o
a - linux/lib/cnaf_callback.o
a - linux/lib/history.o
a - linux/lib/alarm.o
a - linux/lib/elog.o
a - linux/lib/strlcpy.o
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/mana.o src/mana.c
g++ -DUSE_ROOT -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -pthread -m32 -I/usr/root/include -o linux/lib/rmana.o src/mana.c
cc -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/mfe.o src/mfe.c
src/mfe.c: In function ¡Æscheduler¡Ç:
src/mfe.c:1869: warning: pointer targets in passing argument 5 of ¡Ædb_get_value¡Ç differ in signedness
src/mfe.c:2042: warning: pointer targets in passing argument 5 of ¡Ædb_get_value¡Ç differ in signedness
src/mfe.c:2051: warning: pointer targets in passing argument 5 of ¡Ædb_get_value¡Ç differ in signedness
g++ -Dextname -DMANA_LITE -c -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/lib/fal.o src/fal.c
src/fal.c:106: warning: non-local variable ¡Æ<anonymous struct> out_info¡Ç uses anonymous type
src/fal.c: In function ¡ÆINT midas_log_open(LOG_CHN*, INT)¡Ç:
src/fal.c:1194: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/fal.c: In function ¡ÆINT dump_log_open(LOG_CHN*, INT)¡Ç:
src/fal.c:1582: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/fal.c: In function ¡ÆINT ascii_log_open(LOG_CHN*, INT)¡Ç:
src/fal.c:1803: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/fal.c: At global scope:
src/fal.c:3064: warning: non-local variable ¡Æ<anonymous struct> eb¡Ç uses anonymous type
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mserver src/mserver.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mhttpd src/mhttpd.c src/mgd.c linux/lib/libmidas.a -lutil -lpthread -lz -lm
g++ -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mlogger src/mlogger.c linux/lib/libmidas.a -L/usr/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic -Wl,-rpath,/usr/root/lib  -lutil -lpthread -lz
src/mlogger.c: In function ¡ÆINT midas_log_open(LOG_CHN*, INT)¡Ç:
src/mlogger.c:1094: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/mlogger.c: In function ¡ÆINT dump_log_open(LOG_CHN*, INT)¡Ç:
src/mlogger.c:1530: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/mlogger.c: In function ¡ÆINT ascii_log_open(LOG_CHN*, INT)¡Ç:
src/mlogger.c:1750: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/odbedit src/odbedit.c src/cmdedit.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mtape utils/mtape.c linux/lib/libmidas.a -lutil -lpthread -lz
utils/mtape.c: In function ¡Ætape_dir¡Ç:
utils/mtape.c:84: warning: dereferencing type-punned pointer will break strict-aliasing rules
utils/mtape.c:87: warning: dereferencing type-punned pointer will break strict-aliasing rules
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mhist utils/mhist.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mstat utils/mstat.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mcnaf utils/mcnaf.c drivers/camac/camacrpc.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mdump utils/mdump.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/lazylogger src/lazylogger.c linux/lib/libmidas.a -lutil -lpthread -lz
g++ -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mhdump utils/mhdump.cxx
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mchart utils/mchart.c linux/lib/libmidas.a -lutil -lpthread -lz
cp -f utils/stripchart.tcl linux/bin/. 
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/webpaw utils/webpaw.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/odbhist utils/odbhist.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/melog utils/melog.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/mlxspeaker utils/mlxspeaker.c linux/lib/libmidas.a -lutil -lpthread -lz
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_ROOT -pthread -m32 -I/usr/root/include -DHAVE_ZLIB -DOS_LINUX -fPIC -Wno-unused-function -o linux/bin/dio utils/dio.c
[qzpeng@phy2-dhcp140 midas]$ 
  834   06 Sep 2012 shaunBug Report"cannot find recent history file"
Hi, when attempting to access a history window the following message is repeated
over and over in the MIDAS message log:

Thu Sep 6 11:37:16 2012 [mhttpd,ERROR] [history.c:886:hs_count_events,ERROR]
cannot find recent history file
Thu Sep 6 11:38:16 2012 [mhttpd,ERROR] [history.c:886:hs_count_events,ERROR]
cannot find recent history file
Thu Sep 6 11:38:16 2012 [mhttpd,ERROR] [history.c:886:hs_count_events,ERROR]
cannot find recent history file
Thu Sep 6 11:39:16 2012 [mhttpd,ERROR] [history.c:886:hs_count_events,ERROR]
cannot find recent history file
Thu Sep 6 11:39:16 2012 [mhttpd,ERROR] [history.c:886:hs_count_events,ERROR]
cannot find recent history file

It appears to be related to attempting to display a history graph that includes
some time periods that have no recorded history data. When I zoom in so that the
whole graph has data the error message goes away.

The graph displays fine either way, so this error message seems useless. Is
there a way to suppress it?

Thanks
Shaun
  852   09 Jan 2013 wenliang liBug ReportOutputting ADC and TDC data into ROOT tree with the MIDAS SVN Revision:5347.
Dear Midas Experts

I am Wenliang Li, a graduate student from University of Regina. Our group have
encountered some difficulty on outputting ADC and TDC data into ROOT tree with
the MIDAS SVN Revision: 5347.

Our Linux Distribution: Scientific Linux release 6.0 (Carbon)
ROOT Version:           ROOT 5.28
gcc version:            g++ (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)
kernel version:         2.6.32-279.19.1.el6.i686


I am using the given example $MIDASSYS/examples/experiment to generate some
data, and the issue is that the analyzer refuses to turn on the  ADC0 and TDC0
back switches. 

If the ADC and TDC banks are switched off, the analyzer will successfully output
the histograms but not the ROOT tree, and the Trigger and Scaler root trees are
completely empty.

With the same example experiment: $MIDASSYS/examples/experiment, this issue does
not occur on MIDAS SVN Revision: 4309.


The output error messages in the analyzer window are shown if the ADC and TDC
banks are switched to 1:

*************************
Connect to experiment ...OK
Root server listening on port 9090...
Loading previous online histos from /home/billlee/experiment/test_exp/last.root
Running analyzer online. Stop with "!"
Error in <TTree::Branch>: The pointer specified for ADC0 is not of a class known
to ROOT and (null) is not a known class
ROOT TTree rebooked
Error in <TTree::Branch>: The pointer specified for ADC0 is not of a class known
to ROOT and (null) is not a known class
Error in <TTree::Branch>: The pointer specified for TDC0 is not of a class known
to ROOT and (null) is not a known class
ROOT TTree rebooked
***********************
***************************



If I analyze the data with TDC and ADC bank switched set to be 1 :
$ analyzer -i runXXXXX.mid -o runXXXXX.root

I get the following error messages:


************************************************************************
************************************************************************


Root server listening on port 9090...
Running analyzer offline. Stop with "!"
Error in <TTree::Branch>: The pointer specified for ADC0 is not of a class known
to ROOT and (null) is not a known class
Error in <TTree::Branch>: The pointer specified for TDC0 is not of a class known
to ROOT and (null) is not a known class
Set run number 1 in ODB
Load ODB from run 1...OK

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================

Thread 2 (Thread 0x7f46c6853700 (LWP 10808)):
#0  0x0000003b63a0e84d in accept () from /lib64/libpthread.so.0
#1  0x0000003b64e370f4 in TUnixSystem::AcceptConnection(int) () from
/usr/lib64/root/libCore.so.5.28
#2  0x0000003b6647849c in TServerSocket::Accept(unsigned char) () from
/usr/lib64/root/libNet.so.5.28
#3  0x000000000040c50e in root_socket_server (arg=<value optimized out>) at
src/mana.c:5275
#4  0x00007f46c8dc513a in TThread::Function(void*) () from
/usr/lib64/root/libThread.so.5.28
#5  0x0000003b63a07851 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003b62ee811d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f46c8b94720 (LWP 10800)):
#0  0x0000003b62eabfdd in waitpid () from /lib64/libc.so.6
#1  0x0000003b62e3e899 in do_system () from /lib64/libc.so.6
#2  0x0000003b62e3ebd0 in system () from /lib64/libc.so.6
#3  0x0000003b64e3da31 in TUnixSystem::StackTrace() () from
/usr/lib64/root/libCore.so.5.28
#4  0x0000003b64e3d3f3 in TUnixSystem::DispatchSignals(ESignals) () from
/usr/lib64/root/libCore.so.5.28
#5  <signal handler called>
#6  0x000000000041245f in TIter (file=<value optimized out>,
pevent=0x7f46c5281010, par=0x665180) at /usr/include/root/TCollection.h:148
#7  write_event_ttree (file=<value optimized out>, pevent=0x7f46c5281010,
par=0x665180) at src/mana.c:2872
#8  0x0000000000412a4c in process_event (par=0x665180, pevent=0x7f46c5281010) at
src/mana.c:3195
#9  0x0000000000412e42 in analyze_run (run_number=1,
input_file_name=0x7fff4d738340 "run00001.mid", output_file_name=<value optimized
out>) at src/mana.c:4178
#10 0x0000000000413372 in loop_runs_offline () at src/mana.c:4366
#11 0x0000000000413ba5 in main (argc=<value optimized out>, argv=<value
optimized out>) at src/mana.c:5579
===========================================================


The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#6  0x000000000041245f in TIter (file=<value optimized out>,
pevent=0x7f46c5281010, par=0x665180) at /usr/include/root/TCollection.h:148
#7  write_event_ttree (file=<value optimized out>, pevent=0x7f46c5281010,
par=0x665180) at src/mana.c:2872
#8  0x0000000000412a4c in process_event (par=0x665180, pevent=0x7f46c5281010) at
src/mana.c:3195
#9  0x0000000000412e42 in analyze_run (run_number=1,
input_file_name=0x7fff4d738340 "run00001.mid", output_file_name=<value optimized
out>) at src/mana.c:4178
#10 0x0000000000413372 in loop_runs_offline () at src/mana.c:4366
#11 0x0000000000413ba5 in main (argc=<value optimized out>, argv=<value
optimized out>) at src/mana.c:5579
===========================================================


[midas.c:1973:,ERROR] cm_disconnect_experiment not called at end of program

**********************************************************************************************
**********************************************************************************************







I wonder if there is any program syntax change between MIDAS Version 4309 and
5347, and are there any simple working setup example which can output root tree
with the newest version of MIDAS?
 
In the end, I would like to thank the continuous effort from Triumf and PSI on
developing MIDAS, it is a pleasure to work with.

Many thanks
Bill 
  849   18 Dec 2012 xelapForummidas installation on SL6.3
I try to do make in zlib folder and got  this
cc -O -o example example.o -L. -lz
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches
non-TLS reference in ./libz.a(gzio.o)
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [example] Error 1

Do I miss any package to be installed?
Thanks in advance,
Xelap
ELOG V3.1.4-2e1708b5