Tuesday, March 30th, 2010
The Edwards coffeehouse in Dortmund is a nice place to work with some friends, while having a beer or a coffee due to it’s huge tables, free wireless and central location.
Unfortunately their wireless network router is quite old and apparently gets confused by something in the OSX network stack (probably some bonjour packets). Whatever the reason is, the net effect is that you can connect to the network “edwardsnet” but you don’t get an IP address from it’s router. So the only way to solve this is to assign yourself a valid ip and configure the gateway and DNS by hand.
IPv6 Adress: 192.168.2.XXX (best guess XXX in the range from 50 to 100)
Subnet Mask: 255.255.0.0
Router: 192.168.2.1
DNS: 8.8.8.8 (one of Googles public DNS servers)
Please note that you kind of have to guess a free ip. So please try to be polite and change your address if strange network behaviour occurs. Maybe best thing is to guess an ip use that one to scan the network using some pings and than use one of the ips that seem to be free.
Tags: coffee, configure, debug, dns, dortmund, edwards, german, howto, network, router
Posted in random rants | No Comments »
Tuesday, March 16th, 2010
If you run a python script that imports GaudiPython (or any LHCb modules for that matter) inside gdb on any lxplus node, you will run into an error like this:
[lxplus223] ~ > gdb python
GNU gdb Red Hat Linux (6.3.0.0-1.162.el4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"
...Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) set args test.py
(gdb) run
Starting program:
/afs/cern.ch/sw/lcg/external/Python/2.5.4p2/slc4_amd64_gcc34/bin/python test.py
[Thread debugging using libthread_db enabled]
[New Thread 182894205120 (LWP 11117)]
Traceback (most recent call last):
File "test.py", line 1, in
import GaudiPython
ImportError: No module named GaudiPython
Program exited with code 01.
(gdb)
This is due to our group-login script (including the “rc” one)
using LbLogin and that reshuffles the paths. When gdb starts
the process to be debugged and if a SHELL variable is present,
it is started with “$SHELL -c”.
When it is perfectly legal for bash (it only starts a new shell),
with (t)csh it starts a new *login* shell corrupting the already
setup paths (PATH, LD_LIBRARY_PATH, PYTHONPATH etc).
So in order to solve this you have to unset SHELL inside
gdb (maybe best to place that in .gdbinit):
unset environment SHELL
Tags: C++, cern, csh, debug, env, environment, gdb, LD_LIBRARY_PATH, lhcb, PATH, Python, tcsh
Posted in C++, cern, lhcb, Python, random rants | No Comments »