We consider the problem of synchronizing the activity of all the membranes of a P system. After pointing at the connection with a similar problem dealt with in the field of cellular automata where the problem is called the firing squad synchronization problem, FSSP for short, we provide two algorithms to solve this problem. One algorithm is non-deterministic, the other is deterministic. Both work in a time which is 3h, where h is the height of the tree defining the membrane structure of the considered P system. In the conclusion, we suggest various directions to continue this work.