Page 1 of 1

error message in smoothDist6

Posted: 15 Oct 2014, 09:51
by hskang
Dear Michael,

I am trying to use "smoothDist6s" . But an error message comes out like:

$ smoothDist6s -input a1_a4j8_200k.sdds -output a1_s.sdds -factor 2 -rippleAmplitude 5
-rippleWavelength 1
Error1: Error for C:\Program Files (x86)\APS\SDDS ToolKit\sddspfit.exe:
Unable to open file /tmp/tmp5588-Staff.fit for writing (SDDS_InitializeOutput)

I am using cygwin in Windows PC. Please help me to solve this.


Heung-Sik

Re: error message in smoothDist6

Posted: 15 Oct 2014, 09:56
by michael_borland
Heung-Sik,

My guess is that you need to create the /tmp directory within cygwin or give yourself write permission.

--Michael

Re: error message in smoothDist6

Posted: 17 Oct 2014, 04:34
by hskang
Michael,

The /tmp directory exists within cygwin.

Heung-Sik

Re: error message in smoothDist6

Posted: 17 Oct 2014, 12:31
by michael_borland
Heung-Sik,

Do you have write permission? Try

Code: Select all

echo test > /tmp/myTestFile.txt
--Michael

Re: error message in smoothDist6

Posted: 26 Nov 2014, 10:23
by hskang
echo test > /tmp/myTestFile.txt
It works well.

Heung-Sik

Re: error message in smoothDist6

Posted: 05 Dec 2014, 12:06
by soliday
The problem is that /tmp is a cygwin concept and sddspfit is not a cygwin program so it doesn't know how to access it. I believe I have a solution. Try editing smoothDist6s and replacing:

set tmpRoot /tmp/tmp[pid]-$env(USER)

with

if {$tcl_platform(platform) == "windows"} {
set tmpPrefix [join [split $env(temp) \\] /]
} else {
set tmpPrefix /tmp
}
set tmpRoot ${tmpPrefix}/tmp[pid]-$env(USER)

Let me know if this fixes it for you.

Re: error message in smoothDist6

Posted: 05 Jan 2015, 09:41
by hskang
Dear Soliday,

Thank you for your help.
I tried to do as you recommend, but I failed to have the same result.

Error1: Error for C:\Program Files (x86)\APS\SDDS ToolKit\sddspfit.exe:
Unable to open file /tmp/tmp8948-Staff.fit for writing (SDDS_InitializeOutput)

Please check the file I edit attached.
Happy New Year!

Regards,

Heung-Sik

Re: error message in smoothDist6

Posted: 08 Jan 2015, 13:16
by soliday
Not sure why it isn't working but you can try to force it to use c:/temp by changing:

set tmpRoot /tmp/tmp[pid]-$env(USER)
to
set tmpRoot c:/temp/tmp[pid]-$env(USER)

You will have to make the c:/temp directory if it doesn't already exist.

This will remove /tmp completely from the script

Re: error message in smoothDist6

Posted: 12 Jan 2015, 08:04
by hskang
Dear Soliday,

It does work well.
Many thanks.

Heung-Sik