snoplus / snoing

New snocave installation method for SNO+. Sno packages fall from the web (sky), i.e. snoing.
Other
5 stars 27 forks source link

python-dev library search not working on grid installs #60

Closed mjmottram closed 12 years ago

mjmottram commented 12 years ago

whereis and similar for python-config do not return anything for grid installs. It looks like the best way to do this is via rpm queries (as far as I'm aware, all SL based grid sites use rpm - and all grid sites we have access to are SL based): rpm -q python-devel

pgjones commented 12 years ago

Having spoken to Chris, this seems to be a python-config non-existence issue rather than whereis. The solution is to copy a simple python-config script to the grid until the grid moves to python2.6 and/or sl6. I'll work on a workaround soon, in the mean time it is probably possible to remove the python-dev dependency from all bar snogoggles. This should then allow the grid install to work.

mjmottram commented 12 years ago

Yeah, I checked this as well. As snoing runs fine with the current setup on the grid I was going to suggest a simple either/or with any library that isn't found with the testconfiglibrary so that it can be found with "rpm -q" - I'll add a hacky workaround to my fork tomorrow.

mjmottram commented 12 years ago

Response from one of the grid sites below to installing python-dev:

Hi Matthew

We had a discussion at RAL about adding this. The conclusion we came to is that the python development kit is not something we consider normal for a worker node. In general if a VO wants certain software packages to run its software then it should send this with the jobs. If we were to install all packages requested we could get to a point where one VOs software could break another.

You have access to our NFS software server (and have recently used it). Would adding the python development kit to this area not be the fastest and easiest way of getting the software you need?

Alastair

It sounds like the fix you're going to push soon might take care of this problem (if one site rejects the request, it's likely others will too).

pgjones commented 12 years ago

It should already be installed, python-devel 2.4 is normally on SL5 machines. python-config however needs python 2.6, the fix for this will come along later today.

mjmottram commented 12 years ago

Nope, it's only on three of the six sites we have access to at the moment. So snoing fails with the rpm check for python-dev at the other three right now. Is python-dev actually necessary for any bits of software that we'd use on the Grid anyway? The snocave build ran fine at these sites...

mjmottram commented 12 years ago

