Skip to content

Commit

Permalink
get link flags from mpiifort -show
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed Dec 13, 2023
1 parent 758229e commit 0015458
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fpm_meta.f90
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,6 @@ subroutine init_mpi_from_wrappers(this,compiler,mpilib,fort_wrapper,c_wrapper,cx
call destroy(this)

! Get linking flags
if (mpilib/=MPI_TYPE_INTEL) &
this%link_flags = mpi_wrapper_query(mpilib,fort_wrapper,'link',verbose,error)
if (allocated(error)) return

Expand Down Expand Up @@ -1489,6 +1488,7 @@ type(string_t) function mpi_wrapper_query(mpilib,wrapper,command,verbose,error)
select case (mpilib)
case (MPI_TYPE_OPENMPI); cmdstr = string_t('--showme:link')
case (MPI_TYPE_MPICH); cmdstr = string_t('-link-info')
case (MPI_TYPE_INTEL); cmdstr = string_t('-show')
case default
call fatal_error(error,unsupported_msg)
return
Expand All @@ -1506,7 +1506,7 @@ type(string_t) function mpi_wrapper_query(mpilib,wrapper,command,verbose,error)
select case (mpilib)
case (MPI_TYPE_OPENMPI)
call remove_newline_characters(screen)
case (MPI_TYPE_MPICH)
case (MPI_TYPE_MPICH,MPI_TYPE_INTEL)
! MPICH reports the full command including the compiler name. Remove it if so
call remove_newline_characters(screen)
call split(screen%s,tokens)
Expand Down

0 comments on commit 0015458

Please sign in to comment.