Here is the problem - the following code was changed in session_dir.c:

-#ifdef __WINDOWS__
-#define OMPI_DEFAULT_TMPDIR "C:\\TEMP"
-#else
-#define OMPI_DEFAULT_TMPDIR "/tmp"
-#endif
-
 #define OMPI_PRINTF_FIX_STRING(a) ((NULL == a) ? "(null)" : a)

 /****************************
@@ -262,14 +257,8 @@
     else if( NULL != getenv("OMPI_PREFIX_ENV") ) { /* OMPI Environment var
*/
         prefix = strdup(getenv("OMPI_PREFIX_ENV"));
     }
-    else if( NULL != getenv("TMPDIR") ) { /* General Environment var */
-        prefix = strdup(getenv("TMPDIR"));
-    }
-    else if( NULL != getenv("TMP") ) { /* Another general environment var
*/
-        prefix = strdup(getenv("TMP"));
-    }
-    else { /* ow. just use the default tmp directory */
-        prefix = strdup(OMPI_DEFAULT_TMPDIR);
+    else { /* General Environment var */
+        prefix = strdup(opal_tmp_directory());
     }

I believe the problem is that opal_tmp_directory doesn't have
OMPI_DEFAULT_TMPDIR - it just defaults to $HOME.

This should probably be fixed.


On 3/31/08 2:01 PM, "Josh Hursey" <jjhur...@open-mpi.org> wrote:

> Nope. None of those environment variables are defined. Should they
> be? It would seem that the last part of the logic should be (re-)
> extended to use /tmp if it exists.
> 
> -- Josh
> 
> On Mar 31, 2008, at 3:51 PM, George Bosilca wrote:
>> I looked over the code and I don't see any problems with the
>> changes. The only think I did is replacing the getenv("HOME") by
>> opal_home_directory ...
>> 
>> Here is the logic for selecting the TMP directory:
>> 
>>     if( NULL == (str = getenv("TMPDIR")) )
>>         if( NULL == (str = getenv("TEMP")) )
>>             if( NULL == (str = getenv("TMP")) )
>>                 if( NULL == (str = opal_home_directory()) )
>>                     str = ".";
>> 
>> Do you have any of those (TMPDIR, TEMP or TMP) in your environment ?
>> 
>>   george.
>> 
>> On Mar 31, 2008, at 3:13 PM, Josh Hursey wrote:
>>> So does anyone know why the session directories are in $HOME instead
>>> of /tmp?
>>> 
>>> I'm using r18044 and every time I run the session directories are
>>> created in $HOME. George does this have anything to do with your
>>> commits from earlier?
>>> 
>>> -- Josh
>>> _______________________________________________
>>> devel mailing list
>>> de...@open-mpi.org
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> 
>> _______________________________________________
>> devel mailing list
>> de...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
> 
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/devel


Reply via email to