Skip to content

Commit

Permalink
Merge pull request #5512 from The-OpenROAD-Project-staging/gpl-thread…
Browse files Browse the repository at this point in the history
…-non-determinism

gpl: fix multithreading non-determinism
  • Loading branch information
eder-matheus authored Aug 6, 2024
2 parents 3f36a37 + d360534 commit 16ee4c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/gpl/src/nesterovBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1961,8 +1961,10 @@ void NesterovBase::updateGradients(std::vector<FloatPoint>& sumGrads,
debugPrint(
log_, GPL, "updateGrad", 1, "DensityPenalty: {:g}", densityPenalty_);

#pragma omp parallel for num_threads(nbc_->getNumThreads()) \
reduction(+ : wireLengthGradSum_, densityGradSum_, gradSum)
// TODO: This OpenMP parallel section is causing non-determinism. Consider
// revisiting this in the future to restore determinism.
//#pragma omp parallel for num_threads(nbc_->getNumThreads()) reduction(+ :
// wireLengthGradSum_, densityGradSum_, gradSum)
for (size_t i = 0; i < gCells_.size(); i++) {
GCell* gCell = gCells_.at(i);
wireLengthGrads[i]
Expand Down
6 changes: 2 additions & 4 deletions test/flow.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ read_verilog $synth_verilog
link_design $top_module
read_sdc $sdc_file

set_thread_count [exec getconf _NPROCESSORS_ONLN]

utl::metric "IFP::ord_version" [ord::openroad_git_describe]
# Note that sta::network_instance_count is not valid after tapcells are added.
utl::metric "IFP::instance_count" [sta::network_instance_count]
Expand Down Expand Up @@ -191,10 +193,6 @@ write_verilog $verilog_file
################################################################
# Global routing

# set multithreading for repair_antennas, check_antennas and
# detailed_route
set_thread_count [exec getconf _NPROCESSORS_ONLN]

pin_access -bottom_routing_layer $min_routing_layer \
-top_routing_layer $max_routing_layer

Expand Down

0 comments on commit 16ee4c3

Please sign in to comment.