[MITgcm-support] problem compiling MITgcm with openmpi on mac big surr

Jean-Michel Campin jmc at mit.edu
Wed Jun 16 08:17:35 EDT 2021


Hi Mainak,

I am not familiar with macbook, but the error you get might be
due to a recent version of gcc (10 or above) for which we need a patch to the optfile,
as proposed by Gael Forget here:
 https://github.com/MITgcm/MITgcm/pull/480

There might be other issues but hard to tell since it fails to compile
early on because of this new gcc version.

Also, I would suggest to try first without MPI to check that everything
is in place and once you pass this stage you can try again with MPI.

Cheers,
Jean-Michel

On Wed, Jun 16, 2021 at 10:11:06AM +0400, Mainak Mondal wrote:
> Hi,
> 
> I recently tried installing MITgcm on macbook pro M1 with 8 core.
> 
> I tried the followings:
> 
> I installed openmpi, netcdf using Homebrew.
> 
> %%%%%%%%%%%%%%%%%%%%%%
> checking for packages installed
> %%%%%%%%%%%%%%%%%%%%%
> pinta at Mainaks-MBP ~ % which gcc
> /usr/bin/gcc
> pinta at Mainaks-MBP ~ % which gfortran
> /opt/homebrew/bin/gfortran
> pinta at Mainaks-MBP ~ % which mpif90
> /opt/homebrew/bin/mpif90
> pinta at Mainaks-MBP ~ % which ncdump
> /opt/homebrew/bin/ncdump
> %%%%%%%%%%%%%%%%%%%%
> 
> I downloaded the latest MITgcm
> 
> I tried to compile MITgcm/verification/tutorial_plume_on_slope/ using 8
> cores.
> 
> %%%%%%%%%%%%%%%%%%%%
> initially while in the build directory, I ran
> pinta at Mainaks-MBP build % ../../../tools/genmake2 -mods=../code  -mpi
> 
> It shows:
> The platform appears to be:  darwin_arm64
> Error: can't read OPTFILE="../../../tools/build_options/darwin_arm64_mpif77"
> 
> Then I tried with the optfile
> ../../../tools/genmake2 -mods=../code
> --optfile=../../../tools/build_options/darwin_amd64_gfortran -mpi
> 
> I changed the followings:
> FC=mpif90
> commented out
> #FFLAGS="$FFLAGS -fconvert=big-endian"
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
> while make depend , I got lots of warning messeges like:
> 
> ./mpif.h:37:24: warning: missing terminating ' character
> [-Winvalid-pp-token]
> ! That being said, OMPI's "mpifort" wrapper compiler should
> 
> %%%%%%%%%%%%%%%%%%%%%%%
> 
> while doing make
> 
> Error: Type mismatch between actual argument at (1) and actual argument at
> (2) (INTEGER(4)/REAL(8)).
> cumulsum_z_tile.for:1193:27:
> 
>  1164 |             CALL MPI_RECV (ready_to_receive, 1, MPI_INTEGER,
>       |                           2
> ......
>  1193 |             CALL MPI_RECV (loc2Buf, lbuf2, MPI_DOUBLE_PRECISION,
>       |                           1
> Error: Type mismatch between actual argument at (1) and actual argument at
> (2) (REAL(8)/INTEGER(4)).
> make[1]: *** [cumulsum_z_tile.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [fwd_exe_target] Error 2
> 
> 
> I would really appreciate it if anyone can help me.
> 
> Regards
> --
> *Mainak Mondal*
> Post-Doctoral Associate
> A2 104-C
> Center for Global Sea Level Change
> New York University Abu Dhabi
> ph: +971 26285339

> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list