gvegayon / parallel

PARALLEL: Stata module for parallel computing
https://rawgit.com/gvegayon/parallel/master/ado/parallel.html
MIT License
118 stars 26 forks source link

parallel_normalizepath(): 601 file not found #95

Closed olivurb closed 2 years ago

olivurb commented 3 years ago

Hi,

I am trying to use "parallel do" in a simple way. When I execute the do file without parallel it works fine. But with parallel, it does not work.

Here the code I use

          global    temp        "C:\Temp"
          global    do          "D:\Dropbox\mydofiles"
          cd "$temp"              
          local i 2            
          parallel setclusters 8
          parallel do "$do/do_combinations" `i' qnet9, by(ticker_fpedats)          

I get the following message error after parallel do

          parallel_normalizepath():   601  file not found
                           <istmt>:     -  function returned error

Any idea of what I do wrong, or how to fix this issue?

Thank you !

jason-struck commented 3 years ago

I think you need to add the file extension:

parallel do "$do/do_combinations.do" ...

parallel_normalizepath() uses the fileexists() command to check if the dofile exists. From the source code for parallel_normalizepath():

// Verifying if there is anything
if (fileexists(fullpath)) isfile = 1
else if (direxists(fullpath)) isfile = 0
else _error(601)

fileexists() seems to require a file extension. If we have "mydofile.do" in the current working directory:

. di fileexists("mydofile.do")
1

. di fileexists("mydofile")
0

If you do not include the extension, you will get the 601 error as you observed.