Skip to content

Commit

Permalink
Use plain legate::start() (args are deprecated)
Browse files Browse the repository at this point in the history
Legate has auto-configure now and LEGATE_CONFIG or the legate
launcher can still be used.
(There may be a way to re-instate it, but it doesn't seem worthwhile
to me right now)

Signed-off-by: Sebastian Berg <[email protected]>
  • Loading branch information
seberg committed Dec 12, 2024
1 parent 96bb744 commit c29de6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ if __name__ == "__main__":

int main(int argc, char** argv)
{
// First we initialize Legate and cuPyNumeric
int32_t errcode = legate::start(argc, argv);
// First we initialize Legate use either `legate` or `LEGATE_CONFIG` to customize launch
int32_t errcode = legate::start();
if (errcode != 0) {
throw std::runtime_error("legate::start() errorcode: " + std::to_string(errcode));
}
Expand Down
6 changes: 3 additions & 3 deletions cpp/examples/hello.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include <legate_dataframe/parquet.hpp>
#include <legate_dataframe/unaryop.hpp>

int main(int argc, char** argv)
int main(void)
{
// First we initialize Legate
int32_t errcode = legate::start(argc, argv);
// First we initialize Legate use either `legate` or `LEGATE_CONFIG` to customize launch
int32_t errcode = legate::start();
if (errcode != 0) {
throw std::runtime_error("legate::start() errorcode: " + std::to_string(errcode));
}
Expand Down
13 changes: 1 addition & 12 deletions cpp/tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,8 @@

class Environment : public ::testing::Environment {
public:
Environment(int argc, char** argv) : argc_(argc), argv_(argv) {}

void SetUp() override
{
const char* argv[] = {"./test", "--gpus", "2"}; // TODO: make configurable
int argc = 3;
EXPECT_EQ(legate::start(argc, (char**)argv), 0);
}
void SetUp() override { EXPECT_EQ(legate::start(), 0); }
void TearDown() override { EXPECT_EQ(legate::finish(), 0); }

private:
int argc_;
char** argv_;
};

int main(int argc, char** argv)
Expand Down

0 comments on commit c29de6e

Please sign in to comment.