GCC Code Coverage Report


Directory: ./
File: src/sys/ftn-custom/zstartf.c
Date: 2026-05-04 03:58:11
Exec Total Coverage
Lines: 17 17 100.0%
Functions: 1 1 100.0%
Branches: 7 14 50.0%

Line Branch Exec Source
1 /*
2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 SLEPc - Scalable Library for Eigenvalue Problem Computations
4 Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
5
6 This file is part of SLEPc.
7 SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9 */
10 /*
11 This file contains the Fortran version of SlepcInitialize()
12 */
13
14 #include <slepc/private/slepcimpl.h>
15 #include <petsc/private/ftnimpl.h>
16
17 #if defined(PETSC_HAVE_FORTRAN_CAPS)
18 #define petscinitializef_ PETSCINITIALIZEF
19 #define petscfinalize_ PETSCFINALIZE
20 #define slepcinitializef_ SLEPCINITIALIZEF
21 #define slepcfinalize_ SLEPCFINALIZE
22 #define slepcinitializefortran_ SLEPCINITIALIZEFORTRAN
23 #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE)
24 #define petscinitializef_ petscinitializef
25 #define petscfinalize_ petscfinalize
26 #define slepcinitializef_ slepcinitializef
27 #define slepcfinalize_ slepcfinalize
28 #define slepcinitializefortran_ slepcinitializefortran
29 #endif
30
31 SLEPC_EXTERN void petscinitializef_(char *filename,char* help,PetscErrorCode *ierr,PETSC_FORTRAN_CHARLEN_T len,PETSC_FORTRAN_CHARLEN_T helplen);
32 SLEPC_EXTERN void petscfinalize_(PetscErrorCode *ierr);
33
34 /*
35 SlepcInitialize - Version called from Fortran.
36
37 Notes:
38 Since this routine is called from Fortran it does not return error codes.
39 */
40 298 SLEPC_EXTERN void slepcinitializef_(char *filename,char* help,PetscErrorCode *ierr,PETSC_FORTRAN_CHARLEN_T len,PETSC_FORTRAN_CHARLEN_T helplen)
41 {
42 298 PetscBool flg;
43
44
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (SlepcInitializeCalled) { *ierr = PETSC_SUCCESS; return; }
45
46 298 *ierr = PetscInitialized(&flg);
47
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (*ierr) { (void)(*PetscErrorPrintf)("SlepcInitialize:PetscInitialized failed");return; }
48
1/2
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
298 if (!flg) {
49 298 petscinitializef_(filename,help,ierr,len,helplen);
50
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (*ierr) { (void)(*PetscErrorPrintf)("SlepcInitialize:PetscInitialize failed");return; }
51 298 SlepcBeganPetsc = PETSC_TRUE;
52 }
53
54 298 *ierr = SlepcCitationsInitialize();
55
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (*ierr) { (void)(*PetscErrorPrintf)("SlepcInitialize:SlepcCitationsInitialize()\n");return; }
56
57 298 *ierr = SlepcInitialize_DynamicLibraries();
58
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (*ierr) { (void)(*PetscErrorPrintf)("SlepcInitialize:Initializing dynamic libraries\n");return; }
59
60 298 SlepcInitializeCalled = PETSC_TRUE;
61 298 SlepcFinalizeCalled = PETSC_FALSE;
62 298 *ierr = PetscInfo(0,"SLEPc successfully started from Fortran\n");
63
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 6 times.
298 if (*ierr) { (void)(*PetscErrorPrintf)("SlepcInitialize:Calling PetscInfo()");return; }
64 }
65