consistent capitalization
This commit is contained in:
parent
58bc6e2ba6
commit
4c3ff4bef4
|
@ -29,7 +29,7 @@ file (STRINGS ${PROJECT_SOURCE_DIR}/VERSION DAMASK_VERSION)
|
||||||
|
|
||||||
message ("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION}\n")
|
message ("\nBuilding ${CMAKE_PROJECT_NAME} ${DAMASK_VERSION}\n")
|
||||||
|
|
||||||
add_definitions (-DPETSc)
|
add_definitions (-DPETSC)
|
||||||
add_definitions (-DDAMASKVERSION="${DAMASK_VERSION}")
|
add_definitions (-DDAMASKVERSION="${DAMASK_VERSION}")
|
||||||
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "")
|
if (CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
module HDF5_utilities
|
module HDF5_utilities
|
||||||
use HDF5
|
use HDF5
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
use PETSC
|
use PETSc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
use prec
|
use prec
|
||||||
|
@ -71,7 +71,7 @@ module HDF5_utilities
|
||||||
module procedure HDF5_addAttribute_real_array
|
module procedure HDF5_addAttribute_real_array
|
||||||
end interface HDF5_addAttribute
|
end interface HDF5_addAttribute
|
||||||
|
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
logical, parameter, private :: parallel_default = .true.
|
logical, parameter, private :: parallel_default = .true.
|
||||||
#else
|
#else
|
||||||
logical, parameter, private :: parallel_default = .false.
|
logical, parameter, private :: parallel_default = .false.
|
||||||
|
@ -142,7 +142,7 @@ integer(HID_T) function HDF5_openFile(fileName,mode)
|
||||||
call h5pcreate_f(H5P_FILE_ACCESS_F, plist_id, hdferr)
|
call h5pcreate_f(H5P_FILE_ACCESS_F, plist_id, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
|
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
call h5pset_fapl_mpio_f(plist_id, PETSC_COMM_WORLD, MPI_INFO_NULL, hdferr)
|
call h5pset_fapl_mpio_f(plist_id, PETSC_COMM_WORLD, MPI_INFO_NULL, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#endif
|
#endif
|
||||||
|
@ -199,7 +199,7 @@ integer(HID_T) function HDF5_addGroup(fileHandle,groupName)
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! setting I/O mode to collective
|
! setting I/O mode to collective
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr)
|
call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#endif
|
#endif
|
||||||
|
@ -235,7 +235,7 @@ integer(HID_T) function HDF5_openGroup(fileHandle,groupName)
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------------------------
|
||||||
! setting I/O mode to collective
|
! setting I/O mode to collective
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
call h5pget_all_coll_metadata_ops_f(aplist_id, is_collective, hdferr)
|
call h5pget_all_coll_metadata_ops_f(aplist_id, is_collective, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#endif
|
#endif
|
||||||
|
@ -1704,7 +1704,7 @@ subroutine initialize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
readSize = 0
|
readSize = 0
|
||||||
readSize(worldrank+1) = int(localShape(ubound(localShape,1)))
|
readSize(worldrank+1) = int(localShape(ubound(localShape,1)))
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
if (parallel) then
|
if (parallel) then
|
||||||
call h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_COLLECTIVE_F, hdferr)
|
call h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_COLLECTIVE_F, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
|
@ -1725,7 +1725,7 @@ subroutine initialize_read(dset_id, filespace_id, memspace_id, plist_id, aplist_
|
||||||
! creating a property list for IO and set it to collective
|
! creating a property list for IO and set it to collective
|
||||||
call h5pcreate_f(H5P_DATASET_ACCESS_F, aplist_id, hdferr)
|
call h5pcreate_f(H5P_DATASET_ACCESS_F, aplist_id, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr)
|
call h5pset_all_coll_metadata_ops_f(aplist_id, .true., hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#endif
|
#endif
|
||||||
|
@ -1794,7 +1794,7 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
||||||
! creating a property list for transfer properties (is collective when reading in parallel)
|
! creating a property list for transfer properties (is collective when reading in parallel)
|
||||||
call h5pcreate_f(H5P_DATASET_XFER_F, plist_id, hdferr)
|
call h5pcreate_f(H5P_DATASET_XFER_F, plist_id, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
if (parallel) then
|
if (parallel) then
|
||||||
call h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_COLLECTIVE_F, hdferr)
|
call h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_COLLECTIVE_F, hdferr)
|
||||||
if(hdferr < 0) error stop 'HDF5 error'
|
if(hdferr < 0) error stop 'HDF5 error'
|
||||||
|
@ -1805,7 +1805,7 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
||||||
! determine the global data layout among all processes
|
! determine the global data layout among all processes
|
||||||
writeSize = 0
|
writeSize = 0
|
||||||
writeSize(worldrank+1) = int(myShape(ubound(myShape,1)))
|
writeSize(worldrank+1) = int(myShape(ubound(myShape,1)))
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
if (parallel) then
|
if (parallel) then
|
||||||
call MPI_allreduce(MPI_IN_PLACE,writeSize,worldsize,MPI_INT,MPI_SUM,PETSC_COMM_WORLD,ierr) ! get total output size over each process
|
call MPI_allreduce(MPI_IN_PLACE,writeSize,worldsize,MPI_INT,MPI_SUM,PETSC_COMM_WORLD,ierr) ! get total output size over each process
|
||||||
if (ierr /= 0) error stop 'MPI error'
|
if (ierr /= 0) error stop 'MPI error'
|
||||||
|
|
|
@ -6,7 +6,7 @@ module parallelization
|
||||||
use, intrinsic :: ISO_fortran_env, only: &
|
use, intrinsic :: ISO_fortran_env, only: &
|
||||||
OUTPUT_UNIT
|
OUTPUT_UNIT
|
||||||
|
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
#include <petsc/finclude/petscsys.h>
|
#include <petsc/finclude/petscsys.h>
|
||||||
use petscsys
|
use petscsys
|
||||||
!$ use OMP_LIB
|
!$ use OMP_LIB
|
||||||
|
@ -20,7 +20,7 @@ module parallelization
|
||||||
worldrank = 0, & !< MPI worldrank (/=0 for MPI simulations only)
|
worldrank = 0, & !< MPI worldrank (/=0 for MPI simulations only)
|
||||||
worldsize = 1 !< MPI worldsize (/=1 for MPI simulations only)
|
worldsize = 1 !< MPI worldsize (/=1 for MPI simulations only)
|
||||||
|
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
public :: &
|
public :: &
|
||||||
parallelization_init
|
parallelization_init
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ module results
|
||||||
use IO
|
use IO
|
||||||
use HDF5_utilities
|
use HDF5_utilities
|
||||||
use HDF5
|
use HDF5
|
||||||
#ifdef PETSc
|
#ifdef PETSC
|
||||||
use PETSC
|
use PETSc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
implicit none
|
implicit none
|
||||||
|
|
Loading…
Reference in New Issue