A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetics.
[simgrid.git]
/
testsuite
/
surf
/
maxmin_usage.c
diff --git
a/testsuite/surf/maxmin_usage.c
b/testsuite/surf/maxmin_usage.c
index
1937a6b
..
96f2703
100644
(file)
--- a/
testsuite/surf/maxmin_usage.c
+++ b/
testsuite/surf/maxmin_usage.c
@@
-1,15
+1,20
@@
+/* $Id$ */
+
/* A few tests for the maxmin library */
/* A few tests for the maxmin library */
-/*
Authors: Arnaud Legrand
*/
+/*
Copyright (c) 2004 Arnaud Legrand. All rights reserved.
*/
/* This program is free software; you can redistribute it and/or modify it
/* This program is free software; you can redistribute it and/or modify it
-
under the terms of the license (GNU LGPL) which comes with this package. */
+
*
under the terms of the license (GNU LGPL) which comes with this package. */
#include <stdlib.h>
#include <stdio.h>
#include "surf/maxmin.h"
#include <stdlib.h>
#include <stdio.h>
#include "surf/maxmin.h"
-#define PRINT_VAR(var) printf(#var " = %Lg\n",lmm_variable_getvalue(var));
+#include "xbt/log.h"
+XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test,"Messages specific for surf example");
+
+#define PRINT_VAR(var) DEBUG1(#var " = %g\n",lmm_variable_getvalue(var));
/* */
/* ______ */
/* */
/* ______ */
@@
-55,17
+60,17
@@
void test(void)
PRINT_VAR(R_2);
PRINT_VAR(R_3);
PRINT_VAR(R_2);
PRINT_VAR(R_3);
-
printf
("\n");
+
DEBUG0
("\n");
lmm_solve(Sys);
PRINT_VAR(R_1_2_3);
PRINT_VAR(R_1);
PRINT_VAR(R_2);
PRINT_VAR(R_3);
lmm_solve(Sys);
PRINT_VAR(R_1_2_3);
PRINT_VAR(R_1);
PRINT_VAR(R_2);
PRINT_VAR(R_3);
-
printf
("\n");
+
DEBUG0
("\n");
- lmm_update_variable_weight(R_1_2_3,.5);
+ lmm_update_variable_weight(
Sys,
R_1_2_3,.5);
lmm_solve(Sys);
PRINT_VAR(R_1_2_3);
lmm_solve(Sys);
PRINT_VAR(R_1_2_3);
@@
-99,21
+104,23
@@
void test2(void)
PRINT_VAR(T1);
PRINT_VAR(T2);
PRINT_VAR(T1);
PRINT_VAR(T2);
-
printf
("\n");
+
DEBUG0
("\n");
lmm_solve(Sys);
PRINT_VAR(T1);
PRINT_VAR(T2);
lmm_solve(Sys);
PRINT_VAR(T1);
PRINT_VAR(T2);
-
printf
("\n");
+
DEBUG0
("\n");
lmm_system_free(Sys);
}
lmm_system_free(Sys);
}
-
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
+ DEBUG0("***** Test 1 ***** \n");
test();
test();
+ DEBUG0("***** Test 2 ***** \n");
test2();
test2();
+
return 0;
}
return 0;
}