Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-25 Thread Dave Love
Thomas Jahns writes: > just a side-note: the correct way to query the hostname is in this > thread on stackoverflow and various Unix/POSIX/Linux books in C: > > > > I'd sugge

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-21 Thread Thomas Jahns
Hi Matt, On 01/15/2016 03:53 PM, Matt Thompson wrote: There is a chance in the future I might want/need to query an environment variable in a Fortran program, namely to figure out what switch a currently running process is on (via SLURM_TOPOLOGY_ADDR in my case) and perhaps make a "per-switch" c

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-21 Thread Dave Love
Matt Thompson writes: > All, > > I'm not too sure if this is an MPI issue, a Fortran issue, or something > else but I thought I'd ask the MPI gurus here first since my web search > failed me. > > There is a chance in the future I might want/need to query an environment > variable in a Fortran pro

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Matt Thompson
Ralph, Sounds good. I'll keep my eyes out. I figured it probably wasn't possible. Of course, it's simple enough to run a script ahead of time that can build a table that could be read in-program. I was just hoping perhaps I could do it in one-step instead of two! And, well, I'm slowly learning th

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Ralph Castain
This doesn’t provide info beyond the local node topology, so it won’t help answer the common switch question > On Jan 15, 2016, at 8:35 AM, Nick Papior wrote: > > Wouldn't this be partially available via > https://github.com/open-mpi/ompi/pull/326 >

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Nick Papior
Wouldn't this be partially available via https://github.com/open-mpi/ompi/pull/326 in the trunk? Of course the switch is not gathered from this, but it might work as an initial step towards what you seek Matt? 2016-01-15 17:27 GMT+01:00 Ralph Castain : > Yes, we don’t propagate envars ourselves

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Ralph Castain
Yes, we don’t propagate envars ourselves other than MCA params. You can ask mpirun to forward specific envars to every proc, but that would only push the same value to everyone, and that doesn’t sound like what you are looking for. FWIW: we are working on adding the ability to directly query the

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Matt Thompson
Ralph, That doesn't help: (1004) $ mpirun -map-by node -np 8 ./hostenv.x | sort -g -k2 Process0 of8 is on host borgo086 Process0 of8 is on processor borgo086 Process1 of8 is on host borgo086 Process1 of8 is on processor borgo140 Process2 of8 is on host borg

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Ralph Castain
Actually, the explanation is much simpler. You probably have more than 8 slots on borgj020, and so your job is simply small enough that we put it all on one host. If you want to force the job to use both hosts, add “-map-by node” to your cmd line > On Jan 15, 2016, at 7:02 AM, Jim Edwards wro

Re: [OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Jim Edwards
On Fri, Jan 15, 2016 at 7:53 AM, Matt Thompson wrote: > All, > > I'm not too sure if this is an MPI issue, a Fortran issue, or something > else but I thought I'd ask the MPI gurus here first since my web search > failed me. > > There is a chance in the future I might want/need to query an environ

[OMPI users] MPI, Fortran, and GET_ENVIRONMENT_VARIABLE

2016-01-15 Thread Matt Thompson
All, I'm not too sure if this is an MPI issue, a Fortran issue, or something else but I thought I'd ask the MPI gurus here first since my web search failed me. There is a chance in the future I might want/need to query an environment variable in a Fortran program, namely to figure out what switch