(Actually, the lack of the rpm package doesn't mean that it won't be installed in some other manner, but the response from RAL suggests that it isn't).

pgjones commented 12 years ago

@mjmottram please retest this now, it should be fixed.

mjmottram commented 12 years ago

@pgjones the old (pre the grid mode option) and post snoing.pkl files seem to clash - Util.DeSerialise returns False. This is fine, I'll remove them, but to future proof there should probably be a handler for the False state.

pgjones commented 12 years ago

Yea sorry I forgot to mention this. It seemed a bit over zealous to add a checker for the old file in a pre release version of snoing.

Phil

mjmottram commented 12 years ago

Another amazingly quirky Grid feature: scons, if compiled as lcgadmin (as is recommended practice for experimental software) will not allow non lcg-admin users to access it to compile RAT snapshots. This should be fixable with a simple chmod o+x. Am checking this now...

pgjones commented 12 years ago

The scons install method does:

os.chmod( os.path.join( self.GetInstallPath(), "script/scons" ), 0751 )

Which is probably the wrong number, what do you think it should be?

mjmottram commented 12 years ago

0755 - I guess execute without read wasn't working. Works with this.

pgjones commented 12 years ago

Done.

pgjones commented 12 years ago

@mjmottram great success now?

mjmottram commented 12 years ago

Ha, if only! ROOT build is failing at the last two grid sites. I'm trying to find out why now... Snoing log shows:

Install roots wrapper. cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/gccdemangler.py lib/python/genreflex/gccdemangler.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/gencapa.py lib/python/genreflex/gencapa.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/gendict.py lib/python/genreflex/gendict.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/genheader.py lib/python/genreflex/genheader.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/genreflex.py lib/python/genreflex/genreflex.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/genreflex-rootcint.py lib/python/genreflex/genreflex-rootcint.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/genrootmap.py lib/python/genreflex/genrootmap.py cp /home/exp_soft/sno/snoing-install/root-5.32.03/cint/reflex/python/genreflex/selclass.py lib/python/genreflex/selclass.pyPackage: root-5.32.03, errored during install.

pgjones commented 12 years ago

http://root.cern.ch/phpBB3/viewtopic.php?t=13200&p=57912 suggests this is normal, can you check if it works. Then we need to wonder why snoing thinks it doesn't.

mjmottram commented 12 years ago

I'm checking this now - it might be something as simple and stupid as bin/root not being created if --disable-x11 is set.

mjmottram commented 12 years ago

Yep, bin/root not created. I've added a fix to my fork, will submit a pull request after all the other problems are ironed out. Now failing on clhep!: make[1]: Leaving directory `/home/exp_soft/sno/snoing-install/xerces-c-3.1.1-source'Package: xerces-c-3.1.1 installed. Installing clhep-2.1.0.1 Install error for clhep-2.1.0.1

Traceback (most recent call last): File "./snoing.py", line 129, in ? installer.InstallPackage( packageName ) File "/opt/exp_soft/sno/snoing/core/PackageManager.py", line 69, in InstallPackage dependencies = self._InstallDependencies( package ) File "/opt/exp_soft/sno/snoing/core/PackageManager.py", line 112, in _InstallDependencies dependencyDict[dependency] = self.InstallPackage( dependency ) File "/opt/exp_soft/sno/snoing/core/PackageManager.py", line 69, in InstallPackage dependencies = self._InstallDependencies( package ) File "/opt/exp_soft/sno/snoing/core/PackageManager.py", line 112, in _InstallDependencies dependencyDict[dependency] = self.InstallPackage( dependency ) File "/opt/exp_soft/sno/snoing/core/PackageManager.py", line 74, in InstallPackage package.Install() File "/opt/exp_soft/sno/snoing/core/LocalPackage.py", line 44, in Install self._Install() File "/opt/exp_soft/sno/snoing/packages/Clhep.py", line 30, in _Install self._InstallPipe += PackageUtil.UnTarFile( self._TarName, self.GetInstallPath(), 2 ) File "/opt/exp_soft/sno/snoing/core/PackageUtil.py", line 123, in UnTarFile shutil.copytree( copyDirectory, targetPath ) File "/usr/lib64/python2.4/shutil.py", line 132, in copytree raise Error, errors shutil.Error: [('/opt/exp_soft/sno/snoing-cache/temp/2.1.0.1/CLHEP/Matrix/autotools', '/opt/exp_soft/sno/snoing-install/clhep-2.1.0.1/Matrix/autotools', <exceptions.OSError instance at 0x161a57a0>)]

mjmottram commented 12 years ago

Odd - not sure why there would be a copy error between the two directories!...

mjmottram commented 12 years ago

Urgh. Seems to be working now - the rat-3 install at least claims to have worked.... but now when compiling rat snapshots: src/calib/QvNhit.cc: In member function 'virtual RAT::Processor::Result RAT::QvNhit::Event(RAT::DS::Root, RAT::DS::EV)': src/calib/QvNhit.cc:53: warning: converting to 'int' from 'double' src/core/PythonProc.cc:3:21: error: TPython.h: No such file or directory src/core/PythonProc.cc: In destructor 'virtual RAT::PythonProc::~PythonProc()': src/core/PythonProc.cc:18: error: 'TPython' has not been declared src/core/PythonProc.cc:20: error: 'TPython' has not been declared src/core/PythonProc.cc: In member function 'virtual void RAT::PythonProc::SetS(std::string, std::string)': src/core/PythonProc.cc:26: error: 'TPython' has not been declared src/core/PythonProc.cc:48: error: 'TPython' has not been declared src/core/PythonProc.cc:57: error: 'TPython' has not been declared src/core/PythonProc.cc:62: error: 'TPython' has not been declared src/core/PythonProc.cc: In member function 'virtual RAT::Processor::Result RAT::PythonProc::DSEvent(RAT::DS::Root)': src/core/PythonProc.cc:70: error: 'TPython' has not been declared src/core/PythonProc.cc:73: error: 'TPython' has not been declared scons: ** [build/linuxx8664gcc/core/PythonProc.o] Error 1

pgjones commented 12 years ago

This is usually when python-dev is not installed and root does not compile TPython, however snoing should complain if python-dev is not installed and root is compiled with the --enable-python flag. Any ideas if disabling x11 also kills TPython?

pgjones commented 12 years ago

Could the copy error just be some grid nonsense?

mjmottram commented 12 years ago

Almost certainly. I guess the python-config fix that you ran bypassed the python-dev check, I'm pretty certain I ran with --enable-python (though I thought that this was set as a default in the ROOT configure). RAL (the site that failed) were the ones who didn't want to install python-dev - I don't think it's been installed.

pgjones commented 12 years ago

It still checks for python-dev after this, I just added the ability to check for different python-dev versions.

mjmottram commented 12 years ago

The confusing thing is that rat-3 installed fine. The error posted above was for an attempted install of a RAT snapshot (using the libraries from the snoing install). This works fine at other sites, but not at RAL.

pgjones commented 12 years ago

I assume this isn't a problem with snoing then. Are you sure the environment is setup correctly and the ./configure script is called?

mjmottram commented 12 years ago

Yeah, like I said, it works at other grid sites. The only difference is the snoing install - the working sites were all installed before the -x flag, so didn't have the following set in the ROOT install: '--disable-castor', '--disable-rfio', '--disable-x11'. I'll test cleaning out the install directory and reinstalling....

pgjones commented 12 years ago

Does this now work/can this issue be closed?

mjmottram commented 12 years ago

Sorry, had neglected to check up on this. I'm going to retry at the site with the odd python errors one more time now, will let you know by tomorrow whether the jobs run OK and the issue can be closed.

mjmottram commented 12 years ago

Haven't forgotten about this - the grid managed to lose the jobs I submitted so I can't see if they ran or not...

mjmottram commented 12 years ago

@pgjones Any idea why TPython libraries do not need to be compiled for the snoing install of RAT, but a snapshot that is installed would fail when it finds no TPython.o (or similar)?

mastbaum commented 12 years ago

RAT needs PyOOT, at least since the addition of Python processors.

mjmottram commented 12 years ago

Urgh, I have a bad memory - @pgjones asked about this ages ago: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=15140 (see also http://root.cern.ch/phpBB3/viewtopic.php?f=14&t=15083). So I guess the --disable-x11 really mucks things up, as does the lack of python-dev. I'll try setting enable-python last in the configure, otherwise not sure what to do.

mjmottram commented 12 years ago

When were they added? After the RAT-3 tag was released? (RAT-3 is compiling, a more recent snapshot is not).

mastbaum commented 12 years ago

Added 6/5 in https://github.com/snoplus/rat/commit/30a4379728a24a9cd48547fd3cbbba91fffe467b, so after release 3 (5/9).

mjmottram commented 12 years ago

OK, thanks. @pgjones I guess snoing should have python-dev as a requirement after all. I'll install it at the remaining grid sites now.

pgjones commented 12 years ago

It looks like you will need graphics i.e. X11 as well going by the root forum response.

pgjones commented 12 years ago

@mjmottram good now? :chart_with_upwards_trend:

mjmottram commented 12 years ago

With the extra configure options for ROOT, I assume so. Haven't been able to test a full snoing install, but everything installed and rat jobs using the snoing rat install worked fine when I tweaked the root config myself.

pgjones commented 12 years ago

Ok will close, reopen if not.