I'll bet you anything that the problem you are having with Xpsec is what you suspected perl of doing.
If it works most of the time but only sometimes fails then the most likely problem is that it has troubles with multiple threads and fast CPU's that might actually be able to complete their tasks so fat that the original programmer never expected this to be possible and thus didn't bother to check for this.
One good option would be to find a mailing list for: Xspec and ask if others find the same issues, check to see if there is a new release etc.
For the time being try to do the following in your code:
until ( -e "${tmp}xsfit.dat" ) { bjmsys("xspec - ${tmp}.xcm", $v); } open(DAT, "${tmp}xsfit.dat") || die ("Could not open file!"); my @kT=<DAT>; close DAT;
This will basically make sure that the file exists and only then continue if the file does not exist it will simply try to create is again, and again until the file is there. It is a very crude way of working but it will certainly do the trick.
As long as Xspec does not take for ever and ever before it fails you should be saved until the Xspec problem is resolved.
In reply to Re^3: Runing "regular" code with threaded perl
by RatKing
in thread Runing "regular" code with threaded perl
by kingskot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |