Back Midas Rome Roody Rootana
  Midas DAQ System, Page 56 of 142  Not logged in ELOG logo
ID Date Author Topicdown Subject
  622   31 Aug 2009 Exaos LeeForumLink error of "mcnaf"
I repeated the link error again. I also found the almost all sources located in "driver/camac/" using "cam_op()" but not "camop()". Please see the grep result below:
drivers/camac/camaclx.c:760:INLINE void cam_op()
drivers/camac/camacnul.c:200:INLINE void cam_op()
drivers/camac/camacrpc.c:563:void cam_op()
drivers/camac/cc7700pci.c:744:INLINE void cam_op()
drivers/camac/ces2117.c:227:void cam_op()
drivers/camac/ces8210.c:553:void cam_op(void)
drivers/camac/ces8210.c:576:    cam_op();
drivers/camac/ces8210.c:625:    cam_op();
drivers/camac/dsp004.c:692:void cam_op()
drivers/camac/hyt1331.c:1125:INLINE void cam_op()
drivers/camac/jorway73a.c:563:INLINE void cam_op()
drivers/camac/kcs2926.c:618:INLINE void cam_op()
drivers/camac/kcs2927.c:677:INLINE void cam_op()
drivers/camac/wecc32.c:554:INLINE void cam_op()

I also found why the default Makefile can pass away this problem. I found the "make" using the following command to compile the "mcnaf":
cc -g -O3 -Wall -Wuninitialized -Iinclude -Idrivers -I../mxml -Llinux/lib -DINCLUDE_FTPLIB   -D_LARGEFILE64_SOURCE -DHAVE_MYSQL -I/usr/include/mysql -DHAVE_ODBC -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 -lodbc -lz
I try to re-implement the link error again. So I wrote some test code.

1. anullf.h
#ifndef _ANULLF_H_
#define _ANULLF_H_ 1

#define EXTERNAL extern

#if defined( _MSC_VER )
#define INLINE __inline
#elif defined(__GNUC__)
#define INLINE __inline__
#else
#define INLINE
#endif
/* make functions under WinNT dll exportable */
#if defined(_MSC_VER) && defined(MIDAS_DLL)
#define EXPRT __declspec(dllexport)
#else
#define EXPRT
#endif

EXTERNAL INLINE void EXPRT camop() {  };

#endif

2. ma_1.c
#include "anullf.h"

void cam_op() {}

3. ma.c
#include "anullf.h"
#include <stdio.h>

int main(int argc, char** argv)
{
  camop();
}

Then, only compiling as below can pass:
$ gcc -O -o ma ma_1.c ma.c
If you remove the option "-O", compiling immediately fails in a link error. Whether you compile into objects then link them or just compile them together, you can pass with option "-O" or the similar options. It is because the compile could solve linking to a dummy function automatically with option "-O".

Anyway, we should fix this no matter changing the "mcstd.h" or codes located in "driver/camac/".
  623   31 Aug 2009 Exaos LeeForumWhy should we use "INLINE" here?
There are many "INLINE" definitions in "include/*.h". Both GNU C and C99 permit using inline functions. I still wonder why. Smile
  624   01 Sep 2009 Jimmy NgaiForumTimeout during run transition
Dear All,

I'm using SL5 and MIDAS rev 4528. Occasionally, when I stop a run in odbedit, 
a timeout would occur: 
[midas.c:9496:rpc_client_call,ERROR] rpc timeout after 121 sec, routine 
= "rc_transition", host = "computerB", connection closed
Error: Unknown error 504 from client 'Frontend' on host computerB

This error seems to be random without any reason or pattern. After this error 
occurs, I cannot start or stop any run. Sometime restarting MIDAS can bring 
the system working again, but sometime not.

Another transition timeout occurs after I change any ODB value using the web 
interface:
[midas.c:8291:rpc_client_connect,ERROR] timeout on receive remote computer 
info: 
[midas.c:3642:cm_transition,ERROR] cannot connect to client "Frontend" on host 
computerB, port 36255, status 503
Error: Cannot connect to client 'Frontend'

This error is reproducible: start run -> change ODB value within webpage -> 
stop run -> timeout!

Any idea?

Thanks,
Jimmy
  625   03 Sep 2009 Stefan RittForumTimeout during run transition
> Dear All,
> 
> I'm using SL5 and MIDAS rev 4528. Occasionally, when I stop a run in odbedit, 
> a timeout would occur: 
> [midas.c:9496:rpc_client_call,ERROR] rpc timeout after 121 sec, routine 
> = "rc_transition", host = "computerB", connection closed
> Error: Unknown error 504 from client 'Frontend' on host computerB
> 
> This error seems to be random without any reason or pattern. After this error 
> occurs, I cannot start or stop any run. Sometime restarting MIDAS can bring 
> the system working again, but sometime not.
> 
> Another transition timeout occurs after I change any ODB value using the web 
> interface:
> [midas.c:8291:rpc_client_connect,ERROR] timeout on receive remote computer 
> info: 
> [midas.c:3642:cm_transition,ERROR] cannot connect to client "Frontend" on host 
> computerB, port 36255, status 503
> Error: Cannot connect to client 'Frontend'
> 
> This error is reproducible: start run -> change ODB value within webpage -> 
> stop run -> timeout!

A few hints for debugging:

- do the run stop via odbedit and the "-v" flag, like

[local:Online:R]/> stop -v

then you see which computer is contacted when.

- Then put some debugging code into your front-end end_of_run() routine at the 
beginning and the end of that routine, so you see when it's executed and how long 
this takes. If you do lots of things in your EOR routine, this could maybe cause a 
timeout.

- Then make sure that cm_yield() in mfe.c is called periodically by putting some 
debugging code there. This function checks for any network message, such as the 
stop command from odbedit. If you trigger event readout has an endless loop for 
example, cm_yield() will never be called and any transition will timeout.

- Make sure that not 100% CPU is used on your frontend. Some OSes have problems 
handling incoming network connections if the CPU is completely used of if 
input/output operations are too heavy.

- Stefan
  626   03 Sep 2009 Stefan RittForumWhy should we use "INLINE" here?

Exaos Lee wrote:
There are many "INLINE" definitions in "include/*.h". Both GNU C and C99 permit using inline functions. I still wonder why. Smile


The INLINE statements are a relict from times where a subroutine call was in the order of a few microseconds. This was when you probably were pretty young, and we had MS DOS PCs running at 66 MHz and 640 kB (not MB!) of memory. At that time, inlining the CAMAC functions gave a 50% speedup, believe it or not! I guess now this is completely obsolete, plus modern compilers can do inlining automatically if they realize that there is a benefit. So we should remove all the inline business. We plan some major rework later in September, so I will include that on the todo list there.

- Stefan
  641   07 Sep 2009 Exaos LeeForumdeprecated conversion from string constant to ‘char*’
