I work on Windows. I have a workflow for one of my projects that looks like this:
Now, that C++ program, in addition to creating output files, because it runs for a long time, also outputs progress reports to the window created by -shell-. Those progress reports are of no value once the program has completed, and they disappear with the -shell- window.
I now need to run a script similar to this, but where the number of iterations of the loop is going to be very large and the total execution time will be measured in months. Since each iteration of the loop could, in principle, be done independently of all the others, I have persuaded some colleagues to let me run this on their computers, dividing up the work. The catch is that some of them use Macs. According to the Stata documentation, -shell-, when run on Mac, will redirect all those progress reports from the C++ program to the Results window. That's not necessary, and not desirable as the information in the Results window about which iteration of the loop we are on will scroll off the screen.
From the documentation, it looks to me as if the -xshell- command is what I need. Am I correct in understanding that -xshell- on Mac does both of the following?
1. Opens a separate window for the C++ program which will receive the progress report outputs and then close once the C++ program terminates, sending nothing to the Results window.
2. Suspends Stata until the program run under -xshell- terminates.
I don't have a Mac available to try this out on. I know there are a lot of Mac users on Statalist, so I'm hoping one of them will advise me.
Code:
foreach x of .... { // DO THINGS BASED ON `x' TO CREATE AND EXPORT SOME TEXT FILES shell executable_compiled_from_c++_program_using_those_t ext_files_as_inputs_creating_new_output_files // USE OUTPUT FILES CREATED BY THE ABOVE EXECUTABLE AS INPUTS // TO CREATE FINAL OUTPUT FILES (.DTA AND .XLSX). }
I now need to run a script similar to this, but where the number of iterations of the loop is going to be very large and the total execution time will be measured in months. Since each iteration of the loop could, in principle, be done independently of all the others, I have persuaded some colleagues to let me run this on their computers, dividing up the work. The catch is that some of them use Macs. According to the Stata documentation, -shell-, when run on Mac, will redirect all those progress reports from the C++ program to the Results window. That's not necessary, and not desirable as the information in the Results window about which iteration of the loop we are on will scroll off the screen.
From the documentation, it looks to me as if the -xshell- command is what I need. Am I correct in understanding that -xshell- on Mac does both of the following?
1. Opens a separate window for the C++ program which will receive the progress report outputs and then close once the C++ program terminates, sending nothing to the Results window.
2. Suspends Stata until the program run under -xshell- terminates.
I don't have a Mac available to try this out on. I know there are a lot of Mac users on Statalist, so I'm hoping one of them will advise me.
Comment