Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling question openMPI gfortran #496

Open
macfenchel123 opened this issue Mar 18, 2024 · 1 comment
Open

Compiling question openMPI gfortran #496

macfenchel123 opened this issue Mar 18, 2024 · 1 comment
Assignees

Comments

@macfenchel123
Copy link

Dear all,

may I ask if there is already a patch to resolve the compiling openmpi problems encountered:
so if I compile with gfortran and openmpi I got the following warnings (see below), which if I compile without
-fallow-argument-mismatch even result in a failed compilation.

Any fix or idea how to get this right?

../comms.F90:1246:22:

1246 | call MPI_scatterv(rootglobalarray, counts, displs, MPI_double_complex, &
| 1
......
1344 | call MPI_scatterv(rootglobalarray, counts, displs, MPI_Integer, &
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/INTEGER(4)).
../comms.F90:1247:22:

1247 | array, localcount, MPI_double_complex, root_id, mpi_comm_world, error)
| 1
......
1345 | Array, localcount, MPI_Integer, root_id, mpi_comm_world, error)
| 2
Warning: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/INTEGER(4)).
../comms.F90:1088:21:

@macfenchel123 macfenchel123 changed the title Compiling question Compiling question openMPI gfortran Mar 18, 2024
@jryates
Copy link
Member

jryates commented Mar 18, 2024

This shouldn't be an actual problem - and you can include the flag you highlighted, and Wannier90 should build and pass the test suite in parallel. Although it is outside of the fortran standard - this type of f77 style calling of external libraries is very common.

However, it is "fixed" in the development version - for example by including the f90 interface. This builds with recent versions of gfortran without warnings, or needing the special flag.

However, I'd caution against using the development version at the moment as it has been undergoing a lot of changes. But it would be easy to take the changes from comms.F90 and put them in the 3.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants