@@ -1097,49 +1097,31 @@ subroutine mpi_compiler_match(language,wrappers,compiler,which_one,mpilib,error)
1097
1097
which_one = i
1098
1098
return
1099
1099
end if
1100
-
1101
- ! Because the intel mpi library does not support llvm_ compiler wrappers yet,
1102
- ! we must check for that manually
1103
- if (same_vendor== 0 .and. mpi_compiler% is_intel() .and. compiler% is_intel()) then
1104
- same_vendor = i
1105
- vendor_mpilib = mpilib
1106
- end if
1107
-
1108
1100
case (LANG_C)
1109
1101
! For other languages, we can only hope that the name matches the expected one
1110
1102
if (screen% s== compiler% cc .or. screen% s== compiler% fc) then
1111
1103
which_one = i
1112
1104
return
1113
1105
end if
1114
-
1115
- ! Because the intel mpi library does not support llvm_ compiler wrappers yet,
1116
- ! we must check for that manually
1117
- if (same_vendor== 0 .and. screen% s==' icc' .and. compiler% cc==' icx' ) then
1118
- same_vendor = i
1119
- vendor_mpilib = mpilib
1120
- end if
1121
-
1122
1106
case (LANG_CXX)
1123
1107
if (screen% s== compiler% cxx .or. screen% s== compiler% fc) then
1124
1108
which_one = i
1125
1109
return
1126
1110
end if
1127
-
1128
- ! Because the intel mpi library does not support llvm_ compiler wrappers yet,
1129
- ! we must check for that manually
1130
- if (same_vendor== 0 .and. screen% s==' icpc' .and. compiler% cc==' icpx' ) then
1131
- same_vendor = i
1132
- vendor_mpilib = mpilib
1133
- end if
1134
-
1135
1111
end select
1136
1112
1113
+ ! Because the intel mpi library does not support llvm_ compiler wrappers yet,
1114
+ ! we must check for that manually
1115
+ if (is_intel_classic_option(language,same_vendor,screen,compiler,mpi_compiler)) then
1116
+ same_vendor = i
1117
+ vendor_mpilib = mpilib
1118
+ end if
1137
1119
end do
1138
1120
1139
1121
! Intel compiler: if an exact match is not found, attempt closest wrapper
1140
1122
if (which_one== 0 .and. same_vendor> 0 ) then
1141
1123
which_one = same_vendor
1142
- mpilib = vendor_mpilib
1124
+ mpilib = vendor_mpilib
1143
1125
end if
1144
1126
1145
1127
! None of the available wrappers matched the current Fortran compiler
@@ -1149,6 +1131,26 @@ subroutine mpi_compiler_match(language,wrappers,compiler,which_one,mpilib,error)
1149
1131
1150
1132
end subroutine mpi_compiler_match
1151
1133
1134
+ ! > Because the Intel mpi library does not support llvm_ compiler wrappers yet,
1135
+ ! > we must save the Intel-classic option and later manually replace it
1136
+ logical function is_intel_classic_option (language ,same_vendor_ID ,screen_out ,compiler ,mpi_compiler )
1137
+ integer , intent (in ) :: language,same_vendor_ID
1138
+ type (string_t), intent (in ) :: screen_out
1139
+ type (compiler_t), intent (in ) :: compiler,mpi_compiler
1140
+
1141
+ if (same_vendor_ID/= 0 ) return
1142
+
1143
+ select case (language)
1144
+ case (LANG_FORTRAN)
1145
+ is_intel_classic_option = mpi_compiler% is_intel() .and. compiler% is_intel()
1146
+ case (LANG_C)
1147
+ is_intel_classic_option = screen_out% s==' icc' .and. compiler% cc==' icx'
1148
+ case (LANG_CXX)
1149
+ is_intel_classic_option = screen_out% s==' icpc' .and. compiler% cc==' icpx'
1150
+ end select
1151
+
1152
+ end function is_intel_classic_option
1153
+
1152
1154
! > Return library version from the MPI wrapper command
1153
1155
type (version_t) function mpi_version_get(mpilib,wrapper,error)
1154
1156
integer , intent (in ) :: mpilib
0 commit comments