[MITgcm-support] [EXTERNAL] Help writing an optfile for mingw64_nt-10.0-19041_amd64

Dimitris Menemenlis menemenlis at jpl.nasa.gov
Mon May 17 18:14:14 EDT 2021


Hi Dominic, in the past, folks have used cygwin or VirtualBox to run MITgcm on windows.
For example, https://github.com/MITgcm-contrib/ecco_darwin/blob/master/MITgcm_VirtualBox.txt <https://github.com/MITgcm-contrib/ecco_darwin/blob/master/MITgcm_VirtualBox.txt>
as per an MITgcm-support email earlier today.

I don’t know if anyone has succeeded in running MITgcm directly on MS Windows but I wonder
if it might now be possible to run MITgcm using the Windows Subsystem for Linux (WSL):
https://docs.microsoft.com/en-us/windows/wsl/install-win10 <https://docs.microsoft.com/en-us/windows/wsl/install-win10>

Dimitris


> On May 17, 2021, at 12:45 PM, Dominic McGeoch <dominicmcgeoch at me.com> wrote:
> 
> Hi,
> 
> I'm working on getting MITgcm to work on windows 10 pro. The first step was to write a python script that walks through all files in all subdirectories of my MITgcm directory and detect all plaintext files with a shebang as their first line. These files were then renamed to have their appropriate extension added: ".sh" for sh and bash, and ".csh" for csh. I then added .SH and .CSH to my PATHEXT environment variable so that the extension does not have to be specified for these filetypes in command prompt or powershell. Next I installed MinGW and then installed its fortran, C, and other associated compilers using the MinGW Installation Manager and added C:\MinGW\bin as the first entry in my path, where gfortran.exe is located. After that, I opened an administrator command prompt and cd'ed to the tutorial MITgcm\verification\tutorial_barotropic_gyre\build and ran ..\..\..\tools\genmake2 -mods ..\code so that MITgcm would attempt to read what OS hardware and compiler I have. genmake2 ran successfully and produced output though the command window:
> <PastedImage-1.png>
> I apologise for the very poor quality of this image, it was taken with my phone camera as the command prompt window opened and closed so quickly I was only able to read the output by filming it with my phone. If anybody can help with writing an optfile for this OS hardware configuration and the MinGW gfortran.exe compiler, that would be very much appreciated.
> 
> Kind regards,
> Dominic
> 
> P.S. If my modification of file types was incorrect in any way, or would prevent MITgcm from executing later on, after calling genmake2, I can just download fresh from GitHub and only modify specific files, or whatever is necessary for this to work, so its no trouble if its incorrect currently. If it comes down to it, I believe I could write a script that could modify the contents of all files in the MITgcm directory if there are specific function calls or names that need to be changed for it to work with windows.
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support <https://urldefense.us/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!PvBDto6Hs4WbVuu7!bVmlgPq7nJ2kcIRPAjUBs9wJ-6bg_s0lJpwQGSqEq1Buzo2R33Mfl9E4TlfoUUH0nYcO0jKaZfU$>_______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> https://urldefense.us/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!PvBDto6Hs4WbVuu7!bVmlgPq7nJ2kcIRPAjUBs9wJ-6bg_s0lJpwQGSqEq1Buzo2R33Mfl9E4TlfoUUH0nYcO0jKaZfU$ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20210517/5a324794/attachment-0001.html>


More information about the MITgcm-support mailing list