joergen7 / cuneiform

Cuneiform distributed programming language
https://cuneiform-lang.org/
Apache License 2.0
232 stars 16 forks source link

Cannot locate python script with custom base directory #75

Closed cskinx closed 7 years ago

cskinx commented 7 years ago

When executing python tasks, the script cannot be found when specifying a base directory with the -b argument:

sonic schiefec 23 ( bih ) $ cat pytest.cf
deftask printout(greeting : name) in python *{
    greeting = "hello "+name
}*

printout(name: "siegfried");

sonic schiefec 20 ( bih ) $ cuneiform -v
2.2.1-snapshot
sonic schiefec 21 ( bih ) $ cuneiform pytest.cf

=INFO REPORT==== 25-Nov-2016::13:44:36 ===
Base directory:    /tmp/cf-119
Number of threads: 80
"hello siegfried" 
sonic schiefec 22 ( bih ) $ cuneiform pytest.cf -b pytest_cache

=INFO REPORT==== 25-Nov-2016::13:44:47 ===
Base directory:    pytest_cache-2
Number of threads: 80
[out]
sh: /local/schiefec/bih/pytest_cache-2/work/1/pytest_cache-2/work/1/_script.py: No such file or directory

[script]
   1  #!/usr/bin/env python
   2  import sys
   3  
   4  name='siegfried'
   5  
   6  
   7  if True:
   8   
   9    greeting = "hello "+name
  10   
  11  print("<MSG>#{\"greeting\"=>[{str,\""+str(greeting)+"\"}]}.\n")
  12  
  13  
  14  

Line 5: script error in call to printout (id: 1)
joergen7 commented 7 years ago

With the current snapshot it seems to work. If the problem persists, I'd really want to take a look at your setup in person.

Cheers

jorgen@davinci:~/git/cuneiform/_build/default/bin$ ./cuneiform -v
2.2.2-snapshot

jorgen@davinci:~/git/cuneiform/_build/default/bin$ ./cuneiform -b /tmp/blub /home/jorgen/test.cf

=INFO REPORT==== 11-Jan-2017::11:56:01 ===
Base directory      /tmp/blub-3
Number of threads   4
Remote Logging      false
Profiling           false
"hello siegfried" 
jorgen@davinci:~/git/cuneiform/_build/default/bin$ 
joergen7 commented 7 years ago

I tried it again with the 2.2.1-release and it also worked. I have used a clean build, making sure no other Cuneiform builds linger in any part of my test machine. Since I'm absolutely not able to reproduce this behavior and there hasn't been any further input I'm closing this issue now.

[jorgen@davinci bin]$ ./cuneiform -b /home/jorgen/blub

=INFO REPORT==== 13-Mar-2017::09:09:38 ===
Base directory:    /tmp/cf-1
Number of threads: 4
            ___
           @@WB      Cuneiform
          @@E_____   2.2.1-release 2016-10-17
     _g@@@@@WWWWWWL
   g@@#*`3@B         Type help for usage info.
  @@P    3@B
  @N____ 3@B         http://www.cuneiform-lang.org
  "W@@@WF3@B

> deftask greet( out : person ) in Python *{
  out="hello "+person
}*
> greet( person: "blub" );
"hello blub" 
> quit