Abstract. The photos of the pre-flare state development obtained in the spectral lines of the highly ionized iron (SDO AIA apparatus) indicate accumulation of the energy for a flare in the corona in the pre-flare local (about 10 10 cm) high temperature structures. The flare and pre-flare structures are investigated in the spectral lines of ions FeXXIV, FeXXIII, FeXVIII. A pre-flare structure appears several hours before the big solar flares. These pre-flare structures can be used for prediction of solar cosmic rays. The phenomena are well described by the electrodynamic model of a solar flare, developed on the basis of observational data and numerical magnetohydrodynamic simulation using the initial and boundary conditions, taken from active regions observation before the flare. The numerical simulations demonstrate the magnetic energy accumulation for a flare due to the current sheet creation. The spectral lines emissions demonstrate local heating of the corona during a flare up to the temperature 6.3 MK, 16 MK, and 20 MK. The solar cosmic rays are accelerated in a flare. Now all proposed mechanism of cosmic ray generation are based on unproven assumptions. These assumptions are not confirmed by long-term observations. With the modern concept of cosmic rays, the fundamentally important question arises: can the mechanism of proton acceleration in solar flares explain the particles acceleration of galactic cosmic rays.