  A spin-glass transition has been investigated for a long time but we have not
yet reached a conclusion due to difficulties in the simulations. They are slow
dynamics, strong finite-size effects, and sample-to-sample dependences. We
clarified that these difficulties are mainly caused by a competition between
the spin-glass order and the boundary conditions. We also found that the
spin-glass order grows fast and reaches the lattice boundary within a very
short Monte Carlo step. A key to solve the difficulties is to eliminate the
boundary effect first. It was made possible by a dynamic scaling analysis on
nonequilibrium relaxation functions in a large-size and short-time regime. The
observed quantity was also found to be self-averaging in a limit of large
replica number. The spin-glass transition and the chiral-glass transition was
clarified to occur at the same temperature in the Heisenberg spin-glass model
in three dimensions. The estimated critical exponent $\nu$ agrees with the
experimental result.
