• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #856

28 Dec 2022 02:00AM UTC coverage: 86.602% (+0.05%) from 86.55%
#856

push

StellarBot
Merge #6119

6119: Update CMakeLists.txt r=hkaiser a=khuck

updating the default APEX version


Co-authored-by: Kevin Huck <khuck@cs.uoregon.edu>

174566 of 201573 relevant lines covered (86.6%)

1876093.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.91
/libs/core/batch_environments/src/alps_environment.cpp
1
//  Copyright (c) 2007-2022 Hartmut Kaiser
2
//  Copyright (c) 2013-2015 Thomas Heller
3
//
4
//  SPDX-License-Identifier: BSL-1.0
5
//  Distributed under the Boost Software License, Version 1.0. (See accompanying
6
//  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7

8
#include <hpx/batch_environments/alps_environment.hpp>
9
#include <hpx/util/from_string.hpp>
10

11
#include <cstddef>
12
#include <string>
13
#include <vector>
14

15
namespace hpx::util::batch_environments {
16

17
    alps_environment::alps_environment(
1,195✔
18
        std::vector<std::string>& /* nodelist */, bool /* debug */)
19
      : node_num_(0)
1,195✔
20
      , num_threads_(0)
1,195✔
21
      , num_localities_(0)
1,195✔
22
      , valid_(false)
1,195✔
23
    {
24
        char* node_num = std::getenv("ALPS_APP_PE");
1,195✔
25
        valid_ = node_num != nullptr;
1,195✔
26
        if (valid_)
1,195✔
27
        {
28
            // Initialize our node number
29
            node_num_ = from_string<std::size_t>(node_num);
×
30

31
            // Get the number of threads
32
            char* num_threads = std::getenv("ALPS_APP_DEPTH");
×
33
            if (!num_threads)
×
34
            {
35
                valid_ = false;
×
36
                return;
×
37
            }
38
            num_threads_ = from_string<std::size_t>(num_threads);
×
39

40
            // Get the number of localities
41
            char* total_num_threads = std::getenv("PBS_NP");
×
42
            if (!total_num_threads)
×
43
            {
44
                valid_ = false;
×
45
                return;
×
46
            }
47
            num_localities_ =
×
48
                from_string<std::size_t>(total_num_threads) / num_threads_;
×
49
        }
×
50
    }
1,195✔
51
}    // namespace hpx::util::batch_environments
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc