<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>RE: [torqueusers] Solution: torque-1.2.0p6 build problem usinggcc 3.4 (RHEL4 or FC4)</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText68696 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2>Just FYI we at OSCAR maintain
a set of TORQUE RPMs which may potentially be used for general purpose (it has
some specific OSCAR bits right now...)</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2>You can take a look at the
SRPM here:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2><A
href="http://svn.oscar.openclustergroup.org/oscar/trunk/packages/torque/SRPMS/">http://svn.oscar.openclustergroup.org/oscar/trunk/packages/torque/SRPMS/</A> (this
is for 1.2.0p5)</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2>We haven't looked at
1.2.0p6+ due to code freeze for our 4.2 release, however, you should be able to
simply modify the spec file, drop in the new tarball and build new
RPMs.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2>Cheers,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#0000ff size=2>Bernard</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> torqueusers-bounces@supercluster.org on
behalf of Maestas, Christopher Daniel<BR><B>Sent:</B> Mon 19/09/2005
21:55<BR><B>To:</B> Ole Holm Nielsen;
torqueusers@supercluster.org<BR><B>Subject:</B> RE: [torqueusers] Solution:
torque-1.2.0p6 build problem usinggcc 3.4 (RHEL4 or FC4)<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>I'm curious if there is anyone out there maintaining a standard
type rpm<BR>for torque.<BR>I haven't seen much in the way of 1.2.0pX ... I was
wondering if we<BR>could get a contrib type spec file or better yet an actual
working spec<BR>file to be able to run "rpmbuild -tb
torque-1.2.0pX.tar.gz" I thought<BR>I'd ask this, since this fix seems to
refer to rpm building. :-)<BR><BR><BR>-----Original Message-----<BR>From:
torqueusers-bounces@supercluster.org<BR>[<A
href="mailto:torqueusers-bounces@supercluster.org">mailto:torqueusers-bounces@supercluster.org</A>]
On Behalf Of Ole Holm<BR>Nielsen<BR>Sent: Monday, September 19, 2005 9:09
AM<BR>To: torqueusers@supercluster.org<BR>Subject: [torqueusers] Solution:
torque-1.2.0p6 build problem using gcc<BR>3.4 (RHEL4 or FC4)<BR><BR>Dear Torque
users,<BR><BR>We have previously discussed a problem starting LAM-MPI parallel
jobs<BR>with torque-1.2.0p6 in this thread:<BR><A
href="http://www.supercluster.org/pipermail/torqueusers/2005-September/002079">http://www.supercluster.org/pipermail/torqueusers/2005-September/002079</A>.<BR>html<BR><BR>If
you use Torque on Redhat Enterprise Linux 4, Fedora Core 4 or any<BR>other
system using gcc 3.4 (or later), you should know about a problem<BR>caused by a
new feature in gcc 3.4, as well as the solution to this<BR>problem:<BR><BR>We
found that the Torque build process has a problem with gcc 3.4.3,<BR>namely that
a "make install" will cause a second, superfluous<BR>recompilation of
everything. If you're building an RPM, this causes<BR>subtle problems in
the resulting RPMs because some hardcoded paths may<BR>be incorrect. This
was the problem that made LAM-MPI booting fail<BR>because pbs_mom could not find
the pbs_demux executable (see the above<BR>thread).<BR><BR>The quick
summary:<BR>------------------<BR><BR>1. With Torque up to and including
1.2.0p6, a workaround is to<BR> configure Torque with an
additional CFLAGS option<BR> -fno-working-directory, if your
system uses gcc 3.4 or newer.<BR>2. Torque 1.2.0p7 (current snapshot and later)
has a patch in<BR> buildutils/makedepend-sh which is the
permanent solution,<BR> so the -fno-working-directory
workaround is not needed here.<BR><BR>Additional
details:<BR>-------------------<BR><BR>The gcc 3.4 man-page describes a new
feature:<BR>
-fworking-directory<BR>
Enable generation of linemarkers in the preprocessor
output<BR>that<BR>
will let the compiler know the current working directory
at<BR>the<BR>
time of preprocessing. When this option is enabled,
the<BR>prepro-<BR>
cessor will emit, after the initial linemarker, a
second<BR>line-<BR>
marker with the current working directory followed by
two<BR>slashes.<BR>
...<BR><BR>This new default feature causes Torque's buildutils/makedepend-sh
script<BR>to add a dependency of all .o files upon the timestamp of the
current<BR>working directory in the Makefile, in case you use the -g flag in
CFLAGS<BR>(the default). Look for the following pattern in the
Makefile:<BR><BR># DO NOT DELETE THIS LINE -- makedepend-sh depends on
it<BR>accounting.o: ./accounting.c<BR>accounting.o:
/scratch/Torque/torque-1.2.0p6/src/server//<BR><BR>The line terminated with "//"
refers to the current working directory.<BR>This dependency causes all .o files
to be rebuilt every time you do a<BR>"make" in any directory, including the case
where you do a "make<BR>install".<BR><BR>In the case of RPM building, this is a
real problem because all files<BR>will be installed into a temporary
location. The pbs_mom will now have<BR>an incorrect hardcoded path to
pbs_demux and pbs_rcp, for
example,<BR>/var/tmp/torque-1.2.0p6-buildroot/usr/sbin/pbs_demux<BR>(check this
by "strings /usr/sbin/pbs_mom | grep pbs_demux").<BR><BR>In this scenario all
parallel jobs using the "tm" boot interface will<BR>fail because the pbs_demux
process failed to be started by pbs_mom. A<BR>simple test to perform is to
run "pbsdsh hostname"<BR>within a multi-node PBS batch job. If pbsdsh
gives error messages, you<BR>may have the above problem, and other environments
such as LAM-MPI using<BR>the "tm" interface are going to fail as well.<BR><BR>If
you want to patch your current Torque installation, here's the diff<BR>(now in
the CVS for 1.2.0p7) as provided by Garrick:<BR><BR>---
buildutils/makedepend-sh_orig 2005-09-18
10:04:34.000000000<BR>-0700<BR>+++ buildutils/makedepend-sh
2005-09-18 10:04:05.000000000 -0700<BR>@@ -575,6 +575,7
@@<BR><BR>
eval $CPP $arg_cc $d/$s $errout |
\<BR>
sed -n -e "s;^\# [0-9][0-9 ]*\"\(.*\)\";$f: \1;p"
|<BR>\<BR>+
grep -v "$PWD//\$" |
\<BR>
grep -v "$s\$" | grep -v command | grep -v built-in<BR>|
\<BR>
sed -e 's;\([^ :]*: [^ ]*\).*;\1;'
\<BR>
>> $TMP<BR><BR>Many thanks go to Garrick Staples (USC) for much ping-pong
debugging and<BR>for coming up with the patch as well as the
-fno-working-directory<BR>workaround.<BR><BR>--<BR>Ole Holm
Nielsen<BR>Department of Physics, Technical University of
Denmark<BR>_______________________________________________<BR>torqueusers
mailing list<BR>torqueusers@supercluster.org<BR><A
href="http://www.supercluster.org/mailman/listinfo/torqueusers">http://www.supercluster.org/mailman/listinfo/torqueusers</A><BR><BR><BR>_______________________________________________<BR>torqueusers
mailing list<BR>torqueusers@supercluster.org<BR><A
href="http://www.supercluster.org/mailman/listinfo/torqueusers">http://www.supercluster.org/mailman/listinfo/torqueusers</A><BR></FONT></P></DIV>
</BODY>
</HTML>