I mean getenv("OMPI_MCA_apath") in setup_fork. From: Dahai Guo via devel <devel@lists.open-mpi.org> To: Jeff Squyres (jsquyres) <jsquy...@cisco.com>; Dahai Guo <dahaiguo2...@outlook.com>; Open MPI Developers List <devel@lists.open-mpi.org> Cc: Dahai Guo <dahaiguo2...@yahoo.com> Sent: Friday, February 24, 2017 9:11 AM Subject: Re: [OMPI devel] define a new ENV variable in etc/openmpi-mca-params.conf oops, I should use the word "MCA parameters". If I define a MCA parameter (apath, for example) in etc/openmpi-mca-params.conf, how can function setup_fork in ompi/orte/mca/schizo/ompi/schizo_ompi.c get its value? I tried to call getenv("apath") there, which return null. However, If I defined it in the cmd line, mpirun -mca apath=sth .., then I could get it in setup_fork. Did I miss something? Dahai
From: Jeff Squyres (jsquyres) <jsquy...@cisco.com> To: Dahai Guo <dahaiguo2...@outlook.com>; Open MPI Developers List <devel@lists.open-mpi.org> Cc: Dahai Guo <dahaiguo2...@yahoo.com> Sent: Friday, February 24, 2017 8:57 AM Subject: Re: [OMPI devel] define a new ENV variable in etc/openmpi-mca-params.conf On Feb 23, 2017, at 5:44 PM, Dahai Guo via devel <devel@lists.open-mpi.org> wrote: > > If I define a new ENV variable in etc/openmpi-mca-params.conf, what OMPI > codes should I modify in order for this parameter to be delivered to each > rank? I'm not quite sure what you're asking. The openmpi-mca-params.conf does not define environment variables; it only sets values for Open MPI's MCA parameters (i.e., run-time parameters). If you want to pass environment variables from the environment of mpirun to the MPI processes that it starts, use the -x CLI option to mpirun. For example: export FOO=bar mpirun -x FOO --host a,b -np 2 my_mpi_program -- Jeff Squyres jsquy...@cisco.com _______________________________________________ devel mailing list devel@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/devel
_______________________________________________ devel mailing list devel@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/devel