I encountered many warning while building MIDAS (svn r4556). Please see the
attached log file. Most of them are caused by type conversion from string to
"char*".
Though I can ignore all the warning without any problem, I still hate to see
them. :-)
Attachment 1: make-warnings.log
Scanning dependencies of target midas-static
[  1%] Building C object CMakeFiles/midas-static.dir/src/ftplib.c.o
[  3%] Building C object CMakeFiles/midas-static.dir/src/midas.c.o
[  5%] Building C object CMakeFiles/midas-static.dir/src/system.c.o
[  7%] Building C object CMakeFiles/midas-static.dir/src/mrpc.c.o
[  9%] Building C object CMakeFiles/midas-static.dir/src/odb.c.o
[ 11%] Building C object CMakeFiles/midas-static.dir/src/ybos.c.o
[ 13%] Building C object CMakeFiles/midas-static.dir/src/history.c.o
[ 15%] Building C object CMakeFiles/midas-static.dir/src/alarm.c.o
[ 17%] Building C object CMakeFiles/midas-static.dir/src/elog.c.o
[ 19%] Building C object CMakeFiles/midas-static.dir/opt/DAQ/bot/mxml/mxml.c.o
[ 21%] Building C object CMakeFiles/midas-static.dir/opt/DAQ/bot/mxml/strlcpy.c.o
[ 23%] Building CXX object CMakeFiles/midas-static.dir/src/history_odbc.cxx.o
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
Linking CXX static library lib/libmidas.a
[ 23%] Built target midas-static
Scanning dependencies of target dio
[ 25%] Building C object CMakeFiles/dio.dir/utils/dio.c.o
Linking C executable bin/dio
[ 25%] Built target dio
Scanning dependencies of target fal
[ 25%] Generating fal.o
[ 26%] Built target fal
Scanning dependencies of target hmana
[ 26%] Generating hmana.o
[ 28%] Built target hmana
Scanning dependencies of target lazylogger
[ 30%] Building C object CMakeFiles/lazylogger.dir/src/lazylogger.c.o
Linking C executable bin/lazylogger
[ 30%] Built target lazylogger
Scanning dependencies of target mana
[ 30%] Generating mana.o
[ 32%] Built target mana
Scanning dependencies of target mchart
[ 34%] Building C object CMakeFiles/mchart.dir/utils/mchart.c.o
Linking C executable bin/mchart
[ 34%] Built target mchart
Scanning dependencies of target mcnaf
[ 36%] Building C object CMakeFiles/mcnaf.dir/utils/mcnaf.c.o
[ 38%] Building C object CMakeFiles/mcnaf.dir/drivers/camac/camacrpc.c.o
Linking C executable bin/mcnaf
[ 38%] Built target mcnaf
Scanning dependencies of target mdump
[ 40%] Building C object CMakeFiles/mdump.dir/utils/mdump.c.o
Linking C executable bin/mdump
[ 40%] Built target mdump
Scanning dependencies of target melog
[ 42%] Building C object CMakeFiles/melog.dir/utils/melog.c.o
Linking C executable bin/melog
[ 42%] Built target melog
Scanning dependencies of target mfe
[ 42%] Generating mfe.o
[ 44%] Built target mfe
Scanning dependencies of target mh2sql
[ 46%] Building CXX object CMakeFiles/mh2sql.dir/utils/mh2sql.cxx.o
/opt/DAQ/bot/midas/utils/mh2sql.cxx: In function ‘int main(int, char**)’:
/opt/DAQ/bot/midas/utils/mh2sql.cxx:144: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mh2sql.cxx:144: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mh2sql.cxx:144: warning: deprecated conversion from string constant to ‘char*’
[ 48%] Building CXX object CMakeFiles/mh2sql.dir/src/history_odbc.cxx.o
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
Linking CXX executable bin/mh2sql
[ 48%] Built target mh2sql
Scanning dependencies of target mhdump
[ 50%] Building CXX object CMakeFiles/mhdump.dir/utils/mhdump.cxx.o
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/utils/mhdump.cxx:91: warning: deprecated conversion from string constant to ‘char*’
Linking CXX executable bin/mhdump
[ 50%] Built target mhdump
Scanning dependencies of target mhist
[ 51%] Building C object CMakeFiles/mhist.dir/utils/mhist.c.o
Linking C executable bin/mhist
[ 51%] Built target mhist
Scanning dependencies of target mhttpd
[ 53%] Building C object CMakeFiles/mhttpd.dir/src/mhttpd.c.o
[ 55%] Building C object CMakeFiles/mhttpd.dir/src/mgd.c.o
Linking CXX executable bin/mhttpd
[ 55%] Built target mhttpd
Scanning dependencies of target midas-shared
[ 57%] Building C object CMakeFiles/midas-shared.dir/src/ftplib.c.o
[ 59%] Building C object CMakeFiles/midas-shared.dir/src/midas.c.o
[ 61%] Building C object CMakeFiles/midas-shared.dir/src/system.c.o
[ 63%] Building C object CMakeFiles/midas-shared.dir/src/mrpc.c.o
[ 65%] Building C object CMakeFiles/midas-shared.dir/src/odb.c.o
[ 67%] Building C object CMakeFiles/midas-shared.dir/src/ybos.c.o
[ 69%] Building C object CMakeFiles/midas-shared.dir/src/history.c.o
[ 71%] Building C object CMakeFiles/midas-shared.dir/src/alarm.c.o
[ 73%] Building C object CMakeFiles/midas-shared.dir/src/elog.c.o
[ 75%] Building C object CMakeFiles/midas-shared.dir/opt/DAQ/bot/mxml/mxml.c.o
[ 76%] Building C object CMakeFiles/midas-shared.dir/opt/DAQ/bot/mxml/strlcpy.c.o
[ 78%] Building CXX object CMakeFiles/midas-shared.dir/src/history_odbc.cxx.o
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:95: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:116: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/history_odbc.cxx:136: warning: deprecated conversion from string constant to ‘char*’
Linking CXX shared library lib/libmidas.so
[ 78%] Built target midas-shared
Scanning dependencies of target mlogger
[ 80%] Building CXX object CMakeFiles/mlogger.dir/src/mlogger.c.o
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:81: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c: In function ‘INT ftp_open(char*, FTP_CON**)’:
/opt/DAQ/bot/midas/src/mlogger.c:952: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:956: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:960: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:960: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:965: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:970: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c: In function ‘EVENT_DEF* db_get_event_definition(short int)’:
/opt/DAQ/bot/midas/src/mlogger.c:1339: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:1341: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:1343: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:1345: warning: deprecated conversion from string constant to ‘char*’
/opt/DAQ/bot/midas/src/mlogger.c:1347: warning: deprecated conversion from string constant to ‘char*’
... 75 more lines ...
  642   09 Sep 2009 Jimmy NgaiForumRetrieve start/stop time in offline
