The Magique-3D project is based (in part) on existing software packages, which are already validated, portable and robust. The SPECFEM3D software package, developed at the California Institute of Technology (USA) by Dimitri Komatitsch and Jeroen Tromp, and which is still actively maintained by Dimitri Komatitsch and his colleagues from University of Pau, allows the precise modeling of seismic wave propagation in complex three-dimensional geological models. Phenomena such as anisotropy, attenuation (i.e., anelasticity), fluid-solid interfaces, rotation, self-gravitation, as well as crustal and mantle models can be taken into account. The software is written in Fortran95 with MPI message-passing on parallel machines. It won the Gordon Bell Prize for best performance of the Supercomputing'2003 conference. In 2006, Dimitri Komatitsch has established a new collaboration with the Barcelona Supercomputing Center (Spain) to work on further optimizing the source code to prepare it for very large runs on future petaflops machines to solve either direct or inverse problems in seismology. Optimizations will focus on improving load balancing, reducing the number of cache misses and switching from blocking to non-blocking MPI communications to improve performance on very large systems. Because of its flexibility and portability, the code has been installed and run successfully on a large number of platforms (for example IBM Power, Linux PC, SGI, HP Compaq DEC, NEC, Earth Simulator, Sun, CRAY), and is used on a daily basis by more than 100 academic institutions throughout the world.