使用GCC/13.2.0编译openmpi-1.6.5时出错解决方式

报错信息

 Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
 make[4]: *** [Makefile:1517: mpi_testall_f90.lo] Error 1
 make[4]: *** Waiting for unfinished jobs....
 mpi_comm_spawn_multiple_f90.f90:36:57:
 
    16 |   call MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, &
       |                                                         2
 ......  
    36 |   call MPI_Comm_spawn_multiple(count, array_of_commands, array_of_argv, &
       |                                                         1
 Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/CHARACTER(*)).
 make[4]: *** [Makefile:1517: mpi_comm_spawn_multiple_f90.lo] Error 1
 mpi_waitall_f90.f90:18:45:
 
     8 |   call MPI_Waitall(count, array_of_requests, array_of_statuses, ierr)
       |                                             2
 ......   
    18 |   call MPI_Waitall(count, array_of_requests, array_of_statuses, ierr)
       |                                             1
 Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).
 make[4]: *** [Makefile:1517: mpi_waitall_f90.lo] Error 1
 mpi_testsome_f90.f90:26:76:
 
    12 |   call MPI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr)
       |                                                                            2
 ......  
    26 |   call MPI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierr)
       |                                                                            1
 Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/INTEGER(4)).

解决方式

在configure命令前添加变量,具体configure.sh内容如下:

#!/bin/bash
module purge
module load GCC/13.2.0


export SOURCE_DIR=~/openmpi-1.6.5
export PREFIX_DIR=~/usr/openmpi/1.6.5-20250630-1
export CC=gcc
export CXX=g++
export GC=gfortran
export CFLAGS="-O2 -Wno-error"
export CXXFLAGS="-O2 -Wno-error"
export FCFLAGS="-w -fallow-argument-mismatch -O2"
export FFFLAGS="-w -fallow-argument-mismatch -O2"

# turn on failure check
set -e
set -o pipefail

../configure \
--prefix=${PREFIX_DIR} \
2>&1 | tee my_configure.log
make -j $(nproc) 2>&1 | tee my_make.log
make check -k 2>&1 | tee my_check.log
make install 2>&1 | tee my_install.log

其中最主要的是FCFLAGS和FFFLAGS两个变量。最终问题解决

文章链接:https://sunwaybits.tech/gcc13-2-openmpi1-6-5-fortran-error-compile-solution/
文章标题:使用GCC/13.2.0编译openmpi-1.6.5时出错解决方式
文章作者:MyronH
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