From 0aaec36fe862a7dcadead3495cc94e5d7f3b598d Mon Sep 17 00:00:00 2001 From: kousuke-nakano <37653569+kousuke-nakano@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:41:53 +0900 Subject: [PATCH 1/3] the version info. is printed in the stand-alone .f90 programs --- src/a_convertfort10/convertfort10.f90 | 3 +++ src/a_convertfort10mol/convertfort10mol.f90 | 3 +++ src/a_convertfortpfaff/convertpfaff.f90 | 3 +++ src/a_makefort10/makefort10.f90 | 3 +++ src/a_prep/prep.f90 | 4 ++++ src/a_readforward/readforward.f90 | 3 +++ src/m_common/_version.f90 | 2 +- 7 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/a_convertfort10/convertfort10.f90 b/src/a_convertfort10/convertfort10.f90 index 22a47e1..fef2e60 100644 --- a/src/a_convertfort10/convertfort10.f90 +++ b/src/a_convertfort10/convertfort10.f90 @@ -121,6 +121,9 @@ program convertfort10 nprocn = 1 commopt_mpi = 0 #endif + ! output version information + if (rankn .eq. 0) call print_version + proc8 = nprocn !#ifdef __CASO !#else diff --git a/src/a_convertfort10mol/convertfort10mol.f90 b/src/a_convertfort10mol/convertfort10mol.f90 index 106ef62..df24740 100644 --- a/src/a_convertfort10mol/convertfort10mol.f90 +++ b/src/a_convertfort10mol/convertfort10mol.f90 @@ -62,6 +62,9 @@ program convertfort10mol end if ! AAA end lines to be added #endif + ! output version information + if (rankn .eq. 0) call print_version + nprocu = nprocn nproc_diag = nprocu call mpi_sub_comm_create(comm_mpi, nproc_diag, sub_comm_diag, ierr) diff --git a/src/a_convertfortpfaff/convertpfaff.f90 b/src/a_convertfortpfaff/convertpfaff.f90 index c688244..32a4d2f 100644 --- a/src/a_convertfortpfaff/convertpfaff.f90 +++ b/src/a_convertfortpfaff/convertpfaff.f90 @@ -34,6 +34,9 @@ program convertpfaff real*8 scale_unp, angle_rot, phi_rot real*8, dimension(:, :), allocatable :: surot, suscra, sutry + ! output version information + call print_version + !reading and saving the quantities of the fort.10_in open (unit=10, file='fort.10_in', form='formatted', status='unknown') diff --git a/src/a_makefort10/makefort10.f90 b/src/a_makefort10/makefort10.f90 index 310207d..df8b878 100644 --- a/src/a_makefort10/makefort10.f90 +++ b/src/a_makefort10/makefort10.f90 @@ -110,6 +110,9 @@ program makefort10 logical :: readunpaired, forcesymm real*8 scale_jasfat + ! output version information + call print_version + namelist /system/ natoms, posunits, nxyz, celldm, at, phase, phasedo& &, pbcfort10, complexfort10, real_contracted& &, ntyp, rs_read, write_log, axyz, nel_read, L_read, yes_pfaff& diff --git a/src/a_prep/prep.f90 b/src/a_prep/prep.f90 index 4f30748..d9ce305 100644 --- a/src/a_prep/prep.f90 +++ b/src/a_prep/prep.f90 @@ -61,6 +61,10 @@ program main old_threads = 1 #endif + ! output version information + if (rank .eq. 0) call print_version + + ! print threads and mpi info. if (rank .eq. 0) write (6, *) ' Number of threads /mpi proc =', old_threads #if defined UNREL_SMP diff --git a/src/a_readforward/readforward.f90 b/src/a_readforward/readforward.f90 index 6db819e..80bd507 100644 --- a/src/a_readforward/readforward.f90 +++ b/src/a_readforward/readforward.f90 @@ -233,6 +233,9 @@ program readforward sizep = 1 #endif + ! output version information + if (rank .eq. 0) call print_version + zero = 0.d0 max_shells = 20000 ! max number of k-shells allowed diff --git a/src/m_common/_version.f90 b/src/m_common/_version.f90 index b409a24..05602df 100644 --- a/src/m_common/_version.f90 +++ b/src/m_common/_version.f90 @@ -1,6 +1,6 @@ subroutine print_version implicit none - character(LEN=6) :: version_number = '0.0.1' + character(LEN=6) :: version_number = '1.0.0' character(LEN=40) :: git_revision = 'unknown' write (6, *) "----------------------------------------------------------------------------" From 2969eeefbeabbf8d27fe4346d2dc1c1184fb02a3 Mon Sep 17 00:00:00 2001 From: kousuke-nakano <37653569+kousuke-nakano@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:49:27 +0900 Subject: [PATCH 2/3] fixed the linter errors --- src/a_convertfort10mol/convertfort10mol.f90 | 2 +- src/a_convertfortpfaff/convertpfaff.f90 | 2 +- src/a_makefort10/makefort10.f90 | 2 +- src/a_prep/prep.f90 | 2 +- src/a_readforward/readforward.f90 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/a_convertfort10mol/convertfort10mol.f90 b/src/a_convertfort10mol/convertfort10mol.f90 index df24740..e143c1f 100644 --- a/src/a_convertfort10mol/convertfort10mol.f90 +++ b/src/a_convertfort10mol/convertfort10mol.f90 @@ -64,7 +64,7 @@ program convertfort10mol #endif ! output version information if (rankn .eq. 0) call print_version - + nprocu = nprocn nproc_diag = nprocu call mpi_sub_comm_create(comm_mpi, nproc_diag, sub_comm_diag, ierr) diff --git a/src/a_convertfortpfaff/convertpfaff.f90 b/src/a_convertfortpfaff/convertpfaff.f90 index 32a4d2f..982e458 100644 --- a/src/a_convertfortpfaff/convertpfaff.f90 +++ b/src/a_convertfortpfaff/convertpfaff.f90 @@ -36,7 +36,7 @@ program convertpfaff ! output version information call print_version - + !reading and saving the quantities of the fort.10_in open (unit=10, file='fort.10_in', form='formatted', status='unknown') diff --git a/src/a_makefort10/makefort10.f90 b/src/a_makefort10/makefort10.f90 index df8b878..a12d32e 100644 --- a/src/a_makefort10/makefort10.f90 +++ b/src/a_makefort10/makefort10.f90 @@ -112,7 +112,7 @@ program makefort10 ! output version information call print_version - + namelist /system/ natoms, posunits, nxyz, celldm, at, phase, phasedo& &, pbcfort10, complexfort10, real_contracted& &, ntyp, rs_read, write_log, axyz, nel_read, L_read, yes_pfaff& diff --git a/src/a_prep/prep.f90 b/src/a_prep/prep.f90 index d9ce305..f0f42f1 100644 --- a/src/a_prep/prep.f90 +++ b/src/a_prep/prep.f90 @@ -63,7 +63,7 @@ program main ! output version information if (rank .eq. 0) call print_version - + ! print threads and mpi info. if (rank .eq. 0) write (6, *) ' Number of threads /mpi proc =', old_threads diff --git a/src/a_readforward/readforward.f90 b/src/a_readforward/readforward.f90 index 80bd507..b766220 100644 --- a/src/a_readforward/readforward.f90 +++ b/src/a_readforward/readforward.f90 @@ -235,7 +235,7 @@ program readforward ! output version information if (rank .eq. 0) call print_version - + zero = 0.d0 max_shells = 20000 ! max number of k-shells allowed From 11ae732fce7380facb69770d6cf9054eef55cd07 Mon Sep 17 00:00:00 2001 From: kousuke-nakano <37653569+kousuke-nakano@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:48:01 +0900 Subject: [PATCH 3/3] change the line of the function 'call print_version' because gfortran complains about it. --- src/a_makefort10/makefort10.f90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/a_makefort10/makefort10.f90 b/src/a_makefort10/makefort10.f90 index a12d32e..570052b 100644 --- a/src/a_makefort10/makefort10.f90 +++ b/src/a_makefort10/makefort10.f90 @@ -110,9 +110,6 @@ program makefort10 logical :: readunpaired, forcesymm real*8 scale_jasfat - ! output version information - call print_version - namelist /system/ natoms, posunits, nxyz, celldm, at, phase, phasedo& &, pbcfort10, complexfort10, real_contracted& &, ntyp, rs_read, write_log, axyz, nel_read, L_read, yes_pfaff& @@ -151,6 +148,9 @@ program makefort10 stop end if + ! output version information + call print_version + write (*, *) write (*, *) ' * * * Creates fort.10 for solids and open systems * * * ' write (*, *)