-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix compile errors #3318
base: main
Are you sure you want to change the base?
Fix compile errors #3318
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -854,7 +854,7 @@ namespace { | |
g.get_vertex_fields(), | ||
g.get_edge_fields(), | ||
m_srcid_column, m_dstid_column); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need const in all these. Sorry, thought that was implied. |
||
throw(lambda::reinterpret_comm_failure(e)); | ||
} | ||
|
||
|
@@ -943,7 +943,7 @@ namespace { | |
try { | ||
mutated_edge_data = m_evaluator->proxy->eval_triple_apply(all_edge_data, m_src_partition, | ||
m_dst_partition, mutated_edge_field_ids); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw(lambda::reinterpret_comm_failure(e)); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ static lambda_master* instance_ptr = nullptr; | |
auto release_lambda_fn = [lambda_hash](std::unique_ptr<lambda_evaluator_proxy>& proxy) { | ||
try { | ||
proxy->release_lambda(lambda_hash); | ||
} catch (std::exception e){ | ||
} catch (const std::exception& e){ | ||
logstream(LOG_ERROR) << "Error on releasing lambda: " << e.what() << std::endl; | ||
} catch (std::string e) { | ||
logstream(LOG_ERROR) << "Error on releasing lambda: " << e << std::endl; | ||
|
@@ -134,7 +134,7 @@ static lambda_master* instance_ptr = nullptr; | |
// catch and reinterpret comm failure | ||
try { | ||
out = worker->proxy->bulk_eval(lambda_hash, args, skip_undefined, seed); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw reinterpret_comm_failure(e); | ||
} | ||
} | ||
|
@@ -236,7 +236,7 @@ static lambda_master* instance_ptr = nullptr; | |
logstream(LOG_WARNING) << "Unexpected SHMIPC failure. Falling back to CPPIPC" << std::endl; | ||
} | ||
out = worker->proxy->bulk_eval_rows(lambda_hash, args, skip_undefined, seed); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw reinterpret_comm_failure(e); | ||
} | ||
} | ||
|
@@ -252,7 +252,7 @@ static lambda_master* instance_ptr = nullptr; | |
// catch and reinterpret comm failure | ||
try { | ||
out = worker->proxy->bulk_eval_dict(lambda_hash, keys, values, skip_undefined, seed); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw reinterpret_comm_failure(e); | ||
} | ||
} | ||
|
@@ -289,7 +289,7 @@ static lambda_master* instance_ptr = nullptr; | |
logstream(LOG_WARNING) << "Unexpected SHMIPC failure. Falling back to CPPIPC" << std::endl; | ||
} | ||
out = worker->proxy->bulk_eval_dict_rows(lambda_hash, keys, rows, skip_undefined, seed); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw reinterpret_comm_failure(e); | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -385,7 +385,7 @@ class worker_pool { | |
parallel_for(0, m_num_workers, [&](size_t i) { | ||
try { | ||
ret[i] = f(temp_workers[i]->proxy); | ||
} catch (cppipc::ipcexception e) { | ||
} catch (cppipc::ipcexception& e) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const |
||
throw reinterpret_comm_failure(e); | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be necessary. A cast to void* is automatic for any trivial types (i.e. no inheritance, no pointers, etc., and this memcpy is valid only for those types. The so the lack of an explicit cast here is a guard against that (though it could be made more explicit with a
static_assert(std::is_trivial::value, "Only trivial types allowed for hash.");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the error message I get without the
reinterpret_cast
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following program prints out
non-trivial
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly, as it should. Only trivial types can be used in that serialization function. Boost multiprecision is the fallback type when no native 128 bit integer types are detected at build time (maybe it should error instead?). These are detected by the Find128BitInteger.cmake routines under cmake/. It appears these routines are failing. That is the root cause of this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the output of cmake config log after a clean cmake run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the relevant section of the logs:
Output for debug and release is the same.
So for both signed and unsigned, it seems to be finding the first things it's looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to drop the ball on this -- let's dig into it tomorrow. There's some typo somewhere.