[comp.sys.sgi] Problems with optimization

cbas25@vaxa.strath.ac.uk (02/08/91)

I have been trying to compile a rather large (Fortran) program
using the -O3 directive to do all optimizations.  Under these
conditions the compilation fails with the error message:-

usplit: Error: cannot read/write ucodes from/to /tmp/ctmlua01046//
               tmp/ctmsa01046: Error 0

(the message appears all on one line), together with the message:-

                       dks0dls0 out of space.

When compiled without optimization there are no errors, and the 
compiled program works normally.
I am running this on a Personal Iris 4D20 with 12Mbytes of memory
and the usual 380 Mbyte disk.  On the disk the /dev/root filesystem
has 10663 blocks available (out of 31050), and the /dev/usr filesystem 
has 45401 blocks available (out of 482816), but I can probably get the
percent usage down to about 87% quite easily.  The total size of the
ucode files (*.u) is 4768829 bytes, of which the largest file has
978588 bytes. (Each file consists of several smaller routines, and I
would prefer not to have to split them up). When compiled without
optimization the final exectuable file amounts to 1750460 bytes.

Can anybody help??      What am I doing wrong??   Any advice will
be much appreciated.

Thanks
Peter Bladon 

scotth@corp.sgi.com (Scott Henry) (02/08/91)

In article <1991Feb8.215810.29895@odin.corp.sgi.com> micah@flobb4.csd.sgi.com (Micah Altman) writes:

m> In <1991Feb8.140148.9947@vaxa.strath.ac.uk> cbas25@vaxa.strath.ac.uk writes:

>I have been trying to compile a rather large (Fortran) program
>using the -O3 directive to do all optimizations.  Under these
>conditions the compilation fails with the error message:-

>usplit: Error: cannot read/write ucodes from/to /tmp/ctmlua01046//
>               tmp/ctmsa01046: Error 0

>(the message appears all on one line), together with the message:-

>                       dks0dls0 out of space.

m> This means that you are running out of space on /dev/root for the
m> tmp files created during the compilation/optimization process.

>Can anybody help??      What am I doing wrong??   Any advice will

m> Make more space on /dev/root? Change the partition size? Create a symbolic
m> link between /tmp and /usr/tmp?

`setenv TMPDIR /usr/tmp` solves this for me. I haven't found any comamnds
that make big temp files that don't respect TMPDIR (or use . for temp
files).

--
 Scott Henry <scotth@sgi.com> / Traveller on Dragon Wings
 Information Services,       / Help! My disclaimer is missing!
 Silicon Graphics, Inc      / Politicians no baka!

paquette@fsd.cpsc.ucalgary.ca (Trevor Paquette) (02/09/91)

In article <1991Feb8.140148.9947@vaxa.strath.ac.uk> cbas25@vaxa.strath.ac.uk writes:
>
>
>I have been trying to compile a rather large (Fortran) program
>using the -O3 directive to do all optimizations.  Under these
>conditions the compilation fails with the error message:-
>
>usplit: Error: cannot read/write ucodes from/to /tmp/ctmlua01046//
>               tmp/ctmsa01046: Error 0
>
>(the message appears all on one line), together with the message:-
>
>                       dks0dls0 out of space.
>

 This is simple.. your root partition is not big enough. When compiling
files the linker uses /tmp as a temp storage location for sundry
files needed in compiling. 
  You can do a coule of things here:
     1) increase the size of your root parition. Don't try this unless you
        know what you are doing
     2) make /tmp a link to /usr/tmp. (Or to a tmp dir on a partition with more
        space
     3) There should be a compiler directive (can't remember which one it is)
        to use a different directory for the tmp storage location

  Trev
-- 
______________________________________/Abandon all hope ye who enter           
Trevor Paquette ICBM:51'03"N/114'05"W |   - Gate Keeper of Labyrinth [~]    [~]
uunet![utai,alberta]!calgary!paquette |All who enter are abandoned...| |^^^^| |
paquette@cpsc.ucalgary.ca             |   - Survivor of Labyrinth    |_|_/\_|_|

micah@flobb4.csd.sgi.com (Micah Altman) (02/09/91)

In <1991Feb8.140148.9947@vaxa.strath.ac.uk> cbas25@vaxa.strath.ac.uk writes:



>I have been trying to compile a rather large (Fortran) program
>using the -O3 directive to do all optimizations.  Under these
>conditions the compilation fails with the error message:-

>usplit: Error: cannot read/write ucodes from/to /tmp/ctmlua01046//
>               tmp/ctmsa01046: Error 0

>(the message appears all on one line), together with the message:-

>                       dks0dls0 out of space.

This means that you are running out of space on /dev/root for the
tmp files created during the compilation/optimization process.

>When compiled without optimization there are no errors, and the 
>compiled program works normally.

The -O3 optimization level creates larger temporary files than
-O2 optimization. ( At O3 there are more stages of optimization,
more temp files are created, code is run through different optimizer
programs, etc, etc, etc,
see the Iris-4D Series Compiler Guide for more info ).

>Can anybody help??      What am I doing wrong??   Any advice will

Make more space on /dev/root? Change the partition size? Create a symbolic
link between /tmp and /usr/tmp?
--
	"Entia non sunt multiplicanda sine necessitate." - William of Ockham

	Micah Altman				micah@csd.sgi.com
	"Computational Juggler"			Phone (415) 335-1866