Re: [AMBER-Developers] more on ptraj compilation with Intel

From: Scott Brozell <sbrozell.rci.rutgers.edu>
Date: Thu, 4 Mar 2010 20:02:49 -0500

Hi,

On Thu, Mar 04, 2010 at 07:05:37PM -0500, Scott Brozell wrote:
>
> On Thu, Mar 04, 2010 at 05:25:30PM -0500, case wrote:
> > I have some more information on ptraj compilation problems with intel compilers.
> > (I assume these same issues are relevant for NAB as well, or other things
> > that mix C and fortran objects.)
> >
> > 1. The startup scripts for Intel version 11 libraries set a LIBRARY_PATH
> > variable, which appears to help(allow?) both icc and ifort to find each
> > others' libraries.
>
> > 2. When I downgraded to version 10 compilers, I didn't get rid of the
> > LIBRARY_PATH variable, and it is not reset by the version 10 startup scripts.
> > So, that was apparently why I appeared to have success with version 10 where
> > others did not.
>
> not clear as above.

On 1 and 2, it looks like the important difference is the structure
of the intel compiler directories; where it works both C and fortran
are in the same dirs; where it doesnt they are segregated.
Ie, osc:
Mar 04 7:54:43pm opt-login04.osc.edu 1026$ ~/11/src lll /usr/local/intel-10.0.023/bin
    4 -rwxr-xr-x 1 djohnson oscsys 1219 Jun 12 2007 icc
    4 -rwxr-xr-x 1 djohnson oscsys 1227 Jun 12 2007 ifort
...
casegroup:
Mar 04 7:40:48pm casegroup.rutgers.edu 960$ ~/11/src/ptraj ll /cottus/opt/intel/
total 8
0 drwxr-xr-x 4 root root 36 Oct 7 12:31 cce
0 drwxr-xr-x 4 root root 36 Oct 7 12:51 fce


> > 3. Two fixes are easy to do manually, but not (yet) automagically:
> >
> > a. add the correct "-L" flag before the -lifprot -lifcore flags
> > b. use FC rather than CC to link, and add the -nofor-main flag to
> > the link command.
> > c. The user could also manually set the LIBRARY_PATH environment
> > variable (really the same as using the "-L" flag in a.
>
> still working on getting the magic...
>
> > 4. [Aside: does anyone know how to turn on verbosity in the link step, so
> > that we can find out what icc is doing with the "-lifport -lifcore"
> > flags? It is not complaining that they are not found, so it must be
> > resolving the name some, but not finding a suitable library. It's not
>
> mk ptraj AMBERBUILDFLAGS='-Wl,-M'

Yes interestingly, there is no message that the fortran libs are not found,
but they dont show up in the map; thus, a link error.
This is poor QC between the compiler and the linker.
Intel's position is that we have to fix this ourselves:
http://software.intel.com/en-us/articles/intel-c-compiler-linking-mixed-fortran-cc-applications/

> > 5. I think the configure script could fairly easily be made to do the
> > following:
> > a. determine if we have an old version of the intel compilers
> > b. parse `which ifort` and `which icc` to get their absolute paths;
> > strip off the trailing "bin/ifort" and replace it with "lib".
> > c. use the result to add the correct "-L" flag to the flibs_arch
> > variable for intel (line 426 of configure).
> > I someone has time to try this out, that would be great.
>
> low tech, but should work;
> i prefer to investigate higher tech 1st.

i think a more clever solution is to use LD_LIBRARY_PATH.
im back on baby duty for a while, but will try this tonight.

scott


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Mar 04 2010 - 17:30:03 PST
Custom Search