Subject: amber 5.0 and pgc compilation error...

From: Gustavo Mercier <[email-masked]>
Date: Sun, 3 Oct 1999 17:22:37 -0700 (PDT)

Hi!

I have a linux box (Red Hat 6.0) and I am trying
to compile Amber v. 5.0 using the Portland Group
compilers (pgcc, pgf77). I am using a Machine.pgcc
file posted as a reply in the ccl that is essentially
identical to the one listed in the Amber web site.
(See below.)

I have applied all the patches up to bugfix.49
(although bugfixes #47 and #49 could not
be applied even manually to the amber version
released by Oxford, the one I own. These
only apply to Leap and not the actual code that
fails to compile.)

I have severe compilation errors associated with
some routines in the following directories:

../src/etc/rdparm
../src/carnal/etc

The errors associated with the files in rdparm
reflect incompatibilities between the data types
returned by the function strstr() and the NULL
pointer. A check of the man pages suggest that this
should not be a problem. strstr() will return
a NULL pointer if it fails to find a string within
a target string.

Questions:

1) Has anybody run into this problem and come up
with a solution? I did managed to compile Amber 5.0
without patches using Machine.g77, but would like
to eventually compile it using the pgf77 and MPICH
since I have a dual PII box.

2) Any clues about the second error seen with
the compilation of CARNAL? This may relate to the
compiler since the complaint is about "main"
being defined twice. Any hints would be welcomed.

3) Do the bugfixes #47 and #49 apply to the
distribution of Amber v. 5.0 from Oxford?

  In bugfix.47 there are lines containing the string
  "dPolar" but I could not find these in the code.

  In bugfix.49 there are lines containing the strings:
    "elseif (dZ<dZmin)
         dZmin=dY;"   but I could not find thes in the
  code.

Thanks
Gustavo A. Mercier, Jr.
[email-masked]

---------------------------------------------------
Sample error messages in ../src/etc/rdparm:
( I did add the -A option myself, but this is
irrelevant to the error)

 pgcc  -c -A   -DF2C  -DISTAR2 -DREGNML -DEWALD
-DHAS_FTN_ERFC  main.c
pgcc-warning-C does not support the '-A' option
PGC-S-0103-Illegal operand types for comparison
operator (main.c: 67)
PGC-S-0103-Illegal operand types for comparison
operator (main.c: 72)

PGC/x86 Linux/x86 3.0-4: compilati pgcc  -c -A   -DF2C
 -DISTAR2 -DREGNML -DEWALD -DHAS_FTN_ERFC  dispatch.c
pgcc-warning-C does not support the '-A' option
PGC-S-0103-Illegal operand types for comparison
operator (dispatch.c: 467)
PGC-W-0095-Type cast required for this conversion
(dispatch.c: 505)
PGC/x86 Linux/x86 3.0-4: compilation completed with
severe errors
on completed with severe errors

 pgcc  -c -A   -DF2C  -DISTAR2 -DREGNML -DEWALD
-DHAS_FTN_ERFC  trajectory.c
pgcc-warning-C does not support the '-A' option
PGC-S-0103-Illegal operand types for comparison
operator (trajectory.c: 1442)
PGC-S-0103-Illegal operand types for comparison
operator (trajectory.c: 2240)
PGC/x86 Linux/x86 3.0-4: compilation completed with
severe errors

----------------------------------------------------
Sample errors in directory ../src/carnal/etc

pgf77 -O3 -Munroll -Mnoframe -tp p6 -pc 64 -o carnal
main.o util.o rdprm.o static.o stream.o group.o
table.o pointax.o coord.o doit.o geom.o meas.o
pdbgen.o modsel.o hbond.o stats.o distrib.o rms.o
matrix3.o pucker.o dme.o image.o energy.o cutres.o -lm
main.o: In function `main':
main.o(.text+0x80): multiple definition of `main'
/usr/local/pgi/linux86/lib/pgfmain.o(.text+0x10):
first defined here
/usr/bin/ld: Warning: size of symbol `main' changed
>from 83 to 92 in main.o
/usr/local/pgi/linux86/lib/pgfmain.o: In function
`main':
/usr/local/pgi/linux86/lib/pgfmain.o(.text+0x4f):
undefined reference to `MAIN_'
Linking:
make: *** [carnal] Error 1

Machine.pgcc file:
------------------------------------------------------
#! /bin/csh -f
########################################################################
#                                                     

#                Copyright (c) 1986, 1991, 1995       

#           Regents of the University of California   

#                                                     

#                    All Rights Reserved              

#                                                     

#             Machine Dependency Handling System      

#                                                     

#                Bill Ross [email-masked]          

#            An extension of work of George Seibel    

#                                                     

#           Dependencies written by various authors.  

#                                                     

#  Permission to use, copy, modify, and distribute
this software and  

#  its documentation for any purpose and without fee
is hereby        

#  granted, provided that the above copyright notice
appear in all    

#  copies and that both that copyright notice and this
permission     

#  notice appear in supporting documentation, and that
the name of    

#  the University of California not be used in
advertising or         

#  publicity pertaining to distribution of the
software without       

#  specific, written prior permission.                

#                                                     

#  THE REGENTS OF THE UNIVERSITY OF CALIFORNIA
DISCLAIM ALL           

#  WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED     

#  WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL THE   

#  UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL,
INDIRECT OR    

#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM     

#  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT,    

#  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN          

#  CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.           

#                                                     

########################################################################

setenv MACHINE "Linux MPI"
setenv MACH F2C
setenv MACHINEFLAGS " -DISTAR2 -DREGNML -DEWALD
-DHAS_FTN_ERFC"

# CPP is the cpp for this machine
setenv CPP "/lib/cpp -traditional"

# SYSDIR is the name of the system-specific source
directory relative
to src/*/
setenv SYSDIR Machine/f2c

# COMPILER ALIASES:
setenv FC "pgf77"
setenv CC "pgcc"

# LOADER/LINKER:
setenv OPT "-O3 -Munroll -Mnoframe -tp p6 -pc 64"
setenv LOAD "$FC $OPT"
setenv LOADLIB "-lm"

# little or no optimization:
setenv L0 "$FC -c "
setenv L1 "$FC -c $OPT"
setenv L2 "$FC -c $OPT"
setenv L3 "$FC -c $OPT"

# ranlib, if it exists
setenv RANLIB ranlib

# spasms configuration
#SPASMS MACHINE.f2c_spasms_config
#SPASMS unix
#SPASMS n390
#SPASMS large

-------------------------------------------------

=====
--                                  ("`-/")_.-'"``-._
Gustavo A. Mercier,Jr.,MD,PhD       (. . `) -._    )-;-,_() 
Hillcrest Medical Center            (v_,)'  _  )`-.\  ``-
Dept. of Radiology                  _;- _,-_/ / ((,'
Tulsa X-Ray Laboratory             ((,.-'  ((,/
5840 South Memorial Suite 301    [email-masked]
Tulsa, OK 74145-9082   voice: 918-664-9892/fax: 918-664-6120
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com