Up to Installation and compilation
Hello, I have been trying to compile OASIS using GCC v11 (through homebrew on an M1 Mac running Big Sur, but I don't think that is relevant). When running the compilation it failed with several errors in COMP.err like: oasis/oasis3-mct/lib/scrip/src/remap_bi_interp.F90:953:27: 945 | CALL MPI_IRecv(grid1_add_map1(buff_base),& | 2 ...... 953 | CALL MPI_IRecv(wts_map1(:,buff_base),& | 1 Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)). This seems to be a general problem with recent versions of gfortran (version 10 and up) and the way MPI handles buffers. See for example this bug report on the GCC Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91731 The solution is (partially) spelled out there: add the compile option -fallow-argument-mismatch. However, when I added this to F90_FLAGS in the make.architecture file I was using, it was not propagated to the compilation of mct and mpeu. The solution was adding it to the F90 definition as: F90 = $(MPIBIN)/mpif90 -I$(MPI_INCLUDE) -fallow-argument-mismatch Is there a better way to get a gfortran argument to propagate to all of the make sub-processes? I accept this might be a quirk of the make.architecture file I was cribbing from. Nevertheless, I hope the solution I have presented here is useful to some future user naively trying to upgrade their version of gfortran. Cheers, Tim (timothy DOT spain AT nersc DOT
Dear Tim, Which version of OASIS3-MCT are you using ? This is effectively a problem in OASIS3-MCT_4.0 but it is corrected in the trunk with commit 3be6ea3b . The -fallow-argument-mismatch argument can now be added in the FCBASEFLAGS in the header Makefile. Details are in the ticket https://inle.cerfacs.fr/issues/2689 Let me know if I can help further, Sophie