[gmx-developers] pedantic change to gmx_chi.c (3.3.1) suggested
David van der Spoel
spoel at xray.bmc.uu.se
Tue Nov 13 08:04:02 CET 2007
chris.neale at utoronto.ca wrote:
> The following change to the source code of 3.3.1 gmx_chi.c was required
> on a new machine on which I have recently compiled the code. I believe
> that the error here is in a perl script that the sysadmin has written to
> wrap 'cc' for equivalent usage on different architectures. In any event
> the change to the source code should not hurt gromacs and may avoid a
> similar problem in the future for other users. I do realize that it
> makes no sense that this affects compilation. The difference is removal
> of a double semicolon in the first line and removal of a space before
> the semicolon in the second line. I am not sure which one didn't react
> well with the in-house 'cc' perl script.
The double semicolon had already been removed from the CVS versions. The
space shouldn't make a difference. Thanks for reporting.
>
> $ diff tools/gmx_chi_original.c tools/gmx_chi.c
> 1030,1031c1030,1031
> < static bool
> bNormHisto=TRUE,bChiProduct=FALSE,bHChi=FALSE,bRAD=FALSE,bPBC=TRUE;;
> < static real core_frac=0.5 ;
> ---
>> static bool
>> bNormHisto=TRUE,bChiProduct=FALSE,bHChi=FALSE,bRAD=FALSE,bPBC=TRUE;
>> static real core_frac=0.5;
>
> Here is the last few lines of output from the make install command
> before I made the change:
>
> ...
>
> Making install in tools
> make[2]: Entering directory `/home/cneale/exe/gromacs-3.3.1/src/tools'
> source='gmx_chi.c' object='gmx_chi.lo' libtool=yes \
> DEPDIR=.deps depmode=none /bin/sh ../../config/depcomp \
> /bin/sh ../../libtool --tag=CC --mode=compile ccc -DHAVE_CONFIG_H -I.
> -I. -I../../src -I/usr/X11R6/include -I../../include
> -DGMXLIBDIR=\"/home/cneale/exe/gromacs-3.3.1/exec/share/top\"
> -I/home/cneale/exe/fftw-3.1.2/exec/include -std1 -fast -O4 -no_ifo
> -arch ev6 -unroll 2 -fp_reorder -c -o gmx_chi.lo gmx_chi.c
> ccc -DHAVE_CONFIG_H -I. -I. -I../../src -I/usr/X11R6/include
> -I../../include
> -DGMXLIBDIR=\"/home/cneale/exe/gromacs-3.3.1/exec/share/top\"
> -I/home/cneale/exe/fftw-3.1.2/exec/include -std1 -fast -O4 -no_ifo -arch
> ev6 -unroll 2 -fp_reorder -c gmx_chi.c -o gmx_chi.o
> cc: Error: gmx_chi.c, line 1031: Invalid statement. (badstmt)
> static real core_frac=0.5 ;
> --^
> cc: Error: gmx_chi.c, line 1032: Missing ";". (nosemi)
> t_pargs pa[] = {
> ----------^
> cc: Error: gmx_chi.c, line 1033: Invalid expression. (badexpr)
> { "-r0", FALSE, etINT, {&r0},
> ----------------------------^
>
> ...
>
> #####
>
> Manufacturer: Compaq
> Operating system: Red Hat Linux 7.2
> Interconnect: Quadrics Elan3
>
> $ gcc --version
> 2.96
> $ f77 --version
> 2.96
>
> $which cc
> /opt/compile/bin/cc
> $ ls -l /opt/compile/bin/cc
> lrwxrwxrwx 1 root root 7 Mar 7 2007
> /opt/compile/bin/cc -> compile
> $ ls -l /opt/compile/bin/compile
> -rwxr-xr-x 1 root root 13153 Mar 7 2007
> /opt/compile/bin/compile
>
> compile is a perl script written in-house by the maintainers of our cluster
>
> $head -30 compile
> #!/usr/bin/perl
> #
> # wrapper to do several things:
> # - arrange for sensible defaults, since users often forget -O
> # - optionally log compiler usage (timestamp, user, flags)
> # - hide ugly library stuff, especially MPI
> # - address these across different langs, systems, compilers, MPI's.
> # the goal is to make it possible for a user to compile everywhere
> # without changing their makefile/etc, using the obvious switches.
> # they could put all this intelligence in the makefile, and we could
> # factor the intelligence into a system-specific make include,
> # but putting it in one place and using perl is more powerful.
> #
> # records each invocation to syslog. it is installed with several
> # aliases (symlinks in the bin directory) to make it run whenever someone
> # uses a generic cc/c++/f77/f90/mpicc/etc command.
> #
> # written by XXXXXXX--hidden by C. Neale (without premission)-XXXXX
> #
>
> use strict;
> use User::pwent;
> use Sys::Syslog;
> use Pod::Usage;
>
> =head1 NAME
>
> compile - compile, with intelligence about language, mpi, etc.
>
> =head1 SYNOPSIS
>
>
>
> Thanks,
> Chris.
>
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use thewww
> interface or send it to gmx-developers-request at gromacs.org.
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596, 75124 Uppsala, Sweden
phone: 46 18 471 4205 fax: 46 18 511 755
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the gromacs.org_gmx-developers
mailing list