error message in smoothDist6

Moderators: cyao, michael_borland

Post Reply
hskang
Posts: 5
Joined: 09 Aug 2010, 20:21

error message in smoothDist6

Post by hskang » 15 Oct 2014, 09:51

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

michael_borland
Posts: 1959
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: error message in smoothDist6

Post by michael_borland » 15 Oct 2014, 09:56

Heung-Sik,

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

--Michael

hskang
Posts: 5
Joined: 09 Aug 2010, 20:21

Re: error message in smoothDist6

Post by hskang » 17 Oct 2014, 04:34

Michael,

The /tmp directory exists within cygwin.

Heung-Sik

michael_borland
Posts: 1959
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: error message in smoothDist6

Post by michael_borland » 17 Oct 2014, 12:31

Heung-Sik,

Do you have write permission? Try

Code: Select all

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

hskang
Posts: 5
Joined: 09 Aug 2010, 20:21

Re: error message in smoothDist6

Post by hskang » 26 Nov 2014, 10:23

echo test > /tmp/myTestFile.txt
It works well.

Heung-Sik

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: error message in smoothDist6

Post by soliday » 05 Dec 2014, 12:06

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.

hskang
Posts: 5
Joined: 09 Aug 2010, 20:21

Re: error message in smoothDist6

Post by hskang » 05 Jan 2015, 09:41

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

soliday
Posts: 405
Joined: 28 May 2008, 09:15

Re: error message in smoothDist6

Post by soliday » 08 Jan 2015, 13:16

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

hskang
Posts: 5
Joined: 09 Aug 2010, 20:21

Re: error message in smoothDist6

Post by hskang » 12 Jan 2015, 08:04

Dear Soliday,

It does work well.
Many thanks.

Heung-Sik

Post Reply