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

Can't compile on Windows 10 #47

Closed
MirkoCovizzi opened this issue Jul 27, 2020 · 5 comments
Closed

Can't compile on Windows 10 #47

MirkoCovizzi opened this issue Jul 27, 2020 · 5 comments

Comments

@MirkoCovizzi
Copy link

MirkoCovizzi commented Jul 27, 2020

After following this guide https://coin-or.github.io/user_introduction.html#obtaining-the-source using the Msys2 version, I'm stuck with this error at compilation:

...

##################################################
### Installing ThirdParty/Metis 1.3.9
##################################################


##################################################
### Building ThirdParty/Mumps 1.6.2
##################################################

C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:601:72:

  601 |         CALL MUMPS_COPY_LOGICAL( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to LOGICAL(4)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:603:72:

  603 |         CALL MUMPS_COPY_REAL( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to REAL(4)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:606:72:

  606 |         CALL MUMPS_COPY_DOUBLE_PRECISION( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to REAL(8)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:608:72:

  608 |         CALL MUMPS_COPY_COMPLEX( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to COMPLEX(4)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:610:72:

  610 |         CALL MUMPS_COPY_DOUBLE_COMPLEX( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to COMPLEX(8)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/libseq/mpi.f:612:72:

  612 |         CALL MUMPS_COPY_2DOUBLE_PRECISION( SENDBUF, RECVBUF, COUNT )
      |                                                                        1
Error: Type mismatch in argument 's' at (1); passed INTEGER(4) to REAL(8)
make: *** [Makefile:633: mpi.lo] Error 1
make: *** Waiting for unfinished jobs....
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/mumps_static_mapping.F:4405:24:

 4393 |          call MPI_BCAST(lenrcv,1,MPI_INTEGER,i,
      |                        2
......
 4405 |          call MPI_BCAST(namercv,lenrcv,MPI_INTEGER,i,
      |                        1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/mumps_static_mapping.F:3716:11:

 3716 |      &     cv_keep(1), cv_frere(1), cv_nfsiz(1), istat)
      |           1
Error: Element of assumed-shape or pointer array passed to array dummy argument 'keep' at (1)
make: *** [Makefile:489: mumps_static_mapping.lo] Error 1
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2667:23:

 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
......
 2667 |         CALL MPI_PACK( LIST_SLAVES, NSLAVES, MPI_INTEGER,
      |                       1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2670:23:

 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
......
 2670 |         CALL MPI_PACK( FLOPS_INCREMENT, NSLAVES,
      |                       1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2675:25:

 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
......
 2675 |           CALL MPI_PACK( MEM_INCREMENT, NSLAVES,
      |                         1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2681:26:

 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
......
 2681 |            CALL MPI_PACK( CB_BAND, NSLAVES,
      |                          1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2566:23:

 2566 |         CALL MPI_PACK( MAX_SURF_MASTER, 1, MPI_DOUBLE_PRECISION,
      |                       1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2417:23:

 2417 |         CALL MPI_PACK( LOAD, 1, MPI_DOUBLE_PRECISION,
      |                       1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2421:26:

 2421 |            CALL MPI_PACK( UPD_LOAD, 1, MPI_DOUBLE_PRECISION,
      |                          1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2305:23:

 2305 |         CALL MPI_PACK( LOAD, 1, MPI_DOUBLE_PRECISION,
      |                       1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2309:25:

 2309 |           CALL MPI_PACK( MEM, 1, MPI_DOUBLE_PRECISION,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2314:25:

 2314 |           CALL MPI_PACK( SBTR_CUR, 1, MPI_DOUBLE_PRECISION,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2319:26:

 2319 |            CALL MPI_PACK( LU_USAGE, 1, MPI_DOUBLE_PRECISION,
      |                          1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2217:23:

 2217 |         CALL MPI_PACK( W(1,K), LW, MPI_DOUBLE_PRECISION,
      |                       1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1920:28:

 1920 |               CALL MPI_PACK(TAB(1), NSUPROW*NSUPCOL,
      |                            1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1929:32:

 1929 |                   CALL MPI_PACK(VAL_SON(J,I), 1,
      |                                1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2012:28:

 2012 |               CALL MPI_PACK(TAB(1), NSUBSET_COL_EFF*N_PACKET,
      |                            1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2026:28:

 2026 |               CALL MPI_PACK(TAB(1), NSUBSET_COL_EFF*N_PACKET,
      |                            1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2037:33:

 2037 |                   CALL MPI_PACK( VAL_SON( J, I ), 1,
      |                                 1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:2048:33:

 2048 |                   CALL MPI_PACK( VAL_SON( J, I ), 1,
      |                                 1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1712:23:

 1712 |         CALL MPI_PACK( UIP21K, abs(NPIV) * NCOLU,
      |                       1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1618:25:

 1618 |           CALL MPI_PACK( IPIV, NPIV, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1622:27:

 1622 |             CALL MPI_PACK( VAL(1,I), NCOL,
      |                           1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1254:24:

 1254 |          CALL MPI_PACK( A_CBSON( APOS ), THIS_ROW_LENGTH,
      |                        1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:1313:28:

 1313 |               CALL MPI_PACK(BUF_MAX_ARRAY, NFS4FATHER,
      |                            1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:890:27:

  890 |             CALL MPI_PACK( SLAVES, NSLAVES, MPI_INTEGER,
      |                           1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:894:25:

  894 |           CALL MPI_PACK( IROW, NROW, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:897:25:

  897 |           CALL MPI_PACK( ICOL, NCOL, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:910:27:

  910 |             CALL MPI_PACK( VAL(1,I), NCOL_SEND,
      |                           1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:525:25:

  525 |           CALL MPI_PACK( IW, LONG, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:529:25:

  529 |           CALL MPI_PACK( W(1+(K-1)*LDW), LONG, MPI_DOUBLE_PRECISION,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:451:30:

  451 |                CALL MPI_PACK( CB ( 1 + LD_CB * (K-1) ),
      |                              1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:458:25:

  458 |           CALL MPI_PACK( SOL(1+LD_PIV*(K-1)),
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:365:25:

  365 |           CALL MPI_PACK( IWROW, LCONT, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:368:25:

  368 |           CALL MPI_PACK( IWCOL, LCONT, MPI_INTEGER,
      |                         1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:377:27:

  377 |             CALL MPI_PACK( A( J1 ), I, MPI_DOUBLE_PRECISION,
      |                           1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/dmumps_comm_buffer.F:385:27:

  385 |             CALL MPI_PACK( A( J1 ), LCONT, MPI_DOUBLE_PRECISION,
      |                           1
......
 2658 |         CALL MPI_PACK( WHAT, 1, MPI_INTEGER,
      |                       2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/mumps_part9.F:7914:23:

 7908 |       CALL MPI_REDUCE( INFO, INFOG(1), 1, MPI_INTEGER,
      |                       2
......
 7914 |       CALL MPI_REDUCE( TEMP1, TEMP2, 1, MPI_2INTEGER,
      |                       1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/mumps_part9.F:8070:22:

 7908 |       CALL MPI_REDUCE( INFO, INFOG(1), 1, MPI_INTEGER,
      |                       2
......
 8070 |       CALL MPI_REDUCE(DIN, DOUT, 1, MPI_DOUBLE_PRECISION,
      |                      1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
C:/msys64/home/Mirko/build-cbc/ThirdParty/Mumps/MUMPS/src/mumps_part9.F:8084:25:

 4666 |       CALL MPI_ALLREDUCE( IN, OUT, 1, MPI_2INTEGER, MPI_MINLOC,
      |                          2
......
 8084 |       CALL MPI_ALLREDUCE(DIN, DOUT, 1, MPI_DOUBLE_PRECISION,
      |                         1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
make: *** [Makefile:480: dmumps_comm_buffer.lo] Error 1
make: *** [Makefile:525: mumps_part9.lo] Error 1

Build failed, see error output above

This happens with these commands:
pacman -S make wget tar patch dos2unix diffutils git svn pkg-config zip unzip --noconfirm && pacman -S mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain --noconfirm && pacman -S mingw-w64-x86_64-lapack --noconfirm
mkdir build-cbc && cd build-cbc && curl -O https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew && ./coinbrew fetch Cbc --latest-release --no-prompt && ./coinbrew build Cbc --test --no-prompt --static

@tkralphs
Copy link
Member

This is a known issue with building Mumps using GCC 10, as discussed here and monkey-patched here. The fix will be in a future release, but in the meantime, it seems you can do something like

./coinbrew build Cbc --test --no-prompt --static ADD_FCFLAGS=-fallow-argument-mismatch

@MirkoCovizzi
Copy link
Author

@tkralphs Still gives the same errors even with that flag (and --reconfigure to refresh the cache)

@svigerske
Copy link
Member

If you are using --latest-release, so ThirdParty-Mumps 1.6, then that needs to be ADD_FFLAGS=-fallow-argument-mismatch.

@MirkoCovizzi
Copy link
Author

@svigerske Thanks, changing from ADD_FCFLAGS to ADD_FFLAGS solved the issue.

@skannan-maf
Copy link

skannan-maf commented Oct 16, 2024

Worked for me too! Thank you so much! ADD_FFLAGS=-fallow-argument-mismatch
I was working to compile the COIN OR Optimization suite.. I added "** ADD_FCFLAGS=-fallow-argument-mismatch ADD_FFLAGS=-fallow-argument-mismatch**" to the end of the "RUN ./coinbrew build COIN-OR-OptimizationSuite" command line..
The final line is:
RUN ./coinbrew build COIN-OR-OptimizationSuite --skip="ThirdParty/Blas ThirdParty/Lapack ThirdParty/Metis ThirdParty/Glpk" --no-prompt --prefix=/usr ADD_FCFLAGS=-fallow-argument-mismatch ADD_FFLAGS=-fallow-argument-mismatch

It worked!
Thank god! I saw your URL... I was just thinking I was toasted... Thankfully this thread saved me! Thanks a ton guys!

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

4 participants