SWIT icon indicating copy to clipboard operation
SWIT copied to clipboard

Problem make installing the package

Open RunningXinLiu opened this issue 2 years ago • 11 comments

Hi Haipeng,

I am installing this package on my macbook pro M1. I have openmpi installed:

 mpif90 --version
GNU Fortran (Homebrew GCC 11.2.0_3) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However, when I run make in the fd2dmpi folder I got the following error indicating grammar error. Could this be a problem with my mpi library?

❯ make
/opt/homebrew/bin/mpif90 -o .obj/global.o global.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/parser.o parser.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/datatype.o datatype.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/mmi_mpi.o mmi_mpi.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/string.o string.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/su.o su.f90 -O3 -w  -c -funroll-loops -J.mod
/opt/homebrew/bin/mpif90 -o .obj/io.o io.f90 -O3 -w  -c -funroll-loops -J.mod
io.f90:296:17:

  296 |   call MPI_BCAST(den(:,ix),nz_pml,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
      |                 1
......
  798 | call MPI_BCAST(fs,nx_pml,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
      |               2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
io.f90:261:17:

Best, Xin

RunningXinLiu avatar May 12 '22 04:05 RunningXinLiu

BTW, I dont have any problem make install this package on my remote sever, which uses the same mpi distribution as indicated in your tutorial.

mpif90 --version
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

RunningXinLiu avatar May 12 '22 05:05 RunningXinLiu

Thank you for your interest. This code has complied successfully on the Intel and AMD CPUs. On the Macbook pro with the M1, I have also encountered your problem. It seems that OpenMPI or other MPI does not work very well with the M1 chip so far (just a guess, and I'm not so sure).

Please be careful with the MPI problems and the M1 chip. I have burned out an M1 chip and get my motherboard repaired...

Haipeng-ustc avatar May 12 '22 07:05 Haipeng-ustc

Thank you for your interest. This code has complied successfully on the Intel and AMD CPUs. On the Macbook pro with the M1, I have also encountered your problem. It seems that OpenMPI or other MPI does not work very well with the M1 chip so far (just a guess, and I'm not so sure).

Please be careful with the MPI problems and the M1 chip. I have burned out an M1 chip and get my motherboard repaired...

Thank you Haipeng. This M1 chip has caused me a lot of headaches. I haven't managed to run specfem package with it probably due to the same cause. Also I the fortran language server fortls are not supported by M1... I should have just sticked to ubuntu...

Best, Xin

RunningXinLiu avatar May 12 '22 08:05 RunningXinLiu

You're definitely welcome. The M1 chip also troubles me a lot. I now use it only as a code editing tool and run the code on remote servers or HPC platforms.

Best,

Haipeng-ustc avatar May 12 '22 08:05 Haipeng-ustc

I am trying to work remotely with vs code. But the server I am using does not have an internet connection. It was painstaking to download modules, packages locally and scp to the server and manually install them.

RunningXinLiu avatar May 12 '22 08:05 RunningXinLiu

I'm basically in the same working mode using VS code, but our computational server can access the internal internet, which makes it easier to download some packages.

Haipeng-ustc avatar May 12 '22 08:05 Haipeng-ustc