[sharp-discuss] AutoSHARP crashing after Scaleit

Clemens Vonrhein vonrhein@globalphasing.com
Fri, 13 Sep 2002 07:59:07 +0100


Dear Alex,

I'm afraid this is a feature/bug (?) in Tru64 Unix. I _think_ it has to do with
the way the Bourne executes something like

#!/bin/sh
f=FP
s=SIGFP
scaleit hklin my.mtz <<end_ip
LABI FP=$f SIGFP=$s
END
end_ip

The part between the enclosing 'end_ip' is called a 'here-document' (I
think that's the correct name). To get the variable substitution ($f
and $s) the shell creates a temporary file in /tmp (mostly something
like /tmp/sh$$xyz, where $$ is the process ID and xyz should be
unique) with the substituted variables.

And it seems that under Tru64 these files don't get deleted at the
end. So they could build up and when another script runs and gets the
same process ID (because it's free again) it might try to generate the
same temporary file.

I also only see this on newer/faster machines, so there might be a
timing problem too.

Solution would be to change the complete autoSHARP suite to using
Korn-shell (/bin/ksh) instead of Bourne-shell (/bin/sh). Would be fine
for SGIs and Alphas, where it is part of the system anyway. But
various Linux distros don't automatically include a ksh - it's
optional. But because Bourne shell is standard I decided to use
that. (I know, I should use a modern scripting language like python,
or at least perl ...).

Waht can you do: obviously, you could run it on a non-Tru64 system
(SGI or Linux). Otherwise: make sure to remove old sh* files in /tmp
from time to time. 

BTW, I didn't have that problem on our latest Alpha (yet): Tru64 UNIX
V5.1A (Rev. 1885) with EV6.8CB (21264C) 1GHz chips.

(see also my post at
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=fa.ioh1elv.o74d26%40ifi.uio.no)

I'm not sure that actually helps ...

Cheers

Clemens

PS: please subscribe to sharp-discuss before posting to it, otherwise
your messages might get delayed.


On Thu, Sep 12, 2002 at 04:43:30PM -0500, Alex Taylor wrote:
> Dear SHARP Users,
> 
> I am running into trouble running AutoSHARP using MAD data.  I can 
> howver successfully solve a SAD problem.  The error occurs after scaling 
> the first two wavelengths as listed below using the IF3-C MAD tutorial 
> for example:
> 
> 2.2 second analysis run (exclusion of outliers)
>    (details)    (analysis of scaling)    (analysis of scaling)
> 
> NOTE    : Scale factor = 0.999
> 
> NOTE    : Gradients should be > 1.0 and intercept = 0
> 
> Gradient  [probability > 0.9] (centric) = 0.966
>                                         (acentric) = 0.765
>            Intercept [probability > 0.9] (centric) = -0.068
>                                         (acentric) = -0.019
> 
> R-factor (F)                            = 0.032
>            R-factor (I)                            = 0.040
>            R-factor (weighted)                     = 0.044
> 
> /usr/progs/osf/sharp_090802/bin/sharp/autoSHARP/scaleit.sh: cannot 
> create unique file name in "/tmp". awk: Cannot divide by zero. The input 
> line number is 1. The source line number is 2. awk: Cannot divide by 
> zero. The input line number is 1. The source line number is 2. 
> /usr/progs/osf/sharp_090802/bin/sharp/autoSHARP/scaleit.sh: test: 
> argument expected
> 
> I am running the latest SHARP and SUSHI on an Alpha Tru64 5.1A system 
> with the CCP4 4.2.1 binaries provided by CCP4.  Has anyone experienced 
> these 'cannot create unique file name in "/tmp"' or awk problems and 
> solved them?  I tried assigning different tmp directories for sharp, 
> ccp4, and binsort files and nothing worked so far.
> 
> Thanks,
> 
> Alex
> 
> -- 
> Alex Taylor, Ph.D.
> Department of Biochemistry
> University of Texas Health Science Center at San Antonio
> 
> 
> _______________________________________________
> sharp-discuss mailing list
> sharp-discuss@globalphasing.com
> http://www.globalphasing.com/mailman/listinfo/sharp-discuss

-- 

***************************************************************
* Clemens Vonrhein, Ph.D.          vonrhein@GlobalPhasing.com
*
*  Global Phasing Ltd.
*  Sheraton House, Castle Park     Tel: +44-(0)1223-353033
*  Cambridge CB3 0AX, UK           Fax: +44-(0)1223-366889
*--------------------------------------------------------------
* BUSTER Development Group      (http://www.globalphasing.com)
***************************************************************