Complex topography, the free-surface boundary condition, and anelastic properties of media should be accounted for in the frame of onshore geophysical prospecting imaging, such as full-waveform inversion (FWI). In this context, an accurate and efficient forward-modeling engine is mandatory. We have performed 3D frequency-domain anisotropic elastic wave modeling by using the highly accurate spectral element method and a sparse multifrontal direct solver. An efficient approach similar to computing the matrix-vector product in the time domain is used to build the matrix. We validate the numerical results by comparing with analytical solutions. A parallel direct solver, the sparse direct multifrontal massively parallel solver (MUMPS), is used to solve the linear system. We find that a hybrid implementation of message passing interface and open multiprocessing is more efficient in flops and memory cost. The influence of the deformed mesh, free-surface boundary condition, and heterogeneity of media on MUMPS performance is negligible. Complexity analysis suggests that the memory complexity of MUMPS agrees with the theoretical order (or with an efficient matrix reordering method) for an grid when nontrivial topography is considered. With the available resources, we conduct a moderate scale modeling with a subset of the SEAM Phase II Foothills model, where 60 wavelengths in the -axis are propagated. Computing one gradient of FWI based on this model using the frequency-domain modeling is shown to require similar or fewer computational resources than what would be required for a time-domain solver, depending on the number of sources, while larger memory is necessary. An estimation of the increasing trend indicates that approximately 20 Tb of memory would be required for a wavelength modeling. The limit of MUMPS scalability hinders the application to larger scale applications.