Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utilities/rocflu/cells/RFLU_WriteVersionString.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: Write file with version string.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Pointer to global type
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 !******************************************************************************
37 !
38 ! $Id: RFLU_WriteVersionString.F90,v 1.3 2008/12/06 08:44:54 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2003 by the University of Illinois
41 !
42 !******************************************************************************
43 
44 SUBROUTINE rflu_writeversionstring(global)
45 
46  USE moddatatypes
47  USE moderror
48  USE modglobal, ONLY: t_global
49  USE modparameters
50  USE modmpi
51 
52  IMPLICIT NONE
53 
54 ! ******************************************************************************
55 ! Definitions and declarations
56 ! ******************************************************************************
57 
58 ! ==============================================================================
59 ! Arguments
60 ! ==============================================================================
61 
62  TYPE(t_global), POINTER :: global
63 
64 ! ==============================================================================
65 ! Locals
66 ! ==============================================================================
67 
68  CHARACTER(CHRLEN) :: ifilename,modulestring,rcsidentstring,versionstring
69  INTEGER :: errorflag,versionwidth
70 
71 ! ******************************************************************************
72 ! Start
73 ! ******************************************************************************
74 
75  rcsidentstring = '$RCSfile: RFLU_WriteVersionString.F90,v $ $Revision: 1.3 $'
76 
77  CALL registerfunction(global,'RFLU_WriteVersionString', &
78  'RFLU_WriteVersionString.F90')
79 
80 ! ******************************************************************************
81 ! Build strings
82 ! ******************************************************************************
83 
84  CALL buildversionstring(versionstring)
85 
86  modulestring = 'rflucells'
87  ifilename = trim(global%outDir)//'rflucells.vrs'
88 
89 ! ******************************************************************************
90 ! Open file, write string, close file
91 ! ******************************************************************************
92 
93  IF ( global%myProcid == masterproc ) THEN
94  OPEN(if_vrs,file=ifilename,form='FORMATTED',status='UNKNOWN', &
95  position='APPEND',iostat=errorflag)
96  global%error = errorflag
97  IF ( global%error /= err_none ) THEN
98  CALL errorstop(global,err_file_open,__line__)
99  END IF ! global%error
100 
101  WRITE(if_vrs,'(A)') trim(modulestring)//" "//versionstring
102 
103  CLOSE(if_vrs,iostat=errorflag)
104  global%error = errorflag
105  IF ( global%error /= err_none ) THEN
106  CALL errorstop(global,err_file_close,__line__)
107  END IF ! global%error
108  END IF ! global%myProcid
109 
110 ! *****************************************************************************
111 ! End
112 ! *****************************************************************************
113 
114  CALL deregisterfunction(global)
115 
116 END SUBROUTINE rflu_writeversionstring
117 
118 ! ******************************************************************************
119 !
120 ! RCS Revision history:
121 !
122 ! $Log: RFLU_WriteVersionString.F90,v $
123 ! Revision 1.3 2008/12/06 08:44:54 mtcampbe
124 ! Updated license.
125 !
126 ! Revision 1.2 2008/11/19 22:18:04 mtcampbe
127 ! Added Illinois Open Source License/Copyright
128 !
129 ! Revision 1.1 2003/04/01 17:02:46 haselbac
130 ! Initial revision
131 !
132 ! ******************************************************************************
133 
134 
135 
136 
137 
138 
139 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine buildversionstring(versionString)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine rflu_writeversionstring(global)