Stock markets in Canada and the United States fell sharply on the news that China had allowed the yuan to drop 2%.