GCC Code Coverage Report


Directory: ./
File: tests/unit/05_api/fortran_api_drom_00.f90
Date: 2026-12-02 14:34:28
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 2 2 100.0%
Branches: 5 10 50.0%

Line Branch Exec Source
1 !-------------------------------------------------------------------------------!
2 ! Copyright 2009-2021 Barcelona Supercomputing Center !
3 ! !
4 ! This file is part of the DLB library. !
5 ! !
6 ! DLB is free software: you can redistribute it and/or modify !
7 ! it under the terms of the GNU Lesser General Public License as published by !
8 ! the Free Software Foundation, either version 3 of the License, or !
9 ! (at your option) any later version. !
10 ! !
11 ! DLB is distributed in the hope that it will be useful, !
12 ! but WITHOUT ANY WARRANTY; without even the implied warranty of !
13 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the !
14 ! GNU Lesser General Public License for more details. !
15 ! !
16 ! You should have received a copy of the GNU Lesser General Public License !
17 ! along with DLB. If not, see <https://www.gnu.org/licenses/>. !
18 !-------------------------------------------------------------------------------!
19
20 1 program test
21 use iso_c_binding
22 implicit none
23 include 'dlbf.h'
24 include 'dlbf_drom.h'
25 integer :: err, ncpus
26
27 1 err = DLB_DROM_Attach()
28
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (err /= DLB_SUCCESS) error stop "dlb_drom_attach failed"
29
30 1 ncpus = 0
31 1 err = DLB_DROM_GetNumCpus(ncpus)
32
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (err /= DLB_SUCCESS) error stop "dlb_drom_getnumcpus failed"
33
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (ncpus <= 0) error stop "dlb_drom_getnumcpus ncpus error"
34
35 1 err = DLB_DROM_SetProcessMaskStr(0, "0-3", 0)
36
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (err /= DLB_ERR_NOPROC) error stop "dlb_drom_setprocessmaskstr failed"
37
38 1 err = DLB_DROM_Detach()
39
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (err /= DLB_SUCCESS) error stop "dlb_drom_detach failed"
40
41 1 end program test
42