Hi All,

I set "/Analyzer/ODB Load" to true and analyzed a run in offline mode. After
that, I found the start time and stop time in /RunInfo did not reflect the
correct time as in online. How do I retrieve the correct start/stop time from
the ODB in offline mode?

Thanks!

Jimmy
  643   10 Sep 2009 Stefan RittForumRetrieve start/stop time in offline
> I set "/Analyzer/ODB Load" to true and analyzed a run in offline mode. After
> that, I found the start time and stop time in /RunInfo did not reflect the
> correct time as in online. How do I retrieve the correct start/stop time from
> the ODB in offline mode?

Most trees in the ODB are not loaded with "/Analyzer/ODB Load", since you might 
want to have the start/stop time of the offline analysis there for example 
(although I agree that the online start/stop time is more interesting). So you 
have several options:

- modify mana.c. There is a function odb_load(), which first locks the whole ODB 
and then unprotects "/Experiment/Run Parameters" for example. Just add three more 
lines for "/Runinfo".

- write a run summary when running online. After each run, write a summary with 
start/stop time, number of events, settings etc. into some file. I usually do this 
in the EOR routine of the online analyzer and write directly into a CSV file which 
I can import directly into Excel. There I can make filtering depending on certain 
parameters, like show me all runs with more than x events where setting y was 10.

- extract the ODB from the .mid file with "odbhist -e filename.mid" and look into 
that.

- The time stamp of each event is in UNIX time form (seconds since 1.1.1970), so 
you now exactly when each event was recorded.

Hope one of this helps...

- Stefan
  646   27 Sep 2009 Konstantin OlchanskiForumdeprecated conversion from string constant to ‘char*’
> I encountered many warning while building MIDAS (svn r4556). Please see the
> attached log file. Most of them are caused by type conversion from string to
> "char*".
> Though I can ignore all the warning without any problem, I still hate to see
> them. :-)

There is no "type conversions". The compiler is whining about code like this:

