Topic Options
#29563 - 03/16/12 05:49 AM Minor bug in install script (all versions?)
Basler Offline
Forum Member

Registered: 08/26/09
Posts: 1
Loc: Switzerland
Hello developers,

I keep encountering an irritating bug when compiling with PGF95 and MPI. The script contains the command "sed -e 's/gcc/mpicc/g'" (at line 2103 in release c36b2, but this has been around for a while). If the compiler is pgcc, then this substitution produces pmpicc in the Makefile and a 'command not found' during compilation . Due to the nature of mpicc, a simple soft link for pmpicc pointing towards mpicc doesn't work either, and pinning down exactly where the mysterious 'pmpicc' comes from can be a bit time consuming when you're not familiar with The workaround for me was to add "sed -e 's/pgcc/mpicc/g'" directly before "sed -e 's/gcc/mpicc/g'", but I haven't tested this with other flags and whistles.



#29565 - 03/16/12 12:04 PM Re: Minor bug in install script (all versions?) [Re: Basler]
mgarraha Offline
Forum Member

Registered: 05/13/09
Posts: 125
Thanks for the report. It's in our bug tracker now, and you are welcome to register there.

#29569 - 03/16/12 08:34 PM Re: Minor bug in install script (all versions?) [Re: Basler]
Kenno Offline
Forum Member

Registered: 12/19/05
Posts: 1535
Loc: Baltimore, MD
These sed commands cause a host of annoyances, such as messing up the compilation when the name of the compiler accidentally occurs anywhere in the path where CHARMM is being compiled, or in any optimization flags that are manually edited into Makefile_gnu. Removing the g (replace all) flag mitigates some of these annoyances, although there still is a need for more specific regular expressions. Or even better, use a real build system such as GNU autoconf/automake et al. (I know, I know, no-one has time to migrate it, but a man can dream.)

#29570 - 03/16/12 10:22 PM Re: Minor bug in install script (all versions?) [Re: Basler]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8334
Loc: 39 03 48 N, 77 06 54 W
The sed commands are mostly pointless, as one could easily set environment variables such as FC, CC, LD, I8DUM, etc. in, and simply use them in the Makefile. I've never understood why someone went to all that trouble when a much simpler approach existed all along.
Rick Venable
computational chemist


Moderator:  BRBrooks, bucknerj, chmgr, John Legato