Skip to content
Snippets Groups Projects

changed all executables from .x to enable .exe in Windows environment

Merged Stauff, Nicolas Emile requested to merge windows_compatibility into development

per Rob's suggestion - changed '.x' to {"posix":"x", "nt":"exe"}[os.name]

Merge request reports

Pipeline #464363 passed

Pipeline passed for ba5a646d on windows_compatibility

Merged by Kiesling, Kalin RoseKiesling, Kalin Rose 1 year ago (Oct 6, 2023 2:07pm UTC)

Loading

Pipeline #464593 passed

Pipeline passed for 2d5b9c0d on development

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • requested review from @lefebvre

  • Lefebvre, Robert Alexander approved this merge request

    approved this merge request

  • mentioned in merge request !236 (merged)

  • Lefebvre, Robert Alexander unapproved this merge request

    unapproved this merge request

  • added 1 commit

    • 127d3d8a - Make SCL lookup based on location of module

    Compare with previous version

    • 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?

    • README where it describes the contents of the .pyarc.rc file would be the best place to document.

    • Please register or sign in to reply
    • 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:

      image

      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'
  • added 1 commit

    • 6d9b60ea - updated all links to work in Windows

    Compare with previous version

  • added 1 commit

    • 72c23887 - adding warning to utilities covmat

    Compare with previous version

  • added 1 commit

    Compare with previous version

    • 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)

  • added 1 commit

    • 7b279b70 - user object defined with executable extension

    Compare with previous version

  • added 1 commit

    • 48d0b09c - fixed execution issue with MCC3 in Windows environment. updated CHANGELOG for this MR

    Compare with previous version

  • added 1 commit

    • 1fb05155 - updated logic for removing temporary files - keeping them in case not...

    Compare with previous version

  • added 1 commit

    • 964fce68 - cleanup directory that we fail to remove

    Compare with previous version

  • 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?

  • added 2 commits

    • 2e778668 - 1 commit from branch development
    • 3d1727fd - Merge branch 'development' into 'windows_compatibility'

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading