Re: [AMBER] Compiling trouble of AmberTools with intel compiler v12.1.0.

From: Mark Williamson <mjw.mjw.name>
Date: Tue, 15 Nov 2011 15:04:56 +0000

K. Uebayashi wrote:
> Dear all,
>
> I'm trying to build AmberTools(patched bugfix.all: Apr. 11) with intel
>
>
> <SNIP>
> compiler> icpc -c -std=c++0x -I.. -I../../freelib -I. -o parm.o parm.cpp
> parm.cpp(247): error: more than one instance of function template
> "mort::copy_if" matches the argument list:
> function template "_OutputIterator
> mort::copy_if(_InputIterator, _InputIterator, _OutputIterator,
> _Predicate)"
> function template "_OIter std::copy_if(_IIter, _IIter,
> _OIter, _Predicate)"
> argument types are: (mort::diheiter_t, mort::diheiter_t,
> std::back_insert_iterator<std::vector<mort::dihe_t,
> std::allocator<mort::dihe_t>>>, mort::prmtop::se
> quence_Match2)
> copy_if( pbc.dihe_begin(), pbc.dihe_end(),
> back_inserter(pdihs), sequence_Match2(pas) );


I think this may be because the Intel C++ compiler (icpc) is enforcing
the C++11 standard via the "-std=c++0x" flag. This flag is not present
when compiling with the gnu compilers (i.e. configure gnu), but, I do
see the same error when using gnu's g++ (4.4.1) to compile with this
same flag.

Looking at $AMBERHOME/AmberTools/src/configure, it seems that only a
build with Intel compilers has this flag enabled:

      if [ "$icc_version" -ge 11 ] ; then
        cxxflags="-std=c++0x $cxxflags"
        ambercxxflags="-std=c++0x $ambercxxflags"
        ldflags="-shared-intel "
      fi

I started to fix the various bits of the sleap code pertaining to this
error in an attempt to release a fix, however, I've run into issues with
this since as soon as I quell one error, another occurs and now I've hit
a set that I do not know how to fix.

You could try removing the -std=c++0x flag from
./AmberTools/src/configure and regenerate your config.h, then recompile.
However, there must have been a reason for this flag being there in the
first place.

Ensure you run and check the test cases carefully.

Regards,

Mark


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Nov 15 2011 - 07:30:02 PST
Custom Search