Definition of rpn expression doesn't work
Moderators: cyao, michael_borland
Definition of rpn expression doesn't work
Hello,
I wrote a lattice file which includes two lines like this:
% 1.46625 2 * sto Labc
DL : DRIFT, L="Labc"
When I run the program, an error occurred with a warning:
unable to open 1.46625 2 * sto Labc in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
I checked the environment variable setting. It seems that is ok.
I wonder if you can tell me what I should do? Thank you.
Fenggy
BTW: Windows7 system is used.
I wrote a lattice file which includes two lines like this:
% 1.46625 2 * sto Labc
DL : DRIFT, L="Labc"
When I run the program, an error occurred with a warning:
unable to open 1.46625 2 * sto Labc in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
I checked the environment variable setting. It seems that is ok.
I wonder if you can tell me what I should do? Thank you.
Fenggy
BTW: Windows7 system is used.
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Definition of rpn expression doesn't work
Fenggy,
This definitely has the symptoms I would associate with a problem with the RPN_DEFNS environment variable.
Can you check that the defns.rpn file is actually in the location named by RPN_DEFNS?
Also, at the commandline, type "echo $RPN_DEFNS" and see if it returns the expected value.
--Michael
This definitely has the symptoms I would associate with a problem with the RPN_DEFNS environment variable.
Can you check that the defns.rpn file is actually in the location named by RPN_DEFNS?
Also, at the commandline, type "echo $RPN_DEFNS" and see if it returns the expected value.
--Michael
Re: Definition of rpn expression doesn't work
Hello Michael,
I have checked the file's location. They are shown in the figures bellow:
I have checked the file's location. They are shown in the figures bellow:
Re: Definition of rpn expression doesn't work
When I type echo $RPN_DEFNS I get:
C:\WINDOWS\defns.rpn
I am guessing the problem is that elegant does not understand the cygwin directory structure. Somewhere in your cygwin shell it is overwriting the RPN_DEFNS value. Try setting it back to C:\WINDOWS\defns.rpn and see if the problem disappears.
C:\WINDOWS\defns.rpn
I am guessing the problem is that elegant does not understand the cygwin directory structure. Somewhere in your cygwin shell it is overwriting the RPN_DEFNS value. Try setting it back to C:\WINDOWS\defns.rpn and see if the problem disappears.
Re: Definition of rpn expression doesn't work
Hello,
Thank you for your help! I have setting it back to C:\WINDOWS\defns.rpn as you told.But it still doesn't work.
Thank you for your help! I have setting it back to C:\WINDOWS\defns.rpn as you told.But it still doesn't work.
soliday wrote:When I type echo $RPN_DEFNS I get:
C:\WINDOWS\defns.rpn
I am guessing the problem is that elegant does not understand the cygwin directory structure. Somewhere in your cygwin shell it is overwriting the RPN_DEFNS value. Try setting it back to C:\WINDOWS\defns.rpn and see if the problem disappears.
- Attachments
-
- J]DT32Q$04_Q4ZPD%[$Y)SQ.jpg (16.03 KiB) Viewed 3942 times
Re: Definition of rpn expression doesn't work
Hmm, okay, I tested this on my Windows XP laptop. The easy way to test this is with the rpnl command:
$ export RPN_DEFNS=/home/soliday/.defns.rpn
$ echo $RPN_DEFNS
/home/soliday/.defns.rpn
$ ls -ltr /home/soliday/.defns.rpn
-rwx------ 1 soliday None 6622 2010-06-22 13:57 /home/soliday/.defns.rpn
$ rpnl "1.46625 2 * sto Labc"
unable to open /home/soliday/.defns.rpn in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
----------------------------------------------------------------------------
$ export RPN_DEFNS=c:/windows/defns.rpn
$ echo $RPN_DEFNS
c:/windows/defns.rpn
$ ls -ltr c:/windows/defns.rpn
-rw-r--r-- 1 soliday None 6622 2006-08-22 10:56 c:/windows/defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
---------------------------------------------------------------------------
$ export RPN_DEFNS=c:\\windows\\defns.rpn
$ echo $RPN_DEFNS
c:\windows\defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
-------------------------------------------------------------------------
Can you test to see if the rpnl program works? Also verify c:\windows\defns.rpn exists on your system.
$ export RPN_DEFNS=/home/soliday/.defns.rpn
$ echo $RPN_DEFNS
/home/soliday/.defns.rpn
$ ls -ltr /home/soliday/.defns.rpn
-rwx------ 1 soliday None 6622 2010-06-22 13:57 /home/soliday/.defns.rpn
$ rpnl "1.46625 2 * sto Labc"
unable to open /home/soliday/.defns.rpn in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
----------------------------------------------------------------------------
$ export RPN_DEFNS=c:/windows/defns.rpn
$ echo $RPN_DEFNS
c:/windows/defns.rpn
$ ls -ltr c:/windows/defns.rpn
-rw-r--r-- 1 soliday None 6622 2006-08-22 10:56 c:/windows/defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
---------------------------------------------------------------------------
$ export RPN_DEFNS=c:\\windows\\defns.rpn
$ echo $RPN_DEFNS
c:\windows\defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
-------------------------------------------------------------------------
Can you test to see if the rpnl program works? Also verify c:\windows\defns.rpn exists on your system.
Re: Definition of rpn expression doesn't work
Hello soliday,
Thank you for your advice. I have tested this. There is a little bit difference:
1. (same with you)
$ export RPN_DEFNS=/home/fenggy/.defns.rpn
$ echo $RPN_DEFNS
/home/fenggy/.defns.rpn
$ ls -ltr /home/fenggy/.defns.rpn
-rwxr-xr-x 1 fenggy Domain users 6622 Aug 22 /home/fenggy/.defns.rpn
$ rpnl "1.46625 2 * sto Labc"
unable to open /home/fenggy/.defns.rpn in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
2.
$ export RPN_DEFNS=c:/windows/defns.rpn
$ echo $RPN_DEFNS
c:/windows/defns.rpn
$ ls -ltr c:/windows/defns.rpn
cygwin warning:
MS-DOS stye path detected: c:/windows/defns.rpn
preferred POSIX equivalent is: /cygdrive/c/windows/defns.rpn
CYGWIN environment variable option "nodosfilewarning"turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
-rw-r--r-- 1 fenggy Domain users 7048 Feb 8 09:12 c:/windows/defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
3.
$ export RPN_DEFNS=c:\\windows\\defns.rpn
$ echo $RPN_DEFNS
c:\windows\defns.rpn
$ ls -ltr c:\\windows\\defns.rpn
$ -rw-r--r-- 1 fenggy Domain users 7048 Feb 8 09:12 c:\windows\defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
I try to run the software again. Unfortunately,it still doesn't work.
Thank you for your advice. I have tested this. There is a little bit difference:
1. (same with you)
$ export RPN_DEFNS=/home/fenggy/.defns.rpn
$ echo $RPN_DEFNS
/home/fenggy/.defns.rpn
$ ls -ltr /home/fenggy/.defns.rpn
-rwxr-xr-x 1 fenggy Domain users 6622 Aug 22 /home/fenggy/.defns.rpn
$ rpnl "1.46625 2 * sto Labc"
unable to open /home/fenggy/.defns.rpn in mode r: No such file or directory
ensure the RPN_DEFNS environment variable is set
2.
$ export RPN_DEFNS=c:/windows/defns.rpn
$ echo $RPN_DEFNS
c:/windows/defns.rpn
$ ls -ltr c:/windows/defns.rpn
cygwin warning:
MS-DOS stye path detected: c:/windows/defns.rpn
preferred POSIX equivalent is: /cygdrive/c/windows/defns.rpn
CYGWIN environment variable option "nodosfilewarning"turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.h ... -pathnames
-rw-r--r-- 1 fenggy Domain users 7048 Feb 8 09:12 c:/windows/defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
3.
$ export RPN_DEFNS=c:\\windows\\defns.rpn
$ echo $RPN_DEFNS
c:\windows\defns.rpn
$ ls -ltr c:\\windows\\defns.rpn
$ -rw-r--r-- 1 fenggy Domain users 7048 Feb 8 09:12 c:\windows\defns.rpn
$ rpnl "1.46625 2 * sto Labc"
2.9325
I try to run the software again. Unfortunately,it still doesn't work.
Re: Definition of rpn expression doesn't work
It seems that maybe there is some thing wrong about the percent sign % .
When I change the parameters setting like:
% 1.46625 2 * sto Labc
DL : DRIFT, L= 2.9325
it means parameters of elements are independent on the variable "Labc". But it still doesn't work.
When I change the parameters setting like:
% 1.46625 2 * sto Labc
DL : DRIFT, L= 2.9325
it means parameters of elements are independent on the variable "Labc". But it still doesn't work.
Re: Definition of rpn expression doesn't work
Maybe it is ok about the rpn expression. When I change the lattice file like:
! % 1.46625 2 * sto Labc
DL : DRIFT, L= 1.46625 2 *
It works well.
If the file is modified like:
% 2.9325 sto Labc
DL : DRIFT, L= "Labc"
or like:
% 2.9325 sto Labc
DL : DRIFT, L= 2.9325
They all don't work.
I doubt the value of "Labc" is really 2.9325 now.
! % 1.46625 2 * sto Labc
DL : DRIFT, L= 1.46625 2 *
It works well.
If the file is modified like:
% 2.9325 sto Labc
DL : DRIFT, L= "Labc"
or like:
% 2.9325 sto Labc
DL : DRIFT, L= 2.9325
They all don't work.
I doubt the value of "Labc" is really 2.9325 now.
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Definition of rpn expression doesn't work
Fenggy,
I just verified that the "%" feature in the lattice file works as expected, so it is apparently a misconfiguration problem on your system.
Can you upload the command file, lattice file, and defns.rpn files you are using so we can try to replicate the problem?
--Michael
I just verified that the "%" feature in the lattice file works as expected, so it is apparently a misconfiguration problem on your system.
Can you upload the command file, lattice file, and defns.rpn files you are using so we can try to replicate the problem?
--Michael