[cmor] 89/190: 2011-02-16 : added process id to temporary file names so that code can be run via mpi

Alastair McKinstry mckinstry at moszumanska.debian.org
Tue Jul 21 12:54:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch debian/master
in repository cmor.

commit 5ac5e767d22b93f9145e5a81773ffdd50117d611
Author: Charles Doutriaux <doutriaux1 at llnl.gov>
Date:   Wed Feb 16 14:18:47 2011 -0800

    2011-02-16 : added process id to temporary file names so that code can be run via mpi
---
 RELEASE-NOTES |  2 ++
 Src/cmor.c    | 10 +++++++++-
 configure     | 18 +++++++++---------
 configure.ac  |  2 +-
 4 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index a68f91b..736ab89 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,5 @@
+2011-02-16 : releasing 2.5.5
+2011-02-16 : added process id to temporary file names so that code can be run via mpi
 2011-02-02 : releasing 2.5.4
 2011-02-02 : fixed a memory issue in the Python API for get_variable_attribute and has_variable_attribute
 2011-01-31 : releasing 2.5.3
diff --git a/Src/cmor.c b/Src/cmor.c
index 29f668e..9cc4709 100644
--- a/Src/cmor.c
+++ b/Src/cmor.c
@@ -12,7 +12,8 @@
 #include <math.h>
 
 #include <sys/types.h>
-
+#define _POSIX_SOURCE
+#include <unistd.h>
 
     /* this is defining NETCDF4 variable if we are using NETCDF3 not used anywhere else*/
 #ifndef NC_NETCDF4
@@ -1993,6 +1994,13 @@ int cmor_write(int var_id,void *data, char type, char *suffix, int ntimes_passed
       strncat(outname,msg,CMOR_MAX_STRING-strlen(outname));
       strncpy(cmor_vars[var_id].suffix,msg,CMOR_MAX_STRING);
     }
+
+    /* Add Process ID and a random number to filename */
+    sprintf(msg,"%d",(int) getpid());
+    strncat(outname,"_",CMOR_MAX_STRING-strlen(outname));
+    strncat(outname,msg,CMOR_MAX_STRING-strlen(outname));
+    
+    /* Add the '.nc' extension */
     strncat(outname,".nc",CMOR_MAX_STRING-strlen(outname) );
 
     /* at this point we need to rename the original file name to this so that the rest of the code works */
diff --git a/configure b/configure
index 9bc782a..52270e5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for cmor 2.5.4.
+# Generated by GNU Autoconf 2.61 for cmor 2.5.5.
 #
 # Report bugs to <doutriaux1 at llnl.gov>.
 #
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='cmor'
 PACKAGE_TARNAME='cmor'
-PACKAGE_VERSION='2.5.4'
-PACKAGE_STRING='cmor 2.5.4'
+PACKAGE_VERSION='2.5.5'
+PACKAGE_STRING='cmor 2.5.5'
 PACKAGE_BUGREPORT='doutriaux1 at llnl.gov'
 
 ac_default_prefix=/usr/local/cmor
@@ -1185,7 +1185,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cmor 2.5.4 to adapt to many kinds of systems.
+\`configure' configures cmor 2.5.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1251,7 +1251,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cmor 2.5.4:";;
+     short | recursive ) echo "Configuration of cmor 2.5.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1350,7 +1350,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-cmor configure 2.5.4
+cmor configure 2.5.5
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1364,7 +1364,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cmor $as_me 2.5.4, which was
+It was created by cmor $as_me 2.5.5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -4989,7 +4989,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by cmor $as_me 2.5.4, which was
+This file was extended by cmor $as_me 2.5.5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5032,7 +5032,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-cmor config.status 2.5.4
+cmor config.status 2.5.5
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index 1c4d11d..f6775c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl                                                -*- Autoconf -*-
 dnl  Process this file with autoconf to produce a configure script.
 
 dnl AC_PREREQ(2.59)
-AC_INIT(cmor, 2.5.4, doutriaux1 at llnl.gov)
+AC_INIT(cmor, 2.5.5, doutriaux1 at llnl.gov)
 
 GIT_TAG=`./get_git_version.sh`
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cmor.git



More information about the debian-science-commits mailing list