On Aug 31, 2010, at 8:36 AM, Nicolas Deladerriere wrote: > I also fixed my memory allocation issue using environment variable > OMPI_MCA_memory_ptmalloc2_disable which is much more easier (at least in my > case) than compiled new openmpi package and install that new package. > The point is that it is a bit complicated to have information about this > variable (seems to be a secret variable !). Actually I have read that it > cannot be used as normal MCA parameter and cannot be set in configuration > file ( http://www.open-mpi.org/community/lists/users/2010/06/13208.php ).
Correct. Unfortunately, the way this MCA param is used, it is checked during the startup of the process itself -- before even main() is invoked. Hence, we really can only do very, very limited things to check to see if that MCA parameter is enabled. getenv() is in the list of acceptable checks; open() is not. Basically, anything that invokes malloc() is not in the list of acceptable checks. > When using this variable, I have added -x OMPI_MCA_memory_ptmalloc2_disable > option to my mpirun command line. Do I really have to do it ? Or you could set it in your shell startup files. > Is the environment variable (plus -x option if required) is still the only > solution to set this parameter to 1 ? It depends. You need to have that env variable set on all nodes where you are running. 1. If you're using rsh/ssh to start your job, you could set this env variable in the non-interactive section of your shell startup files on every node, and then it should be set automatically when you mpirun across the nodes. 2. If you're using a resource manager/scheduler of some sort, it might well copy your environment for you to all the nodes where you mpirun. So setenv'ing it in your current shell and then submitting to the scheduler might be sufficient (e.g,. Torque and SLURM do this). -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/