Re: [AMBER] compile errors with AmberTools1.5 + Amber11

From: Jason Swails <jason.swails.gmail.com>
Date: Sun, 1 May 2011 12:45:05 +0200

Hi Bob,

On Sun, May 1, 2011 at 2:04 AM, Robert Wohlhueter <
bobwohlhueter.earthlink.net> wrote:

> Jason,
>
> A couple of comments on your comments: By "clean slate" I mean really
> clean, i.e. removing the $AMBERHOME dir entirely, re-extracting tars,
> re-patching, re-configuring. And I have AMBERHOME defined in root's
> .cshrc. (Nor does it make any difference if I `chown` of AMBERHOME to
> non-root, and build as a non-root user. So these aren't issues.
>

OK.


>
> I can't expect you to fix my Ubuntu installation of Python; it's a
> standard installation via the Synaptic Package Manager, and I don't see
> anything wrong with it: 2.5, 2.6, and 3.1 are all installed under
> /usr/lib; all of these contain a "os.py", none contain a "sys.py",
>

sys is a built-in module, so there is no sys.py. Try firing up an
interactive session and running

import sys
help(sys)

That should describe the module.


> specifying absolute path to 2.6 either via PYTHONHOME or hard-wiring in
> AT15_Amber11.py doesn't free me from the "import site" failed message.
>

Is there no site.py? This should actually be imported automatically for any
python version on any major OS, so this is a disturbing error... "import
site" works just fine for me for the python2.4, 2.5, 2.6, 2.7, and 3.2
installations.


>
> One rock left unturned is the python syntax errors which I get when
> omitting the "-nopython" flag while configuring. These errors prevent me
> from configuring without the "-nopython" flag, and thus force me to rely
> on my (broken?) Unbuntu Python installations. These errors all have to
> do with use of \n for "newline" in the python code. [SyntaxError:
> ("(unicode error) \\N escapes not supported (can't load > unicodedata
> module)"]). My search of the internet seems to confirm this, and says
> that the proper "newline" character for python using unicode is
> "u2424". Is it not possible/preferable for amber to patch its python
> code to reflect this?
>

But for python2.x, unicode is not the default string type (but I think it is
for python3.x). All of the python code written in amber is for python2.x,
and can't be expected to work for python3.x (perhaps the 2to3 utility is
enough to fix this) -- which is your default version?

Moreover, I've built AmberTools 1.5 successfully on both Ubuntu 9.10 and
10.10 (I haven't tried 10.04, but I'm guessing that works just fine) using
both the intel and gnu compilers. This leads me to wonder what's different
about your OS installation that's preventing it from working.

All the best,
Jason


> Bob W.
>
>
>
> On 4/29/11 3:52 PM, Jason Swails wrote:
> > On Fri, Apr 29, 2011 at 4:06 PM, Robert Wohlhueter<
> > bobwohlhueter.earthlink.net> wrote:
> >
> >> Hi Jason,
> >> Well, configuring (a clean slate) with -nopython flag circumvented the
> >> weird python errors, but brought me other troubles (see below):
> >> apparently my local python installation is not up to snuff. On a long
> >> shot, I tried the `AT15_Amber11.py` script again anyway, but got the
> >> same errors as previously (can't import "site", "os").
> >>
> >> Not to muddy the waters, but I also tried a clean build with the latest
> >> (half an hour ago) bugfix.all for AT 1.5. You might be interested that
> >> it gives a "malformed patch" error (see below), but didn't affect my
> >> python problem.
> >>
> >> Bob Wohlhueter
> >>
> >> *****************************************************************
> >> cpp -traditional -P -DBINTRAJ lapack.f> _lapack.f
> >> gfortran -c -O0 -o lapack.o _lapack.f
> >> cpp -traditional -P -DBINTRAJ resp.f> _resp.f
> >> gfortran -c -O0 -o resp.o _resp.f
> >> gfortran \
> >> lapack.o resp.o -o resp
> >> gfortran -o calcpka calcpka.f90
> >> ./py_setup.sh
> >> Using system python
> >> Error importing cpinutil.py python modules! cpinutil will not work.
> >> make[1]: *** [python] Error 1
> >> make[1]: Leaving directory `/usr/local/lib/amber11/AmberTools/src/etc'
> >> make: *** [serial] Error 2
> >>
> >>
> >> root.winter-linux: ...lib/amber11 (25%)# ./AT15_Amber11.py
> >>
> > Ooh, I would not do this as root. In several places, I think, the Amber
> > install references files in $AMBERHOME/bin. If AMBERHOME is blank, this
> > will just be parsed as /bin/, which is one of the last places you want to
> > mess around in (especially if it's *not* your scripts, so you don't know
> > what it's doing).
> >
> > ./AT15_Amber11.py
> > 'import site' failed; use -v for traceback
> >> Traceback (most recent call last):
> >> File "./AT15_Amber11.py", line 8, in<module>
> >> import os, sys
> >> ImportError: No module named os
> >>
> > Not good... Either you didn't start from a clean tree and it's still
> trying
> > to use the broken python from $AMBERHOME/bin, or your system python is
> > busted (very not good). The first means just get rid of the whole
> > AmberTools 1.5 directory and start over. If it's the second one, and
> you're
> > using Ubuntu, then something is seriously wrong (I use Ubuntu all the
> time
> > and have never seen this...).
> >
> >
> >> ****************bugfix.all patch
> >> error*************************************************
> >> patching file AmberTools/src/cpptraj/src/AmberNetcdf.cpp
> >> patching file AmberTools/src/mmpbsa_py/MMPBSA_mods/alamdcrd.py
> >> patching file AmberTools/src/mmpbsa_py/setup.sh
> >> patch: **** malformed patch at line 3176: Workarounds: none
> >>
> > I don't know why this is happening, but I can reproduce it. If you just
> > delete the last 2 lines it goes away... but not sure what'll happen when
> we
> > add another patch.
> >
> > HTH,
> > Jason
> >
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun May 01 2011 - 04:00:02 PDT
Custom Search