  It is studied how the $\alpha$ cluster degrees of freedom, such as $\alpha$
clustering configurations close to the $\alpha$ decay threshold in $^{12}$C and
$^{16}$O, including the linear chain, triangle, square, kite, and tetrahedron,
affect nuclear collective vibrations with a microscopic dynamical approach,
which can describe properties of nuclear ground states well across the nuclide
chart and reproduce the standard giant dipole resonance (GDR) of $^{16}$O quite
nicely. It is found that the GDR spectrum is highly fragmented into several
apparent peaks due to the $\alpha$ structure. The different $\alpha$ cluster
configurations in $^{12}$C and $^{16}$O have corresponding characteristic
spectra of GDR. The number and centroid energies of peaks in the GDR spectra
can be reasonably explained by the geometrical and dynamical symmetries of
$\alpha$ clustering configurations. Therefore, the GDR can be regarded as a
very effective probe to diagnose the different $\alpha$ cluster configurations
in light nuclei.
