core module does not compile because it does not include PETSc

This commit is contained in:
Martin Diehl 2014-10-11 16:54:59 +00:00
parent bc9cf40371
commit 8f1a2cd2ae
1 changed files with 7 additions and 2 deletions

View File

@ -16,8 +16,9 @@ module DAMASK_interface
implicit none implicit none
private private
#ifdef PETSc
#include <finclude/petscsys.h> #include <finclude/petscsys.h>
#endif
logical, public, protected :: appendToOutFile = .false. !< Append to existing spectralOut file (in case of restart, not in case of regridding) logical, public, protected :: appendToOutFile = .false. !< Append to existing spectralOut file (in case of restart, not in case of regridding)
integer(pInt), public, protected :: spectralRestartInc = 1_pInt !< Increment at which calculation starts integer(pInt), public, protected :: spectralRestartInc = 1_pInt !< Increment at which calculation starts
character(len=1024), public, protected :: & character(len=1024), public, protected :: &
@ -71,7 +72,9 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
positions positions
integer, dimension(8) :: & integer, dimension(8) :: &
dateAndTime ! type default integer dateAndTime ! type default integer
#ifdef PETSc
PetscErrorCode :: ierr PetscErrorCode :: ierr
#endif
external :: & external :: &
quit,& quit,&
MPI_Comm_rank,& MPI_Comm_rank,&
@ -80,11 +83,13 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn)
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
! PETSc Init ! PETSc Init
call PetscInitialize(PETSC_NULL_CHARACTER,ierr) ! according to PETSc manual, that should be the first line in the code #ifdef PETSc
call PetscInitialize(PETSC_NULL_CHARACTER,ierr) ! according to PETSc manual, that should be the first line in the code
CHKERRQ(ierr) ! this is a macro definition, it is case sensitive CHKERRQ(ierr) ! this is a macro definition, it is case sensitive
open(6, encoding='UTF-8') ! modern fortran compilers (gfortran >4.4, ifort >11 support it) open(6, encoding='UTF-8') ! modern fortran compilers (gfortran >4.4, ifort >11 support it)
call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr) call MPI_Comm_rank(PETSC_COMM_WORLD,worldrank,ierr);CHKERRQ(ierr)
#endif
mainProcess: if (worldrank == 0) then mainProcess: if (worldrank == 0) then
write(6,'(/,a)') ' <<<+- DAMASK_spectral_interface init -+>>>' write(6,'(/,a)') ' <<<+- DAMASK_spectral_interface init -+>>>'
write(6,'(a)') ' $Id$' write(6,'(a)') ' $Id$'