Producers of metals, grains and other raw materials rose after a surprisingly weak June jobs report weighed on the U.S. dollar.

The softness in jobs data spurred a retreat from rate-hike wagers. The U.S. dollar fell by more than 0.5% from 52-week highs.

"June jobs surprised to the downside at 57,000 but mostly due to a blip in leisure and hospitality," said economists at brokerage Bank of America Global Research.

Gold futures, which are particularly sensitive to movements in the dollar, recouped some of their recent losses, rising $44.40 or 1.1%, to $4112.70 a troy ounce.

Write to Rob Curran at rob.curran@dowjones.com