changed all executables from .x to enable .exe in Windows environment
per Rob's suggestion - changed '.x' to {"posix":"x", "nt":"exe"}[os.name]
Merge request reports
Activity
requested review from @lefebvre
assigned to @kkiesling
mentioned in merge request !236 (merged)
Important discovery... on Windows, the .pyarc.rc paths must use forward slashs '/'. Use of backslashes produces file paths that os.path.isfile fails to properly identify causing PyARC to stop.
>>> os.path.isfile("C:\Workbench-5.3.1\PyARC\arc/mcc3.exe") False >>> os.path.isfile("C:\\Workbench-5.3.1\\PyARC\\arc/mcc3.exe") True
.pyarc.rc:
[exec] path = C:/Workbench-5.3.1/PyARC/arc workbench_path=C:/Workbench-5.3.1
@kkiesling where can we best document this for the user?
- Resolved by Stauff, Nicolas Emile
Another issue might be the use of Linux system calls.
'pwd' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'ln' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'ln' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'ln' is not recognized as an internal or external command, operable program or batch file.
The 'rm' calls are likely the most problematic and should be replaced with python platform-independent calls:
I have a meetings morning I need to run to, but I can take a look at addressing this after 12 ET if desired.
Currently, Sample_1_ABTR_MCC3_DIF3D/ABTR_Tutorial_Sample1.son is running on my Windows machine
- Resolved by Stauff, Nicolas Emile
Another issue is Windows does file locks that can prevent actions such as file removal.
Run MCC3 for calculation R at time-step 0 Run MCC3 - step 1 Traceback (most recent call last): File "C:\Workbench-5.3.1\PyARC\PyARC.py", line 972, in <module> this.execute(sys.argv[1:]) File "C:\Workbench-5.3.1\PyARC\PyARC.py", line 838, in execute self.mcc3.workflow(calc_id, time_step) File "C:\Workbench-5.3.1\PyARC\PyMCC3.py", line 87, in workflow self.run(calc_id, time_step) File "C:\Workbench-5.3.1\PyARC\PyMCC3.py", line 1221, in run shutil.rmtree("tmp_mcc3") File "C:\Workbench-5.3.1\rte\conda\lib\shutil.py", line 740, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Workbench-5.3.1\rte\conda\lib\shutil.py", line 622, in _rmtree_unsafe onerror(os.rmdir, path, sys.exc_info()) File "C:\Workbench-5.3.1\rte\conda\lib\shutil.py", line 620, in _rmtree_unsafe os.rmdir(path) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'tmp_mcc3'
- Resolved by Stauff, Nicolas Emile
Just my two cents - making this all windows compatible is not a quick effort that can be easily done correctly before the Workbench release next Friday. As we are seeing there are a number of issues already. We need to be thorough in making sure these changes are implemented across all files reliably. We should definitely work to get this all working on Windows, but I am not sure we can do this in the short timeline (I really don't have much time at the moment to dedicate to this).
Also- OpenMC does not run on Windows, so we need to add an OS check in the prerun and also update the setup scripts to check for Windows there too. Have either of you tried doing the setup process to see what works there? Does DASSH and PyGriffin work on Windows?
(I do not have a windows machine to test any windows compatibility)
- Resolved by Stauff, Nicolas Emile
added 1 commit
- 7b279b70 - user object defined with executable extension
added 1 commit
- 48d0b09c - fixed execution issue with MCC3 in Windows environment. updated CHANGELOG for this MR
added 1 commit
- 1fb05155 - updated logic for removing temporary files - keeping them in case not...
OK - the current version is now working on Windows for the requested customer's workflow. There is still work needed to accommodate different parts of workflow (PERSENT, GAMSOR, OpenMC, DASSH, etc.) - but those are not required right now on Windows customers. Could @lefebvre and @kkiesling please provide a quick review and issue a release soon?