Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
On some systems, sqrt(int) is not defined properly. On others its just implemented...
[simgrid.git] / src / smpi / colls / allgather / allgather-2dmesh.cpp
index 0cfecd0..cb7ed51 100644 (file)
@@ -69,7 +69,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 static int is_2dmesh(int num, int *i, int *j)
 {
   int x, max = num / 2;
-  x = sqrt(num);
+  x = sqrt(double(num));
 
   while (x <= max) {
     if ((num % x) == 0) {