Gilles, 

Yes, that works.  i see the m4 code that checks for it in 
config/opal_check_pmi.m4.
It's a little deceptive because you will only see the check for 
/usr/include/slurm belowafter the slurm headers are installed and only if you 
supply no parameter.  If you do 
supply a path to --with-pmi, configure does odd things with it.
Thanks for looking into this.
Phil

checking if user requested PMI support... yes
checking for pmi.h in /usr/include... not found
checking for pmi.h in /usr/include/slurm... found     <-- found
checking pmi.h usability... yes
checking pmi.h presence... yes
checking for pmi.h... yes
checking for libpmi in /usr... not found
checking for libpmi in /usr/lib64... found
checking for PMI_Init in -lpmi... yes
checking for pmi2.h in /usr/include... not found
checking for pmi2.h in /usr/include/slurm... found    <-- found
checking pmi2.h usability... yes
checking pmi2.h presence... yes
checking for pmi2.h... yes
checking for libpmi2 in /usr... not found
checking for libpmi2 in /usr/lib64... found
checking for PMI2_Init in -lpmi2... yes
checking can PMI support be built... yes
 

    On Saturday, September 2, 2017 9:23 PM, Gilles Gouaillardet 
<gilles.gouaillar...@gmail.com> wrote:
 

 Phil,

Did you simply try `--with-pmi` ?

According to the configury macros, we look for /usr/include/pmi.h and then 
/usr/include/slurm/pmi.h, so that should work just fine.

If not, can you please compress and post your config.log ?

Cheers,

Gilles

Phil K via devel <devel@lists.open-mpi.org> wrote:
Exactly.  Sorry if my opener was long-winded and obscure.  You can see below 
OMPI finds the pmi libraries, but misses the headersbecause it's adding 
"/include" to my path which I don't want it to do.

./configure --with-pmi=/usr/include/slurm --with-pmi-libdir=/usr
checking if user requested PMI support... yes
checking for pmi.h in /usr/include/slurm/include... not found               
<--- whoops
checking for pmi.h in /usr/include/slurm/include/slurm... not found         
<--- whoops
checking for libpmi in /usr... not found
checking for libpmi in /usr/lib64... found
checking for PMI_Init in -lpmi... yes
checking for pmi2.h in /usr/include/slurm/include... not found              
<---- whoops  
checking for pmi2.h in /usr/include/slurm/include/slurm... not found        
<---- whoops
checking for libpmi2 in /usr... not found
checking for libpmi2 in /usr/lib64... found
checking for PMI2_Init in -lpmi2... yes
checking can PMI support be built... no
configure: WARNING: PMI support requested (via --with-pmi) but neither pmi.h
configure: WARNING: nor pmi2.h were found under locations:
configure: WARNING:     /usr/include/slurm
configure: WARNING:     /usr/include/slurm/slurm
configure: WARNING: Specified path: /usr/include/slurm
configure: WARNING: OR neither libpmi nor libpmi2 were found under:
configure: WARNING:     /usr/lib
configure: WARNING:     /usr/lib64
configure: WARNING: Specified path: /usr
configure: error: Aborting
 

    On Saturday, September 2, 2017 1:20 PM, "r...@open-mpi.org" 
<r...@open-mpi.org> wrote:
 

 Okay, so this has nothing to do with the internal pmix or the pmi-1/2 headers 
it provides, which is what confused me. You are building the SLURM pmi support 
for OMPI, which does indeed use the slurm-provided headers and pmi libraries.
Someone can take a look at that as it should check first in the given 
directory, and then in the include subdir. However, you might also then need to 
specify --with-pmi-libdir to find the libraries.


On Sep 2, 2017, at 9:37 AM, Phil K <pkde...@yahoo.com> wrote:
The issue is getting through the OMPI configure without error which you   
_cannot_ when using --with-pmi=/usr/include/slurm if pmi.h and pmi2.h are 
installed *only* in /usr/include/slurm. 

    On Saturday, September 2, 2017 9:55 AM, "r...@open-mpi.org" 
<r...@open-mpi.org> wrote:
 

 I’m honestly confused by this as I don’t understand what you are trying to 
accomplish. Neither OMPI nor PMIx uses those headers. PMIx provides them just 
as a convenience for anyone wanting to compile a PMI based code, and so that we 
could internally write functions that translate from PMI to the equivalent PMIx 
calls.
So you can compile your code with -any- PMI header you want - so long as you 
then link your code to a PMIx library, it doesn’t matter if that header differs 
somewhat from the one we use. All that matters is that any function call you 
use matches the one we wrote against. We took ours directly from the MPICH 
official ones.
Ralph

On Sep 1, 2017, at 10:08 PM, Phil K via devel <devel@lists.open-mpi.org> wrote:
I just wanted to share a workaround I came up with for this openmpi configure 
issue.

When specifying header paths in configure, openmpi adds an /include subpath the 
--with-pmi specifier(and others).  This is documented very clearly.  Recently, 
in switching over to internal pmix, I wanted to ripout the pmix-provided pmi.h 
and pmi2.h development headers and use those supplied by slurm since 
openmpiwill link to the slurm-provided pmi libraries and I like to match 
headers and libraries properly.  (Yes the headersare similar but they are not 
identical).

On my distro, the pmix pmi.h and pmi2.h headers were in /usr/include, which 
openmpi finds with:

--with-pmi=/usr
After removing the pmix development headers, I am left with the slurm headers 
are in /usr/include/slurm.Unfortunately the configure item:

--with-pmi=/usr/include/slurm
fails to locate the pmi.h/pmi2.h slurm headers due to the addition of that 
/include subpath, i.e. they are notin /usr/include/slurm/include.  There is no 
way to specify an absolute path to a header directory.  So here'swhat I did:

(unpack tarball to /path/to/openmpi-2.1.1)cd /path/to/openmpi-2.1.1mkdir 
slurmln -s /usr/include/slurm /path/to/openmpi-2.1.1/slurm/include

then configure as follows:
./configure --with-pmi=/path/to/openmpi-2.1.1/slurm
The configure adds the /include subpath and finds the slurm pmi/pmi2 headers 
through my symlink.

Cumbersome, but it works.

Phil
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/devel



   

_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/devel

   

   
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/devel

Reply via email to