[torqueusers] Canonical list of best practice build flags ?

Garrick Staples garrick at usc.edu
Sun Jan 8 22:25:20 MST 2006


On Mon, Jan 09, 2006 at 11:12:40AM +1100, Chris Samuel alleged:
> Hi folks,
> 
> Does anyone have a canonical list of good practice build flags for Torque on 
> Linux clusters ?
> 
> Currently I'm using the (probably rather short) list of:
> 
>  ./configure  --with-scp '--set-cflags=-g -Wall -fPIC'
> 
> The -fPIC is the latest addition after the discussion on the torquedev list 
> about what's needed to be able to link against the OpenMPI libs (not that 
> we've got anyone using it yet, but just in case).
> 
> Also, on our SuSE SLES9 PPC64 cluster I add "-m64" to force the SuSE C 
> compiler to generate 64-bit code rather than 32-bit which it does by default 
> (grrr).

All I can really add is to use --enable-syslog.  I think syslog is
crucial.  There are many errors in MOM children that can only be seen
with syslog.

Take a look at the torque.spec in the recent snapshots.  Most of it is
redundant and just plain anal, but I would say this is "canonical" for
Linux builds:

%prep
%setup -n %{name}-%{version}
echo '#define PBS_VERSION "%{version}-%{release}"' > src/include/pbs_version.h


%build
CFLAGS="-fPIC %optflags -Wall -Wno-unused -std=gnu99 -pedantic -D_GNU_SOURCE"
export CFLAGS

for i in $(find . -name config.guess -o -name config.sub) ; do
   if [ -f /usr/lib/rpm/%{_host_vendor}/$(basename $i) ] ; then
       %{__rm} -f $i && %{__cp} -fv
       %/usr/lib/rpm/%{_host_vendor}/$(basename $i) $i
   elif [ -f /usr/lib/rpm/$(basename $i) ] ; then
        %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/$(basename $i) $i
   fi
done

# autoconf and friends don't work with torque, so we can't use the
# various configure macros
./configure --prefix=%{_prefix} --sbindir=%{_sbindir} --bindir=%{_bindir} \
 --includedir=%{_includedir} --mandir=%{_mandir} --libdir=%{_libdir} \
 --enable-server --enable-clients --enable-mom --enable-docs %{guiflags} \
 --set-server-home=%{torquehomedir} %{server_nameflags} --set-cflags="$CFLAGS" \
 %{fsyncflags} %{syslogflags} %{tclflags} %{rppflags} %{scpflags}
 %{wordexpflags}


On RHEL3 i686, %optflags expands to:
-O2 -g -pipe -march=i386 -mcpu=i686

On RHEL3 x86_64, %optflags expands to:
-O2 -g -pipe


-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20060108/c9f5591b/attachment.bin


More information about the torqueusers mailing list