From 8f1a2cd2aebe9e8a8fd5e7804357beabb0a8a4d5 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 11 Oct 2014 16:54:59 +0000 Subject: [PATCH] core module does not compile because it does not include PETSc --- code/DAMASK_spectral_interface.f90 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/DAMASK_spectral_interface.f90 b/code/DAMASK_spectral_interface.f90 index b52bd1836..9575f5d33 100644 --- a/code/DAMASK_spectral_interface.f90 +++ b/code/DAMASK_spectral_interface.f90 @@ -16,8 +16,9 @@ module DAMASK_interface implicit none private +#ifdef PETSc #include - +#endif 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 character(len=1024), public, protected :: & @@ -71,7 +72,9 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn) positions integer, dimension(8) :: & dateAndTime ! type default integer +#ifdef PETSc PetscErrorCode :: ierr +#endif external :: & quit,& MPI_Comm_rank,& @@ -80,11 +83,13 @@ subroutine DAMASK_interface_init(loadCaseParameterIn,geometryParameterIn) !-------------------------------------------------------------------------------------------------- ! 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 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) +#endif mainProcess: if (worldrank == 0) then write(6,'(/,a)') ' <<<+- DAMASK_spectral_interface init -+>>>' write(6,'(a)') ' $Id$'