Add NVIDIA OpenMPI to pkg-config

Hello everyone:

I am using the NVIDIA OpenMPI 4-1.15 on WSL-2 Ubuntu 22.04.

I’m trying to install an R package. However, when the package configure looks for output from pkg-config, it is not showing.

erin1@eacer:~$ ~/R-4.3.1/bin/R CMD INSTALL pbdMPI
* installing to library ‘/home/erin1/R/x86_64-pc-linux-gnu-library/4.3’
* installing *source* package ‘pbdMPI’ ...
file ‘configure’ has the wrong MD5 checksum
** using staged installation
checking for sed... /usr/bin/sed
checking for mpicc... mpicc
checking for ompi_info... F
checking for pkg-config... /usr/bin/pkg-config
Try pkg-config ...
checking if pkg-config knows about OpenMPI... no
>> TMP_FOUND = Nothing found from mpicc --show & sed nor pkg-config ...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for mpi.h... no
configure: error: "Cannot find mpi.h header file"
ERROR: configuration failed for package ‘pbdMPI’
* removing ‘/home/erin1/R/x86_64-pc-linux-gnu-library/4.3/pbdMPI’

I do have both the PATH and LD_LIBRARY_PATH set correctly.
What do I need to do to add the OpenMPI to the pkg-config, please?
Thank you,
Sincerely,
Erin