OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
printcpu.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| printcpu ../starter/source/system/printcpu.F
25!||--- called by ------------------------------------------------------
26!|| starter0 ../starter/source/starter/starter0.F
27!||--- calls -----------------------------------------------------
28!|| cpuinfo ../starter/source/system/mon_c.c
29!|| my_flush ../starter/source/system/machine.F
30!||====================================================================
31 SUBROUTINE printcpu()
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35#include "implicit_f.inc"
36C-----------------------------------------------
37C G l o b a l P a r a m e t e r s
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41#include "units_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER ITASK
46
47 CHARACTER*256 HOSTNAME, CPUNAM
48 INTEGER FREQUENCE,LENH,LENC,I,NPROC,MEM,SWAP
49 !
50 CHARACTER(len=129) :: STACKSIZE_INFO
51 INTEGER :: STACKSIZE_INFO_LEN
52
53 CHARACTER(len=129) :: OMP_STACKSIZE_INFO
54 INTEGER :: OMP_STACKSIZE_INFO_LEN
55
56 CALL cpuinfo(hostname,lenh,cpunam, lenc, frequence,mem,swap)
57
58 IF(mem>-1)THEN
59 WRITE(iout,*)' '
60 WRITE(iout,7000)
61 WRITE(iout,*)' '
62
63 WRITE(iout,7400)
64
65 WRITE(iout,'(A,A,A,A,A,I4,A,I6,A,I6,A)') ' ',
66 . hostname(1:lenh),' ',cpunam(1:lenc),', ',frequence,
67 . ' MHz, ',mem,' MB RAM, ',swap,' MB swap'
68
69 WRITE(iout,*)' '
70
71 ELSE
72 WRITE(iout,*)' '
73 WRITE(iout,7000)
74 WRITE(iout,*)' '
75
76 WRITE(iout,7450)
77
78 WRITE(iout,'(A,A,A,A,A,I4,A)') ' ',
79 . hostname(1:lenh),' ',cpunam(1:lenc),', ',frequence,
80 . ' MHz '
81
82 WRITE(iout,*)' '
83 ENDIF
84
85 omp_stacksize_info_len=128
86 stacksize_info_len=128
87 call get_solver_stacksize(stacksize_info,stacksize_info_len,omp_stacksize_info,omp_stacksize_info_len)
88 WRITE(iout,'(A,A)') ' STACKSIZE . . . . . . . . . . . . . . . . . . . . ',stacksize_info(1:stacksize_info_len)
89 WRITE(iout,'(A,A)') ' THREAD STACKSIZE . . . . . . . . . . . . . . . . . ',omp_stacksize_info(1:omp_stacksize_info_len)
90 WRITE(iout,'(A)') ' '
91 ! Force write to output file
92 CALL my_flush(iout)
93
94 7000 FORMAT (' COMPUTATION HARDWARE DESCRIPTION')
95 7400 FORMAT (' HOSTNAME CPU TYPE, FREQUENCY AND MEMORY')
96 7450 FORMAT (' HOSTNAME CPU TYPE AND FREQUENCY')
97 7500 FORMAT (' CPU# HOSTNAME CPU TYPE, FREQUENCY AND MEMORY')
98 7550 FORMAT (' CPU# HOSTNAME CPU TYPE AND FREQUENCY')
99
100 END
subroutine printcpu()
Definition printcpu.F:32
void get_solver_stacksize(char *stsize, int *stsize_len, char *omp_stsize, int *omp_stsize_len)
subroutine my_flush(iunit)
Definition machine.F:147
void cpuinfo(char *hostname, int *lenhost, char *cputype, int *lencputype, int *frequence, int *memory, int *swap)
Definition mon_c.c:671