  We describe an approach for the efficient calculation of a large number of
four-point correlation functions for various baryon-baryon (BB) channels, which
are the primary quantities for studying the nuclear and hyperonic nuclear
forces from lattice quantum chromodynamics. Using the four-point correlation
function of a proton-$\Lambda$ system as a specific example, we discuss how an
effective block algorithm significantly reduces the number of iterations. The
effective block algorithm is applied to calculate 52 channels of the four-point
correlation functions from nucleon$-$nucleon to $\Xi-\Xi$, in order to study
the complete set of isospin symmetric BB interactions. The elapsed times
measured for hybrid parallel computation on BlueGene/Q demonstrate that the
performance of the present algorithm is reasonable for various combinations of
the number of OpenMP threads and the number of MPI nodes. The numerical results
are compared with the results obtained using the unified contraction algorithm
for all computed sites of the 52 four-point correlators.
