system_uname(3f) - [M_system] call a C wrapper that calls uname(3c) to get current system information from Fortran (LICENSE:PD)
Synopsis
Description
Examples
Author
License
subroutine system_uname(WHICH,NAMEOUT)
character(KIND=C_CHAR),intent(in) :: WHICH character(len=*),intent(out) :: NAMEOUT
Given a letter, return a corresponding description of the current operating system. The NAMEOUT variable is assumed sufficiently large enough to hold the value.
s return the kernel name r return the kernel release v return the kernel version n return the network node hostname m return the machine hardware name T test mode -- print all information, in the following order - srvnm
Call uname(3c) from Fortran
program demo_system_uname use M_system, only : system_uname implicit none integer,parameter :: is=100 integer :: i character(len=*),parameter :: letters=srvnmxT character(len=is) :: string= do i=1,len(letters) write(*,(80("="))) call system_uname(letters(i:i),string) write(*,*)& &=====> TESTING system_uname(//letters(i:i)//)--->//trim(string) enddo
end program demo_system_uname
John S. Urban
Public Domain
Nemo Release 3.1 | system_uname (3m_system) | March 07, 2025 |