Magnetohydrodynamic (MHD) simulations are often applied to study the global dynamics and configuration of the planetary magnetosphere. The computational performance of an MHD code is evaluated on a massive parallel scalar type supercomputer system with one PFlops ideal performance. We have made the performance tuning of our three-dimensional MHD code for the planetary magnetosphere on the FX10 which has 76,800 cores, distributed on 4,800 SPARC64 IXfx nodes. For the parallelization of the MHD code, we use four different methods, i.e. one-dimensional, two-dimensional, three-dimensional regular domain decomposition methods and a cache-hit type of three-dimensional domain decomposition method. We found that the cache-hit type of three-dimensional decomposition of the MHD model is suitable for the FX10 system. We also found the pack/unpack operation for the inter-node communications decreases the execution efficiency by 2 %. After asynchronous communication is introduced and the pack/unpack operation is overlapped, we achieved a computing performance of 230 TFlops and an efficiency of almost 20 % for the MHD code.