A containment wall has fallen onto a train track near the Spanish city of Barcelona, derailing a commuter train.