<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- P { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​Hi Mainak,<br>
</p>
<p><br>
</p>
<p>Please continue to share your experiences with MITgcm on a M1 mac  - you are a bit ahead of the curve here in<br>
</p>
<p>terms of what we're supporting at this point.<br>
</p>
<p><br>
</p>
<p>Best,<br>
</p>
<p>Jeff<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Mainak Mondal <mm10845@nyu.edu><br>
<b>Sent:</b> Wednesday, June 16, 2021 9:58 AM<br>
<b>To:</b> mitgcm-support@mitgcm.org<br>
<b>Subject:</b> Re: [MITgcm-support] problem compiling MITgcm with openmpi on mac big surr</font>
<div> </div>
</div>
<div>
<div dir="ltr">Thanks Jean and Dustin. <br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 16, 2021 at 5:18 PM Dustin Carroll <<a href="mailto:dcarroll@mlml.calstate.edu" target="_blank">dcarroll@mlml.calstate.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">Hi Mainak,
<div><br>
</div>
<div>JMC: thanks for your comments here.</div>
<div><br>
</div>
<div>I also ran into a similar problem when compiling MITgcm on my</div>
<div>Macbook w/ the 10.15.7 Catalina upgrade.</div>
<div><br>
</div>
<div>I fixed this by adding "#include <stdio.h>" to:</div>
<div>/eesupp/src/setdir.c<br>
</div>
<div><br>
</div>
<div>and adding the following lines to my optfile:</div>
<div><br>
FFLAGS="$FFLAGS -w -fallow-argument-mismatch -O2"<br>
FCFLAGS="$FCFLAGS -w -fallow-argument-mismatch -O2"</div>
<div><br>
</div>
<div>Best,</div>
<div>Dustin <br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 16, 2021 at 5:17 AM Jean-Michel Campin <<a href="mailto:jmc@mit.edu" target="_blank">jmc@mit.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
Hi Mainak,<br>
<br>
I am not familiar with macbook, but the error you get might be<br>
due to a recent version of gcc (10 or above) for which we need a patch to the optfile,<br>
as proposed by Gael Forget here:<br>
 <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MITgcm_MITgcm_pull_480&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=ZvysV9sqKVa_ZzhPjngv7A&m=-6krWzaYhfDFZe5GZGpfvIMjmAhVO3v1BjE8STaN_BM&s=-sQexesGdxPZoN4TuLImRKBkgqjQBJiePAT4TQ0aSQQ&e=" rel="noreferrer" target="_blank">https://github.com/MITgcm/MITgcm/pull/480</a><br>
<br>
There might be other issues but hard to tell since it fails to compile<br>
early on because of this new gcc version.<br>
<br>
Also, I would suggest to try first without MPI to check that everything<br>
is in place and once you pass this stage you can try again with MPI.<br>
<br>
Cheers,<br>
Jean-Michel<br>
<br>
On Wed, Jun 16, 2021 at 10:11:06AM +0400, Mainak Mondal wrote:<br>
> Hi,<br>
> <br>
> I recently tried installing MITgcm on macbook pro M1 with 8 core.<br>
> <br>
> I tried the followings:<br>
> <br>
> I installed openmpi, netcdf using Homebrew.<br>
> <br>
> %%%%%%%%%%%%%%%%%%%%%%<br>
> checking for packages installed<br>
> %%%%%%%%%%%%%%%%%%%%%<br>
> pinta@Mainaks-MBP ~ % which gcc<br>
> /usr/bin/gcc<br>
> pinta@Mainaks-MBP ~ % which gfortran<br>
> /opt/homebrew/bin/gfortran<br>
> pinta@Mainaks-MBP ~ % which mpif90<br>
> /opt/homebrew/bin/mpif90<br>
> pinta@Mainaks-MBP ~ % which ncdump<br>
> /opt/homebrew/bin/ncdump<br>
> %%%%%%%%%%%%%%%%%%%%<br>
> <br>
> I downloaded the latest MITgcm<br>
> <br>
> I tried to compile MITgcm/verification/tutorial_plume_on_slope/ using 8<br>
> cores.<br>
> <br>
> %%%%%%%%%%%%%%%%%%%%<br>
> initially while in the build directory, I ran<br>
> pinta@Mainaks-MBP build % ../../../tools/genmake2 -mods=../code  -mpi<br>
> <br>
> It shows:<br>
> The platform appears to be:  darwin_arm64<br>
> Error: can't read OPTFILE="../../../tools/build_options/darwin_arm64_mpif77"<br>
> <br>
> Then I tried with the optfile<br>
> ../../../tools/genmake2 -mods=../code<br>
> --optfile=../../../tools/build_options/darwin_amd64_gfortran -mpi<br>
> <br>
> I changed the followings:<br>
> FC=mpif90<br>
> commented out<br>
> #FFLAGS="$FFLAGS -fconvert=big-endian"<br>
> <br>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
> while make depend , I got lots of warning messeges like:<br>
> <br>
> ./mpif.h:37:24: warning: missing terminating ' character<br>
> [-Winvalid-pp-token]<br>
> ! That being said, OMPI's "mpifort" wrapper compiler should<br>
> <br>
> %%%%%%%%%%%%%%%%%%%%%%%<br>
> <br>
> while doing make<br>
> <br>
> Error: Type mismatch between actual argument at (1) and actual argument at<br>
> (2) (INTEGER(4)/REAL(8)).<br>
> cumulsum_z_tile.for:1193:27:<br>
> <br>
>  1164 |             CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER,<br>
>       |                           2<br>
> ......<br>
>  1193 |             CALL MPI_RECV (loc2Buf, lbuf2, MPI_DOUBLE_PRECISION,<br>
>       |                           1<br>
> Error: Type mismatch between actual argument at (1) and actual argument at<br>
> (2) (REAL(8)/INTEGER(4)).<br>
> make[1]: *** [cumulsum_z_tile.o] Error 1<br>
> make[1]: *** Waiting for unfinished jobs....<br>
> make: *** [fwd_exe_target] Error 2<br>
> <br>
> <br>
> I would really appreciate it if anyone can help me.<br>
> <br>
> Regards<br>
> --<br>
> *Mainak Mondal*<br>
> Post-Doctoral Associate<br>
> A2 104-C<br>
> Center for Global Sea Level Change<br>
> New York University Abu Dhabi<br>
> ph: +971 26285339<br>
<br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> <a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=ZvysV9sqKVa_ZzhPjngv7A&m=-6krWzaYhfDFZe5GZGpfvIMjmAhVO3v1BjE8STaN_BM&s=RXiNG62cLvFOmFd2gI9-_GAOOyDphA-e6l0Qwq7_ubk&e=" rel="noreferrer" target="_blank">
http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwMFaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=ZvysV9sqKVa_ZzhPjngv7A&m=-6krWzaYhfDFZe5GZGpfvIMjmAhVO3v1BjE8STaN_BM&s=RXiNG62cLvFOmFd2gI9-_GAOOyDphA-e6l0Qwq7_ubk&e=" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote>
</div>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=ZvysV9sqKVa_ZzhPjngv7A&m=-6krWzaYhfDFZe5GZGpfvIMjmAhVO3v1BjE8STaN_BM&s=RXiNG62cLvFOmFd2gI9-_GAOOyDphA-e6l0Qwq7_ubk&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwICAg&c=slrrB7dE8n7gBJbeO0g-IQ&r=ZvysV9sqKVa_ZzhPjngv7A&m=-6krWzaYhfDFZe5GZGpfvIMjmAhVO3v1BjE8STaN_BM&s=RXiNG62cLvFOmFd2gI9-_GAOOyDphA-e6l0Qwq7_ubk&e=</a>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr"><b>Mainak Mondal</b>
<div>Post-Doctoral Associate</div>
<div>A2 104-C</div>
<div>Center for Global Sea Level Change</div>
<div>New York University Abu Dhabi</div>
<div>ph: +971 26285339</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>