14 #include "../PBpblas.h"
15 #include "../PBtools.h"
16 #include "../PBblacs.h"
17 #include "../PBblas.h"
54 int gcd=1, m_val, n_val, t;
59 if( M > N ) { m_val = N; n_val = M; }
60 else { m_val = M; n_val = N; }
64 while( !( m_val & 1 ) )
86 n_val -= ( n_val & 1 ) ? m_val : 0;
88 while( n_val >= m_val )
94 n_val -= ( n_val & 1 ) ? m_val : 0;
104 return ( ( M * N ) / ( n_val * gcd ) );