(git:5fbb678)
Loading...
Searching...
No Matches
cp_files.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Utility routines to open and close files. Tracking of preconnections.
10!> \par History
11!> - Creation CP2K_WORKSHOP 1.0 TEAM
12!> - Revised (18.02.2011,MK)
13!> - Enhanced error checking (22.02.2011,MK)
14!> \author Matthias Krack (MK)
15! **************************************************************************************************
17 USE iso_c_binding, ONLY: c_char,&
18 c_f_pointer,&
19 c_null_char,&
20 c_ptr
21 USE kinds, ONLY: default_path_length
22 USE machine, ONLY: default_input_unit,&
25#include "../base/base_uses.f90"
26
27 IMPLICIT NONE
28
29 PRIVATE
30
31 PUBLIC :: close_file, &
33 open_file, &
38
39 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_files'
40
41 INTEGER, PARAMETER :: max_preconnections = 10, &
42 max_unit_number = 999
43
44 TYPE preconnection_type
45 PRIVATE
46 CHARACTER(LEN=default_path_length) :: file_name = ""
47 INTEGER :: unit_number = -1
48 END TYPE preconnection_type
49
50 TYPE(preconnection_type), DIMENSION(max_preconnections) :: preconnected
51
52CONTAINS
53
54! **************************************************************************************************
55!> \brief Add an entry to the list of preconnected units
56!> \param file_name ...
57!> \param unit_number ...
58!> \par History
59!> - Creation (22.02.2011,MK)
60!> \author Matthias Krack (MK)
61! **************************************************************************************************
62 SUBROUTINE assign_preconnection(file_name, unit_number)
63
64 CHARACTER(LEN=*), INTENT(IN) :: file_name
65 INTEGER, INTENT(IN) :: unit_number
66
67 INTEGER :: ic, islot, nc
68
69 IF ((unit_number < 1) .OR. (unit_number > max_unit_number)) THEN
70 cpabort("An invalid logical unit number was specified.")
71 END IF
72
73 IF (len_trim(file_name) == 0) THEN
74 cpabort("No valid file name was specified.")
75 END IF
76
77 nc = SIZE(preconnected)
78
79 ! Check if a preconnection already exists
80 DO ic = 1, nc
81 IF (trim(preconnected(ic)%file_name) == trim(file_name)) THEN
82 ! Return if the entry already exists
83 IF (preconnected(ic)%unit_number == unit_number) THEN
84 RETURN
85 ELSE
86 CALL print_preconnection_list()
87 CALL cp_abort(__location__, &
88 "Attempt to connect the already connected file <"// &
89 trim(file_name)//"> to another unit.")
90 END IF
91 END IF
92 END DO
93
94 ! Search for an unused entry
95 islot = -1
96 DO ic = 1, nc
97 IF (preconnected(ic)%unit_number == -1) THEN
98 islot = ic
99 EXIT
100 END IF
101 END DO
102
103 IF (islot == -1) THEN
104 CALL print_preconnection_list()
105 cpabort("No free slot found in the list of preconnected units.")
106 END IF
107
108 preconnected(islot)%file_name = trim(file_name)
109 preconnected(islot)%unit_number = unit_number
110
111 END SUBROUTINE assign_preconnection
112
113! **************************************************************************************************
114!> \brief Close an open file given by its logical unit number.
115!> Optionally, keep the file and unit preconnected.
116!> \param unit_number ...
117!> \param file_status ...
118!> \param keep_preconnection ...
119!> \author Matthias Krack (MK)
120! **************************************************************************************************
121 SUBROUTINE close_file(unit_number, file_status, keep_preconnection)
122
123 INTEGER, INTENT(IN) :: unit_number
124 CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: file_status
125 LOGICAL, INTENT(IN), OPTIONAL :: keep_preconnection
126
127 CHARACTER(LEN=2*default_path_length) :: message
128 CHARACTER(LEN=6) :: status_string
129 CHARACTER(LEN=default_path_length) :: file_name
130 INTEGER :: istat
131 LOGICAL :: exists, is_open, keep_file_connection
132
133 keep_file_connection = .false.
134 IF (PRESENT(keep_preconnection)) keep_file_connection = keep_preconnection
135
136 INQUIRE (unit=unit_number, exist=exists, opened=is_open, iostat=istat)
137
138 IF (istat /= 0) THEN
139 WRITE (unit=message, fmt="(A,I0,A,I0,A)") &
140 "An error occurred inquiring the unit with the number ", unit_number, &
141 " (IOSTAT = ", istat, ")"
142 cpabort(trim(message))
143 ELSE IF (.NOT. exists) THEN
144 WRITE (unit=message, fmt="(A,I0,A)") &
145 "The specified unit number ", unit_number, &
146 " cannot be closed, because it does not exist."
147 cpabort(trim(message))
148 END IF
149
150 ! Close the specified file
151
152 IF (is_open) THEN
153 ! Refuse to close any preconnected system unit
154 IF (unit_number == default_input_unit) THEN
155 WRITE (unit=message, fmt="(A,I0)") &
156 "Attempt to close the default input unit number ", unit_number
157 cpabort(trim(message))
158 END IF
159 IF (unit_number == default_output_unit) THEN
160 WRITE (unit=message, fmt="(A,I0)") &
161 "Attempt to close the default output unit number ", unit_number
162 cpabort(trim(message))
163 END IF
164 ! Define status after closing the file
165 IF (PRESENT(file_status)) THEN
166 status_string = trim(file_status)
167 ELSE
168 status_string = "KEEP"
169 END IF
170 ! Optionally, keep this unit preconnected
171 INQUIRE (unit=unit_number, name=file_name, iostat=istat)
172 IF (istat /= 0) THEN
173 WRITE (unit=message, fmt="(A,I0,A,I0,A)") &
174 "An error occurred inquiring the unit with the number ", unit_number, &
175 " (IOSTAT = ", istat, ")."
176 cpabort(trim(message))
177 END IF
178 ! Manage preconnections
179 IF (keep_file_connection) THEN
180 CALL assign_preconnection(file_name, unit_number)
181 ELSE
182 CALL delete_preconnection(file_name, unit_number)
183 CLOSE (unit=unit_number, iostat=istat, status=trim(status_string))
184 IF (istat /= 0) THEN
185 WRITE (unit=message, fmt="(A,I0,A,I0,A)") &
186 "An error occurred closing the file with the logical unit number ", &
187 unit_number, " (IOSTAT = ", istat, ")."
188 cpabort(trim(message))
189 END IF
190 END IF
191 END IF
192
193 END SUBROUTINE close_file
194
195! **************************************************************************************************
196!> \brief Remove an entry from the list of preconnected units
197!> \param file_name ...
198!> \param unit_number ...
199!> \par History
200!> - Creation (22.02.2011,MK)
201!> \author Matthias Krack (MK)
202! **************************************************************************************************
203 SUBROUTINE delete_preconnection(file_name, unit_number)
204
205 CHARACTER(LEN=*), INTENT(IN) :: file_name
206 INTEGER :: unit_number
207
208 INTEGER :: ic, nc
209
210 nc = SIZE(preconnected)
211
212 ! Search for preconnection entry and delete it when found
213 DO ic = 1, nc
214 IF (trim(preconnected(ic)%file_name) == trim(file_name)) THEN
215 IF (preconnected(ic)%unit_number == unit_number) THEN
216 preconnected(ic)%file_name = ""
217 preconnected(ic)%unit_number = -1
218 EXIT
219 ELSE
220 CALL print_preconnection_list()
221 CALL cp_abort(__location__, &
222 "Attempt to disconnect the file <"// &
223 trim(file_name)// &
224 "> from an unlisted unit.")
225 END IF
226 END IF
227 END DO
228
229 END SUBROUTINE delete_preconnection
230
231! **************************************************************************************************
232!> \brief Returns the first logical unit that is not preconnected
233!> \param file_name ...
234!> \return ...
235!> \author Matthias Krack (MK)
236!> \note
237!> -1 if no free unit exists
238! **************************************************************************************************
239 FUNCTION get_unit_number(file_name) RESULT(unit_number)
240
241 CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: file_name
242 INTEGER :: unit_number
243
244 INTEGER :: ic, istat, nc
245 LOGICAL :: exists, is_open
246
247 IF (PRESENT(file_name)) THEN
248 nc = SIZE(preconnected)
249 ! Check for preconnected units
250 DO ic = 3, nc ! Exclude the preconnected system units (< 3)
251 IF (trim(preconnected(ic)%file_name) == trim(file_name)) THEN
252 unit_number = preconnected(ic)%unit_number
253 RETURN
254 END IF
255 END DO
256 END IF
257
258 ! Get a new unit number
259 DO unit_number = 1, max_unit_number
260 IF (any(unit_number == preconnected(:)%unit_number)) cycle
261 INQUIRE (unit=unit_number, exist=exists, opened=is_open, iostat=istat)
262 IF (exists .AND. (.NOT. is_open) .AND. (istat == 0)) RETURN
263 END DO
264
265 unit_number = -1
266
267 END FUNCTION get_unit_number
268
269! **************************************************************************************************
270!> \brief Allocate and initialise the list of preconnected units
271!> \par History
272!> - Creation (22.02.2011,MK)
273!> \author Matthias Krack (MK)
274! **************************************************************************************************
276
277 INTEGER :: ic, nc
278
279 nc = SIZE(preconnected)
280
281 DO ic = 1, nc
282 preconnected(ic)%file_name = ""
283 preconnected(ic)%unit_number = -1
284 END DO
285
286 ! Define reserved unit numbers
287 preconnected(1)%file_name = "stdin"
288 preconnected(1)%unit_number = default_input_unit
289 preconnected(2)%file_name = "stdout"
290 preconnected(2)%unit_number = default_output_unit
291
292 END SUBROUTINE init_preconnection_list
293
294! **************************************************************************************************
295!> \brief Opens the requested file using a free unit number
296!> \param file_name ...
297!> \param file_status ...
298!> \param file_form ...
299!> \param file_action ...
300!> \param file_position ...
301!> \param file_pad ...
302!> \param unit_number ...
303!> \param debug ...
304!> \param skip_get_unit_number ...
305!> \param file_access file access mode
306!> \author Matthias Krack (MK)
307! **************************************************************************************************
308 SUBROUTINE open_file(file_name, file_status, file_form, file_action, &
309 file_position, file_pad, unit_number, debug, &
310 skip_get_unit_number, file_access)
311
312 CHARACTER(LEN=*), INTENT(IN) :: file_name
313 CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: file_status, file_form, file_action, &
314 file_position, file_pad
315 INTEGER, INTENT(INOUT) :: unit_number
316 INTEGER, INTENT(IN), OPTIONAL :: debug
317 LOGICAL, INTENT(IN), OPTIONAL :: skip_get_unit_number
318 CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: file_access
319
320 CHARACTER(LEN=*), PARAMETER :: routinen = 'open_file'
321
322 CHARACTER(LEN=11) :: access_string, action_string, current_action, current_form, &
323 form_string, pad_string, position_string, status_string
324 CHARACTER(LEN=2*default_path_length) :: message
325 CHARACTER(LEN=default_path_length) :: cwd, iomsgstr, real_file_name
326 INTEGER :: debug_unit, istat
327 LOGICAL :: exists, get_a_new_unit, is_open
328
329 IF (PRESENT(file_access)) THEN
330 access_string = trim(file_access)
331 ELSE
332 access_string = "SEQUENTIAL"
333 END IF
334
335 IF (PRESENT(file_status)) THEN
336 status_string = trim(file_status)
337 ELSE
338 status_string = "OLD"
339 END IF
340
341 IF (PRESENT(file_form)) THEN
342 form_string = trim(file_form)
343 ELSE
344 form_string = "FORMATTED"
345 END IF
346
347 IF (PRESENT(file_pad)) THEN
348 pad_string = file_pad
349 IF (form_string == "UNFORMATTED") THEN
350 WRITE (unit=message, fmt="(A)") &
351 "The PAD specifier is not allowed for an UNFORMATTED file."
352 cpabort(trim(message))
353 END IF
354 ELSE
355 pad_string = "YES"
356 END IF
357
358 IF (PRESENT(file_action)) THEN
359 action_string = trim(file_action)
360 ELSE
361 action_string = "READ"
362 END IF
363
364 IF (PRESENT(file_position)) THEN
365 position_string = trim(file_position)
366 ELSE
367 position_string = "REWIND"
368 END IF
369
370 IF (PRESENT(debug)) THEN
371 debug_unit = debug
372 ELSE
373 debug_unit = 0 ! use default_output_unit for debugging
374 END IF
375
376 IF (file_name(1:1) == " ") THEN
377 WRITE (unit=message, fmt="(A)") &
378 "The file name <"//trim(file_name)//"> has leading blanks."
379 cpabort(trim(message))
380 END IF
381
382 IF (status_string == "OLD") THEN
383 real_file_name = discover_file(file_name)
384 ELSE
385 ! Strip leading and trailing blanks from file name
386 real_file_name = trim(adjustl(file_name))
387 IF (len_trim(real_file_name) == 0) THEN
388 cpabort("A file name length of zero for a new file is invalid.")
389 END IF
390 END IF
391
392 ! Check the specified input file name
393 INQUIRE (file=trim(real_file_name), exist=exists, opened=is_open, iostat=istat)
394
395 IF (istat /= 0) THEN
396 WRITE (unit=message, fmt="(A,I0,A)") &
397 "An error occurred inquiring the file <"//trim(real_file_name)// &
398 "> (IOSTAT = ", istat, ")"
399 cpabort(trim(message))
400 ELSE IF (status_string == "OLD") THEN
401 IF (.NOT. exists) THEN
402 WRITE (unit=message, fmt="(A)") &
403 "The specified OLD file <"//trim(real_file_name)// &
404 "> cannot be opened. It does not exist. "// &
405 "Data directory path: "//trim(get_data_dir())
406 cpabort(trim(message))
407 END IF
408 END IF
409
410 ! Open the specified input file
411 IF (is_open) THEN
412 INQUIRE (file=trim(real_file_name), number=unit_number, &
413 action=current_action, form=current_form)
414 IF (trim(position_string) == "REWIND") rewind(unit=unit_number)
415 IF (trim(status_string) == "NEW") THEN
416 CALL cp_abort(__location__, &
417 "Attempt to re-open the existing OLD file <"// &
418 trim(real_file_name)//"> with status attribute NEW.")
419 END IF
420 IF (trim(current_form) /= trim(form_string)) THEN
421 CALL cp_abort(__location__, &
422 "Attempt to re-open the existing "// &
423 trim(current_form)//" file <"//trim(real_file_name)// &
424 "> as "//trim(form_string)//" file.")
425 END IF
426 IF (trim(current_action) /= trim(action_string)) THEN
427 CALL cp_abort(__location__, &
428 "Attempt to re-open the existing file <"// &
429 trim(real_file_name)//"> with the modified ACTION attribute "// &
430 trim(action_string)//". The current ACTION attribute is "// &
431 trim(current_action)//".")
432 END IF
433 ELSE
434 ! Find an unused unit number
435 get_a_new_unit = .true.
436 IF (PRESENT(skip_get_unit_number)) THEN
437 IF (skip_get_unit_number) get_a_new_unit = .false.
438 END IF
439 IF (get_a_new_unit) unit_number = get_unit_number(trim(real_file_name))
440 IF (unit_number < 1) THEN
441 WRITE (unit=message, fmt="(A)") &
442 "Cannot open the file <"//trim(real_file_name)// &
443 ">, because no unused logical unit number could be obtained."
444 cpabort(trim(message))
445 END IF
446 IF (trim(form_string) == "FORMATTED") THEN
447 OPEN (unit=unit_number, &
448 file=trim(real_file_name), &
449 status=trim(status_string), &
450 access=trim(access_string), &
451 form=trim(form_string), &
452 position=trim(position_string), &
453 action=trim(action_string), &
454 pad=trim(pad_string), &
455 iomsg=iomsgstr, &
456 iostat=istat)
457 ELSE
458 OPEN (unit=unit_number, &
459 file=trim(real_file_name), &
460 status=trim(status_string), &
461 access=trim(access_string), &
462 form=trim(form_string), &
463 position=trim(position_string), &
464 action=trim(action_string), &
465 iomsg=iomsgstr, &
466 iostat=istat)
467 END IF
468 IF (istat /= 0) THEN
469 CALL m_getcwd(cwd)
470 WRITE (unit=message, fmt="(A,I0,A,I0,A)") &
471 "An error occurred opening the file '"//trim(real_file_name)// &
472 "' (UNIT = ", unit_number, ", IOSTAT = ", istat, "). "//trim(iomsgstr)//". "// &
473 "Current working directory: "//trim(cwd)
474
475 cpabort(trim(message))
476 END IF
477 END IF
478
479 IF (debug_unit > 0) THEN
480 INQUIRE (file=trim(real_file_name), opened=is_open, number=unit_number, &
481 position=position_string, name=message, access=access_string, &
482 form=form_string, action=action_string)
483 WRITE (unit=debug_unit, fmt="(T2,A)") "BEGIN DEBUG "//trim(routinen)
484 WRITE (unit=debug_unit, fmt="(T3,A,I0)") "NUMBER : ", unit_number
485 WRITE (unit=debug_unit, fmt="(T3,A,L1)") "OPENED : ", is_open
486 WRITE (unit=debug_unit, fmt="(T3,A)") "NAME : "//trim(message)
487 WRITE (unit=debug_unit, fmt="(T3,A)") "POSITION: "//trim(position_string)
488 WRITE (unit=debug_unit, fmt="(T3,A)") "ACCESS : "//trim(access_string)
489 WRITE (unit=debug_unit, fmt="(T3,A)") "FORM : "//trim(form_string)
490 WRITE (unit=debug_unit, fmt="(T3,A)") "ACTION : "//trim(action_string)
491 WRITE (unit=debug_unit, fmt="(T2,A)") "END DEBUG "//trim(routinen)
492 CALL print_preconnection_list(debug_unit)
493 END IF
494
495 END SUBROUTINE open_file
496
497! **************************************************************************************************
498!> \brief Checks if file exists, considering also the file discovery mechanism.
499!> \param file_name ...
500!> \return ...
501!> \author Ole Schuett
502! **************************************************************************************************
503 FUNCTION file_exists(file_name) RESULT(exist)
504 CHARACTER(LEN=*), INTENT(IN) :: file_name
505 LOGICAL :: exist
506
507 CHARACTER(LEN=default_path_length) :: real_file_name
508
509 real_file_name = discover_file(file_name)
510 INQUIRE (file=trim(real_file_name), exist=exist)
511
512 END FUNCTION file_exists
513
514! **************************************************************************************************
515!> \brief Checks various locations for a file name.
516!> \param file_name ...
517!> \return ...
518!> \author Ole Schuett
519! **************************************************************************************************
520 FUNCTION discover_file(file_name) RESULT(real_file_name)
521 CHARACTER(LEN=*), INTENT(IN) :: file_name
522 CHARACTER(LEN=default_path_length) :: real_file_name
523
524 CHARACTER(LEN=default_path_length) :: candidate, data_dir
525 INTEGER :: stat
526 LOGICAL :: exists
527
528 ! Strip leading and trailing blanks from file name
529 real_file_name = trim(adjustl(file_name))
530
531 IF (len_trim(real_file_name) == 0) THEN
532 cpabort("A file name length of zero for an existing file is invalid.")
533 END IF
534
535 ! First try file name directly
536 INQUIRE (file=trim(real_file_name), exist=exists, iostat=stat)
537 IF (stat == 0 .AND. exists) RETURN
538
539 ! Then try the data directory
540 data_dir = get_data_dir()
541 IF (len_trim(data_dir) > 0) THEN
542 candidate = join_paths(data_dir, real_file_name)
543 INQUIRE (file=trim(candidate), exist=exists, iostat=stat)
544 IF (stat == 0 .AND. exists) THEN
545 real_file_name = candidate
546 RETURN
547 END IF
548 END IF
549
550 END FUNCTION discover_file
551
552! **************************************************************************************************
553!> \brief Returns path of data directory if set, otherwise an empty string
554!> \return ...
555!> \author Ole Schuett
556! **************************************************************************************************
557 FUNCTION get_data_dir() RESULT(res)
558 CHARACTER(len=default_path_length) :: res
559
560 CHARACTER(LEN=1, KIND=C_CHAR), DIMENSION(:), &
561 POINTER :: path_f
562 INTEGER :: i
563 TYPE(c_ptr) :: path_c
564 INTERFACE
565 FUNCTION get_data_dir_c() BIND(C, name="get_data_dir")
566 IMPORT :: c_ptr
567 TYPE(c_ptr) :: get_data_dir_c
568 END FUNCTION get_data_dir_c
569 END INTERFACE
570
571 path_c = get_data_dir_c()
572 CALL c_f_pointer(path_c, path_f, shape=(/default_path_length/))
573
574 res = ""
575 DO i = 1, default_path_length
576 IF (path_f(i) == c_null_char) RETURN
577 res(i:i) = path_f(i)
578 END DO
579
580 cpabort("CP2K_DATA_DIR path is too long")
581
582 END FUNCTION get_data_dir
583
584! **************************************************************************************************
585!> \brief Joins two file-paths, inserting '/' as needed.
586!> \param path1 ...
587!> \param path2 ...
588!> \return ...
589!> \author Ole Schuett
590! **************************************************************************************************
591 FUNCTION join_paths(path1, path2) RESULT(joined_path)
592 CHARACTER(LEN=*), INTENT(IN) :: path1, path2
593 CHARACTER(LEN=default_path_length) :: joined_path
594
595 INTEGER :: n
596
597 n = len_trim(path1)
598 IF (path2(1:1) == '/') THEN
599 joined_path = path2
600 ELSE IF (n == 0 .OR. path1(n:n) == '/') THEN
601 joined_path = trim(path1)//path2
602 ELSE
603 joined_path = trim(path1)//'/'//path2
604 END IF
605 END FUNCTION join_paths
606
607! **************************************************************************************************
608!> \brief Print the list of preconnected units
609!> \param output_unit which unit to print to (optional)
610!> \par History
611!> - Creation (22.02.2011,MK)
612!> \author Matthias Krack (MK)
613! **************************************************************************************************
614 SUBROUTINE print_preconnection_list(output_unit)
615 INTEGER, INTENT(IN), OPTIONAL :: output_unit
616
617 INTEGER :: ic, nc, unit
618
619 IF (PRESENT(output_unit)) THEN
620 unit = output_unit
621 ELSE
623 END IF
624
625 nc = SIZE(preconnected)
626
627 IF (output_unit > 0) THEN
628
629 WRITE (unit=output_unit, fmt="(A,/,A)") &
630 " LIST OF PRECONNECTED LOGICAL UNITS", &
631 " Slot Unit number File name"
632 DO ic = 1, nc
633 IF (preconnected(ic)%unit_number > 0) THEN
634 WRITE (unit=output_unit, fmt="(I6,3X,I6,8X,A)") &
635 ic, preconnected(ic)%unit_number, &
636 trim(preconnected(ic)%file_name)
637 ELSE
638 WRITE (unit=output_unit, fmt="(I6,17X,A)") &
639 ic, "UNUSED"
640 END IF
641 END DO
642 END IF
643 END SUBROUTINE print_preconnection_list
644
645END MODULE cp_files
const char * get_data_dir()
Returns path of data directory if set, otherwise an empty string.
Definition cp_data_dir.c:18
Utility routines to open and close files. Tracking of preconnections.
Definition cp_files.F:16
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
Definition cp_files.F:311
integer function, public get_unit_number(file_name)
Returns the first logical unit that is not preconnected.
Definition cp_files.F:240
type(preconnection_type), dimension(max_preconnections) preconnected
Definition cp_files.F:50
character(len=default_path_length) function, public discover_file(file_name)
Checks various locations for a file name.
Definition cp_files.F:521
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
Definition cp_files.F:122
logical function, public file_exists(file_name)
Checks if file exists, considering also the file discovery mechanism.
Definition cp_files.F:504
subroutine, public init_preconnection_list()
Allocate and initialise the list of preconnected units.
Definition cp_files.F:276
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public default_path_length
Definition kinds.F:58
Machine interface based on Fortran 2003 and POSIX.
Definition machine.F:17
integer, parameter, public default_output_unit
Definition machine.F:53
integer, parameter, public default_input_unit
Definition machine.F:53
subroutine, public m_getcwd(curdir)
...
Definition machine.F:616