Subject: Re: CCL:Intel Linux compiler 7.0

From: [email-masked]
Date: Thu, 1 May 2003 03:22:47 -0400 (EDT)

That seems to be a problem when linking both C and Fortran object files. 
My way (though not the best one) of solving this problem is by also 
linking with GCC's g2c library:
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96 -lg2c
The actual linking path may be different in your machine
Good luck.

Eric

--------------------------------------------------------------------
  Eric Yan                     | phone: 706 542-4022
  Ctr. for Comp. Quantum Chem. | fax:   706 542-0406
  University of Georgia        | e-mail: [email-masked]
  Athens, GA  30602-2556       | http://epsilon.ccqc.uga.edu
 --------------------------------------------------------------------

On Tue, 29 Apr 2003 [email-masked] wrote:

> Greetings!
> 
> I have successfully compiled a version of MOPAC using the unsupported
> Intel Linux fortran compiler Version7.0 [I need F90 for dynamic memory
> allocation.]  Upon linking the code against the Intel libraries as well
> as libf77blas,libatlas, liblapack and lapack_linux libraries from
> netlib.org  I get the following complaint:
> 
> for dlamch.o   s_wsfe, do_fio, and e_wsfe are not resolved.
> 
> Comments and suggestions are most welcome...
> 
> many thanks!
> 
> John McKelvey
> 
> 
> 
> 
> 
> 
> -= This is automatically added to each message by mailing script =-
> [email-masked] -- To Everybody  | [email-masked] -- To Admins
> Ftp: ftp.ccl.net  |  WWW: http://www.ccl.net/chemistry/   | Jan: [email-masked]
> 
> 
> 
> 
>

---

From: Serguei Patchkovskii <[email-masked]>
Date: Sat, 3 May 2003 15:49:57 -0400 (EDT)

On Fri, 2 May 2003 [email-masked] wrote:
> O1 even when using  -malign-double, to give executables that work properly. Using
> -malign-double gets you to O1, but no further...
>
> Compiling with the Intel7.0  compiler with -align and no optimization  and
> the linking with the proper libraries does not give a properly functioning
> executable.

"Proper libraries" is a bit vague - getting BLAS and LAPACK libraries, which
work correctly for all corner cases, is tricky. Quite a few of the precompiled
libraries, floating out there on the net (or even distributed with professional
Fortran compilers) care more about the speed, than about getting correct results.
Just for fun, try running the test suite(s), distributed with LAPACK 3.0 source,
and see how many failures you'll get (I am yet to see any LAPACK/BLAS combo,
including those I compile myself, which passes all the tests). MKL 5.2SP1 is one
of the better ones in this respect.

Some things to try, in the order of increasing speed impact:

-pc64
-prec_div
-fp_port
-mp1
-mp

Needing one of these flags does not necessarily mean that there is anything
wrong with the program (or the compiler) - only that it is numerically
sensitive.

You can also try:

-zero
-save
-nopad
-common_args
-r8

If either one of these flags is needed to get program to work, the code is
likely buggy, and should be fixed if possible/practical.

It may also be a good idea to run the program with:

-O0 -C -d2

Unless the code is -extremely- well written (or has been through ifc -C
before), be prepared for many, many surprizes.

Best regards,

Serguei

---
Dr. Serguei Patchkovskii

Tel: +1-(613)-990-0945
Fax: +1-(613)-947-2838
E-mail: [email-masked]

Coordinator of Modelling Software
Theory and Computation Group
Steacie Institute for Molecular Sciences
National Research Council Canada
Room 2011, 100 Sussex Drive
Ottawa, Ontario
K1A 0R6 Canada

---

From: Serguei Patchkovskii <[email-masked]>
Date: Sat, 3 May 2003 09:45:38 -0400 (EDT)

Actually, the problem arises because John is trying to link against lapack
and blas libraries, compiled with g77 (GNU Fortran-77 compiler). Because
some of these subroutines use Fortran I/O statements, they need to be linked
with g77 I/O library - which is provided by g2c.

An even better solution would be to link with Intel MKL (Math kernel Library),
which provides highly optimized versions of BLAS and LAPACK (and a few other
things). MKL can be downloaded from:

http://developer.intel.com/software/products/mkl/mkl52/

Serguei

---
Dr. Serguei Patchkovskii

Tel: +1-(613)-990-0945
Fax: +1-(613)-947-2838

---

From: [email-masked]
Date: Fri, 02 May 2003 14:26:47 +0000

Folks,

I agree with Serguei.  But even with proper linking problems do not go away.  On
working with a good version of MOPAC93 directly from Jimmy Stewart and the
compiler furnished with RH7.1 it is not possible to get optimizations past O1 even
when using  -malign-double, to give executables that work properly. Using
-malign-double gets you to O1, but no further...

Compiling with the Intel7.0  compiler with -align and no optimization  and the
linking with the proper libraries does not give a properly functioning executable.

With both compilers I have found that it is one thing to compile routines
seperately, and a major headache to compile all the subroutines in a single
file.....

BTW, I have MOPAC93 and MOPAC97 working just fine using the Digital Visual
compilers with all possible optimization turned on under Windows.  Seems to me
there's something to be said for running MPI-PRO under Windows for coarse grain
parallel work...

Suggestions are welcome...
Thanks!

John McKelvey