Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module fails to compile on windows if the file doesn't have a ".exe" extension #102

Closed
shawnafang opened this issue Feb 2, 2023 · 7 comments · Fixed by #119 or #276
Closed

Module fails to compile on windows if the file doesn't have a ".exe" extension #102

shawnafang opened this issue Feb 2, 2023 · 7 comments · Fixed by #119 or #276
Assignees
Labels
bug Something isn't working

Comments

@shawnafang
Copy link
Collaborator

shawnafang commented Feb 2, 2023

when running the example_of_use, if using the

mp <- sampleStanModel(
    jm,
    data = stan_data,
    iter_sampling = 1000,
    iter_warmup = 1000,
    chains = 1,
    parallel_chains = 1,
    exe_file = file.path("local","full")
)

It failed with error:

Error in `process_initialize(self, private, command, args, stdin, stdout, ...`:
! Native call to `processx_exec` failed
Caused by error in `chain_call(c_processx_exec, command, c(command, args), pty, pty_options, ...`:
! Command 'C:/Users/fangx22/Documents/GitHub/jmpost/local/full' not found @win/processx.c:982 (processx_exec)

While replacing the exe_file = file.path("local","full") with exe_file=file.path() , it works

might need help to figure out why path of "local/full' does not work.

@shawnafang shawnafang added the BackLog May consider working on sometime in the future label Feb 2, 2023
@gowerc
Copy link
Collaborator

gowerc commented Mar 16, 2023

I think this issue is because the "local" directory doesn't exist on your computer so its probably erroring rather than creating it, will add some code to create the directory if it doesn't already exist.

@gowerc gowerc added bug Something isn't working complexity: Simple and removed BackLog May consider working on sometime in the future labels Mar 16, 2023
@gowerc gowerc changed the title joint model compiling failed at the example_of_use Model fails to compile if directory for exe file doesn't exist Mar 16, 2023
@gowerc gowerc reopened this Mar 17, 2023
@gowerc
Copy link
Collaborator

gowerc commented Mar 17, 2023

@shawnafang , I've updated the function to create missing directories. That being said re-reading your message I am wondering if the issue is that its missing the exe extension...

Would you mind re-running the example of use as is to see if it re-creates the error ? If it does would you mind changing the argument to exe_file = file.path("local", "full.exe") and seeing if that fixes it ?

@shawnafang
Copy link
Collaborator Author

@shawnafang , I've updated the function to create missing directories. That being said re-reading your message I am wondering if the issue is that its missing the exe extension...

Would you mind re-running the example of use as is to see if it re-creates the error ? If it does would you mind changing the argument to exe_file = file.path("local", "full.exe") and seeing if that fixes it ?

The current version using exe_file = file.path("local", "full") still creat the same error, but exe_file = file.path("local", "full.exe") do fix it.

@gowerc
Copy link
Collaborator

gowerc commented Mar 28, 2023

Ok ya so its a file extension issue with windows expecting .exe hmm ok. Does it work or do you get an error if you omit the argument (i.e. just delete the exe_file = ... line) ?

@shawnafang
Copy link
Collaborator Author

image

From the screenshot, you can see you have to give exe_file =NULL to make it work, otherwise it will report the error of "argument missing with no default"

@gowerc
Copy link
Collaborator

gowerc commented Mar 28, 2023

O no sorry, I mean delete the entire line not just leave the argument blank, as in:

sampleStanModel(
  jm,
  data = jdat,
  iter_sampling = 1000,
  iter_warmup = 1000,
  chains = 1,
  parallel_chains = 1
)

@shawnafang
Copy link
Collaborator Author

O no sorry, I mean delete the entire line not just leave the argument blank, as in:

sampleStanModel(
  jm,
  data = jdat,
  iter_sampling = 1000,
  iter_warmup = 1000,
  chains = 1,
  parallel_chains = 1
)

Yes, I have tried. If so, it will show the error of "argument missing with no default"

@gowerc gowerc changed the title Model fails to compile if directory for exe file doesn't exist Module fails to compile on windows if the file doesn't have a ".exe" extension Apr 28, 2023
@gowerc gowerc added this to the Initial Internal Release milestone Feb 1, 2024
@gowerc gowerc self-assigned this Mar 1, 2024
@github-project-automation github-project-automation bot moved this to Done in Tasks Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
2 participants