-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include program compile, runtime info in NWTC Lib
- Loading branch information
Showing
3 changed files
with
43 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,9 @@ | |
!> This module contains I/O-related variables and routines with non-system-specific logic. | ||
MODULE NWTC_IO | ||
|
||
USE SysSubs | ||
USE NWTC_Library_Types ! ProgDesc and other types with copy and other routines for those types | ||
USE SysSubs | ||
USE NWTC_Library_Types ! ProgDesc and other types with copy and other routines for those types | ||
USE VersionInfo | ||
|
||
IMPLICIT NONE | ||
|
||
|
@@ -2171,7 +2172,44 @@ SUBROUTINE DLLTypeUnPack( OutData, ReKiBuf, DbKiBuf, IntKiBuf, ErrStat, ErrMsg ) | |
END IF | ||
|
||
END SUBROUTINE DLLTypeUnPack | ||
!======================================================================= | ||
!> | ||
SUBROUTINE DispCompileRuntimeInfo() | ||
|
||
USE iso_fortran_env, ONLY: compiler_options, compiler_version | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rafmudaf
Author
Collaborator
|
||
|
||
CHARACTER(200) :: name | ||
CHARACTER(200) :: git_commit, architecture, compiled_precision | ||
CHARACTER(200) :: execution_date, execution_time, execution_zone | ||
|
||
name = ProgName | ||
git_commit = QueryGitVersion() | ||
architecture = TRIM(Num2LStr(BITS_IN_ADDR))//' bit' | ||
IF (ReKi == SiKi) THEN | ||
compiled_precision = 'single' | ||
ELSE IF (ReKi == R8Ki) THEN | ||
compiled_precision = 'double' | ||
ELSE | ||
compiled_precision = 'unknown' | ||
END IF | ||
|
||
CALL WrScr(trim(name)//'-'//trim(git_commit)) | ||
CALL WrScr('Compile Info:') | ||
call wrscr(' - Compiler: '//trim(compiler_version())) | ||
CALL WrScr(' - Architecture: '//trim(architecture)) | ||
CALL WrScr(' - Precision: '//trim(compiled_precision)) | ||
CALL WrScr(' - Date: '//__DATE__) | ||
CALL WrScr(' - Time: '//__TIME__) | ||
! call wrscr(' - Options: '//trim(compiler_options())) | ||
|
||
CALL DATE_AND_TIME(execution_date, execution_time, execution_zone) | ||
|
||
CALL WrScr('Execution Info:') | ||
CALL WrScr(' - Date: '//TRIM(execution_date(5:6)//'/'//execution_date(7:8)//'/'//execution_date(1:4))) | ||
CALL WrScr(' - Time: '//TRIM(execution_time(1:2)//':'//execution_time(3:4)//':'//execution_time(5:6))//TRIM(execution_zone)) | ||
CALL WrScr('') | ||
|
||
END SUBROUTINE | ||
!======================================================================= | ||
!> This routine displays the name of the program, its version, and its release date. | ||
!! Use DispNVD (nwtc_io::dispnvd) instead of directly calling a specific routine in the generic interface. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unfortunately, Intel(R) Visual Fortran Compiler 17.0.2.187, doesn't have the compiler_version function. I think that's the one we use at NREL for now. I'm guessing that's why this line was commented (see FAST_Subs in previous commit). @rafmudaf , should we comment it again?