/* data type names */
static char *tid_name[] = {
   "NULL",
   "BYTE",
   ...

I guess we should keep the compiler happy and make them "static const char*".

BTW, my compiler is SL5.2 gcc-4.1.2 and it does not complain. What's your compiler?

K.O.
  647   27 Sep 2009 Exaos LeeForumdeprecated conversion from string constant to ‘char*’
> There is no "type conversions". The compiler is whining about code like this:
> 
> /* data type names */
> static char *tid_name[] = {
>    "NULL",
>    "BYTE",
>    ...
> 
> I guess we should keep the compiler happy and make them "static const char*".
> 
> BTW, my compiler is SL5.2 gcc-4.1.2 and it does not complain. What's your compiler?
> 
> K.O.

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.4-2' --with-
bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-
languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch -
-enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-
gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --
enable-mpfr --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --
host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.4 (Debian 4.3.4-2)
  664   19 Oct 2009 Exaos LeeForumIt' better to fix this warnings
> There is no "type conversions". The compiler is whining about code like this:
>
> /* data type names */
> static char *tid_name[] = {
> "NULL",
> "BYTE",
> ...
>
> I guess we should keep the compiler happy and make them "static const char*".
>
> BTW, my compiler is SL5.2 gcc-4.1.2 and it does not complain. What's your compiler?
>
> K.O.

When I use "make" with odbedit, the generated "experim.h" also contains such codes as:
#define EXPCVADC_COMMON_STR(_name) char *_name[] = {\
"[.]",\
...
This will cause "type conversion" warnings. I hope that "odbedit" can generate codes like this:
#define EXPCVADC_COMMON_STR(_name) const char *_name[] = {\
"[.]",\
...
In fact, "const char*" is enough to suppress the warnings. Using "const char* foo=\"blarblar\"" is a good habit because it can avoid the following bugs:
char *s = "whatever";
...
strcpy(s, "Hello, this is a string longer than the initial one.");
The above code can successfully generate an executable, but it will encounter segmentation fault while executing. "const char*" means we should not change the variable in other place, which is important to suppress bugs.

Another problem, if I change the "experim.h" as I wished, new warnings appeared when the compiler parsing the following code:
status = db_create_record(hDB, 0, set_str, strcomb(expcvadc_settings_str));
Warning:
cvadcfe.c: In function ‘frontend_init’:
cvadcfe.c:144: warning: passing argument 1 of ‘strcomb’ from incompatible pointer type
  665   20 Oct 2009 Peter SimpsonForumMidas in linux
Hi,
I'm new to both Linux and Midas and having trouble installing the programme - 
the install file suggeats that I should have a directory:

midas/unix

but this doesn't appear.

Also, when running the "make" for the library (step 3 of the installation), I 
don't see the directory "zlib.a", but there is a "libz.a" and I note the 
original .tar file has no libz.a file in it. Is this a typo on the 
installation?
The terminal window at this point displays:

undefined reference to `errno'
make: ***[example] Error 1

Further help will no doubt be required as I've used windows throughout my 
research and now looking to learn how to use linux. Any help greatly 
appreciated. Thanks!
  669   06 Nov 2009 Jimmy NgaiForumRun multiple frontend on the same host
Dear All,

I want to run two frontend programs (one for trigger and one for slow control)
concurrently on the same computer, but I failed. The second frontend said: 

Semaphore already present
 There is another process using the semaphore.
 Or a process using the semaphore exited abnormally.
 In That case try to manually release the semaphore with:
   ipcrm sem XXX.

The two frontends are connected to the same experiment. Is there any way I can
overcome this problem?

Thanks!

Jimmy
  670   10 Nov 2009 Stefan RittForumIt' better to fix this warnings
> This will cause "type conversion" warnings. I hope that "odbedit" can generate codes like this:
>
> #define EXPCVADC_COMMON_STR(_name) const char *_name[] = {\
> "[.]",\
>...

Ok, I changed that in odb.c rev. 4620, should be fine now.
  682   27 Nov 2009 Stefan RittForumRun multiple frontend on the same host
> Dear All,
> 
> I want to run two frontend programs (one for trigger and one for slow control)
> concurrently on the same computer, but I failed. The second frontend said: 
> 
> Semaphore already present
>  There is another process using the semaphore.
>  Or a process using the semaphore exited abnormally.
>  In That case try to manually release the semaphore with:
>    ipcrm sem XXX.
> 
> The two frontends are connected to the same experiment. Is there any way I can
> overcome this problem?

That might be related to the RPC mutex, which gets created system wide now. I 
modified this in midas.c rev. 4628, so there will be one mutex per process. Can you 
try that temporary patch and tell me if it works for you?
  687   07 Dec 2009 Jimmy NgaiForumRun multiple frontend on the same host
Dear Stefan,

Thanks for the reply. I have tried your patch and it didn't solve my problem. Maybe I 
have not written my question clearly. The two frontends could run on the same computer 
if I use the remote method, i.e. by setting up the mserver and connect to the 
experiment by specifying "-h localhost", also the frontend programs need to be put in 
different directory. What I want to know is whether I can simply start multiple 
frontends in the same directory without setting up the mserver etc. I noticed that 
there are several *.SHM files, I'm not familiar with semaphore, but I guess they are 
the key to the problem. Please correct me if I misunderstood something.

Best Regards,
Jimmy


> > Dear All,
> > 
> > I want to run two frontend programs (one for trigger and one for slow control)
> > concurrently on the same computer, but I failed. The second frontend said: 
> > 
> > Semaphore already present
> >  There is another process using the semaphore.
> >  Or a process using the semaphore exited abnormally.
> >  In That case try to manually release the semaphore with:
> >    ipcrm sem XXX.
> > 
> > The two frontends are connected to the same experiment. Is there any way I can
> > overcome this problem?
> 
> That might be related to the RPC mutex, which gets created system wide now. I 
> modified this in midas.c rev. 4628, so there will be one mutex per process. Can you 
> try that temporary patch and tell me if it works for you?
  688   08 Dec 2009 Stefan RittForumRun multiple frontend on the same host
Hi Jimmy,

ok, now I understand. Well, I don't see your problem. I just tried with the 
current SVN 
version to start

midas/examples/experiment/frontend
midas/examples/slowcont/scfe

in the same directory (without "-h localhost") and it works just fine (see 
attachemnt). I even started them from the same directory. Yes there are *.SHM 
files and they correspond to shared memory, but both front-ends use this shared 
memory together (that's why it's called 'shared').

Your error message 'Semaphore already present' is strange. The string is not 
contained in any midas program, so it must come from somewhere else. Do you 
maybe try to access the same hardware with the two front-end programs?

I would propose you do the following: Use the two front-ends from the 
distribution (see above). They do not access any hardware. See if you can run 
them with the current SVN version of midas. If not, report back to me.

Best regards,

  Stefan


> Dear Stefan,
> 
> Thanks for the reply. I have tried your patch and it didn't solve my problem. 
Maybe I 
> have not written my question clearly. The two frontends could run on the same 
computer 
> if I use the remote method, i.e. by setting up the mserver and connect to the 
> experiment by specifying "-h localhost", also the frontend programs need to be 
put in 
> different directory. What I want to know is whether I can simply start 
multiple 
> frontends in the same directory without setting up the mserver etc. I noticed 
that 
> there are several *.SHM files, I'm not familiar with semaphore, but I guess 
they are 
> the key to the problem. Please correct me if I misunderstood something.
> 
> Best Regards,
> Jimmy
> 
> 
> > > Dear All,
> > > 
> > > I want to run two frontend programs (one for trigger and one for slow 
control)
> > > concurrently on the same computer, but I failed. The second frontend said: 
> > > 
> > > Semaphore already present
> > >  There is another process using the semaphore.
> > >  Or a process using the semaphore exited abnormally.
> > >  In That case try to manually release the semaphore with:
> > >    ipcrm sem XXX.
> > > 
> > > The two frontends are connected to the same experiment. Is there any way I 
can
> > > overcome this problem?
> > 
> > That might be related to the RPC mutex, which gets created system wide now. 
I 
> > modified this in midas.c rev. 4628, so there will be one mutex per process. 
Can you 
> > try that temporary patch and tell me if it works for you?
Attachment 1: Capture.png
Capture.png
  689   12 Dec 2009 Jimmy NgaiForumRun multiple frontend on the same host
Dear Stefan,

I followed your suggestion to try the sample front-ends from the distribution and 
they work fine. They also work fine with any one of my front-ends. Only my two 
front-ends cannot run concurrently in the same directory. I later found that the 
problem is in the CAEN HV wrapper library. The problem arises when the front-ends 
are both linked to that library and it is solved now.

Thanks & Best Regards,
Jimmy


> Hi Jimmy,
> 
> ok, now I understand. Well, I don't see your problem. I just tried with the 
> current SVN 
> version to start
> 
> midas/examples/experiment/frontend
> midas/examples/slowcont/scfe
> 
> in the same directory (without "-h localhost") and it works just fine (see 
> attachemnt). I even started them from the same directory. Yes there are *.SHM 
> files and they correspond to shared memory, but both front-ends use this shared 
> memory together (that's why it's called 'shared').
> 
> Your error message 'Semaphore already present' is strange. The string is not 
> contained in any midas program, so it must come from somewhere else. Do you 
> maybe try to access the same hardware with the two front-end programs?
> 
> I would propose you do the following: Use the two front-ends from the 
> distribution (see above). They do not access any hardware. See if you can run 
> them with the current SVN version of midas. If not, report back to me.
> 
> Best regards,
> 
>   Stefan
> 
> 
> > Dear Stefan,
> > 
> > Thanks for the reply. I have tried your patch and it didn't solve my problem. 
> Maybe I 
> > have not written my question clearly. The two frontends could run on the same 
> computer 
> > if I use the remote method, i.e. by setting up the mserver and connect to the 
> > experiment by specifying "-h localhost", also the frontend programs need to be 
> put in 
> > different directory. What I want to know is whether I can simply start 
> multiple 
> > frontends in the same directory without setting up the mserver etc. I noticed 
> that 
> > there are several *.SHM files, I'm not familiar with semaphore, but I guess 
> they are 
> > the key to the problem. Please correct me if I misunderstood something.
> > 
> > Best Regards,
> > Jimmy
> > 
> > 
> > > > Dear All,
> > > > 
> > > > I want to run two frontend programs (one for trigger and one for slow 
> control)
> > > > concurrently on the same computer, but I failed. The second frontend said: 
> > > > 
> > > > Semaphore already present
> > > >  There is another process using the semaphore.
> > > >  Or a process using the semaphore exited abnormally.
> > > >  In That case try to manually release the semaphore with:
> > > >    ipcrm sem XXX.
> > > > 
> > > > The two frontends are connected to the same experiment. Is there any way I 
> can
> > > > overcome this problem?
> > > 
> > > That might be related to the RPC mutex, which gets created system wide now. 
> I 
> > > modified this in midas.c rev. 4628, so there will be one mutex per process. 
> Can you 
> > > try that temporary patch and tell me if it works for you?
  693   27 Jan 2010 Suzannah DavielForumcustom page - flashing filled area
Hi,

On a custom web page, can a "filled" area be made to flash (i.e. cycle between 
two colours)? This area would have to update faster than the whole page update.
 
I have a custom page representing a gas system, and the users
want the heaters to flash when they are on, as is done in their EPICS page.

Thanks,
Suzannah 
  694   09 Feb 2010 Stefan RittForumcustom page - flashing filled area
One possibility is to use small GIF images for each valve, which have several frames (called 'animated GIF'). Depending on the state you can use a static GIF or the flashing GIF. An alternate approach is to use a static background image, and display a valve with different color on top of the background in regular intervals using JavaScript. I tried that with the attached page. Just create a custom page /Custom/Valve = valve.html and put all three attachments into your mhttpd directory. The JavaScript displays the red valve on top of the background with a 3 Hz frequency. The only trick is to position the overlay image exactly on top of the background image. This is done using the 'absolute' position in the style sheet. It needs a bit playing to find the proper position, but then it works fine.
Attachment 1: valve.html
Attachment 2: valve_back.gif
valve_back.gif
Attachment 3: valve.gif
valve.gif
ELOG V3.1.4-2e1708b5