Closed TheoPannetier closed 11 months ago
There are three possible ways to invoke the batch-only version:
- Copy the batch executable file to the working directory you wish to use, and run the program from there. As with the GUI version, the working directory is required to have three sub-folders named Inputs, Outputs and Output_Maps. The Control File (in the Inputs folder) must take the name CONTROL.txt.
- Run the batch executable file from a script (or command line), passing it as a single argument the full path name (including final back-slash character) of the working directory you wish to use, which must not contain any embedded spaces. As above, the Control File must take the name CONTROL.txt. For example: c:\Programs\RangeShifter_v2.0.1 c:\Projects\Connectivity\
- Run the batch executable file from a script (or command line), passing it two arguments, the first being the full path name of the working directory (as above) and the second being the name of the Control File within its Inputs folder. In this case, the Control File may have any name, as long as it contains no embedded spaces. For example: c:\Programs\RangeShifter_v2.0.1 c:\Projects\Connectivity\ Expt1_control.txt
- Copy the batch executable file to the working directory you wish to use, and run the program from there. As with the GUI version, the working directory is required to have three sub-folders named Inputs, Outputs and Output_Maps. The Control File (in the Inputs folder) must take the name CONTROL.txt.
This works, assuming the project directory is the working directory:
./rs.exe
- Run the batch executable file from a script (or command line), passing it as a single argument the full path name (including final back-slash character) of the working directory you wish to use, which must not contain any embedded spaces. As above, the Control File must take the name CONTROL.txt. For example: c:\Programs\RangeShifter_v2.0.1 c:\Projects\Connectivity\
This works fine too, e.g.:
~/rs.exe ~/github/RangeShifter_batch_dev/run_on_gha/rs_test_project/
Run the batch executable file from a script (or command line), passing it two arguments, the first being the full path name of the working directory (as above) and the second being the name of the Control File within its Inputs folder. In this case, the Control File may have any name, as long as it contains no embedded spaces. For example: c:\Programs\RangeShifter_v2.0.1 c:\Projects\Connectivity\ Expt1_control.txt
This does not work, I get
~/rs.exe ~/github/RangeShifter_batch_dev/run_on_gha/rs_test_project/ ctrl_file.txt
Error opening Control file: C:\Users\s02tp3/github/RangeShifter_batch_dev/run_on _gha/rs_test_project/Inputs/CONTROL0.txt
Where CONTROL0.txt is neither the name of the control file or the argument I passed. Seems to be produced internally by BatchMode
EDIT: this appears to be intentional, caused by theis line https://github.com/RangeShifter/RangeShifter_batch_dev/blob/7b52b857a644ba852205e41650ac0171787560fb/src/Main.cpp#L148
I'm guessing this is something automated to run indexed batches on the HPC
All of the above with RSDEBUG 1, LINUX_CLUSTER 1
Turning LINUX_CLUSTER off, I do get the expected behaviour for all three options. Problem solved!
So far, I have only managed to run the compiled RangeShifter from within a project directory. The user manual suggest one should also be able to run it from outside by passing the path to the project directory as Rangeshifter's first argument.