~ubuntu-branches/ubuntu/vivid/mpich/vivid-proposed

« back to all changes in this revision

Viewing changes to src/nameserv/file/file_nameserv.c

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-04-01 20:24:20 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: package-import@ubuntu.com-20140401202420-t5ey1ia2klt5dkq3
Tags: 3.1-4
* [c3e3398] Disable test_primitives, which is unreliable on some platforms.
            (Closes: #743047)
* [265a699] Add minimal autotest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#endif
20
20
#include <errno.h>
21
21
 
 
22
/*
 
23
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
 
24
 
 
25
categories:
 
26
    - name        : PROCESS_MANAGER
 
27
      description : cvars that control the client-side process manager code
 
28
 
 
29
cvars:
 
30
    - name        : MPIR_CVAR_NAMESERV_FILE_PUBDIR
 
31
      category    : PROCESS_MANAGER
 
32
      alt-env     : MPIR_CVAR_NAMEPUB_DIR
 
33
      type        : string
 
34
      default     : NULL
 
35
      class       : none
 
36
      verbosity   : MPI_T_VERBOSITY_USER_BASIC
 
37
      scope       : MPI_T_SCOPE_ALL_EQ
 
38
      description : >-
 
39
        Sets the directory to use for MPI service publishing in the
 
40
        file nameserv implementation.  Allows the user to override
 
41
        where the publish and lookup information is placed for
 
42
        connect/accept based applications.
 
43
 
 
44
=== END_MPI_T_CVAR_INFO_BLOCK ===
 
45
*/
 
46
 
22
47
/* For writing the name/service pair */
23
48
/* style: allow:fprintf:1 sig:0 */   
24
49
 
57
82
    (*handle_ptr)->mypid   = getpid();
58
83
 
59
84
    /* Get the dirname.  Could use an info value of NAMEPUB_CONTACT */
60
 
    ret = MPL_env2str("MPICH_NAMEPUB_DIR", &dirname);
61
 
    if (!ret) {
 
85
    dirname = MPIR_CVAR_NAMESERV_FILE_PUBDIR;
 
86
    if (!dirname) {
62
87
        /* user did not specify a directory, try using HOME */
63
88
        ret = MPL_env2str("HOME", &dirname);
64
89
        if (!ret) {
172
197
int MPID_NS_Lookup( MPID_NS_Handle handle, const MPID_Info *info_ptr,
173
198
                    const char service_name[], char port[] )
174
199
{
 
200
    FILE *fp;
 
201
    char filename[MAXPATHLEN];
 
202
    int  mpi_errno = MPI_SUCCESS;
 
203
#ifdef HAVE_ERROR_CHECKING
175
204
    static const char FCNAME[] = "MPID_NS_Lookup";
176
 
    FILE *fp;
177
 
    char filename[MAXPATHLEN];
178
 
    int  mpi_errno = MPI_SUCCESS;
 
205
#endif
179
206
    
180
207
    /* Determine file and directory name.  The file name is from
181
208
       the service name */
246
273
        /* --BEGIN ERROR HANDLING-- */
247
274
        /* Error: this name was not found */
248
275
        err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
249
 
                                    MPI_ERR_OTHER, "**namepubnotpub",
 
276
                                    MPI_ERR_SERVICE, "**namepubnotpub",
250
277
                                    "**namepubnotpub %s", service_name );
251
278
        return err;
252
279
        /* --END ERROR HANDLING-- */