Merge branch 'milestone_5' of github.com:medios-porosos-fiuba/simulacion-permeabilidad into milestone_5

milestone_5_without_improvements-logs
Oli 3 years ago
commit e5c70006f4

@ -54,6 +54,14 @@ void Py_kgeneration(long seed, struct grid_mod grid, struct statistic_mod stat,
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
for (int i = 0; i < cores; i++) {
get_stats(&final[i], i - 1);
}
for (int i = 0; i < cores; i++) {
log_info("CPU %d: %lf%%\n", i, calculate_load(&initial[i], &final[i]));
}
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
@ -63,13 +71,8 @@ void Py_kgeneration(long seed, struct grid_mod grid, struct statistic_mod stat,
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
for (int i = 0; i < cores; i++) {
get_stats(&final[i], i - 1);
}
for (int i = 0; i < cores; i++) {
log_info("CPU %d: %lf%%\n", i, calculate_load(&initial[i], &final[i]));
}
free(total_ram);
free(used_ram);
log_info("RESULT = success, ELAPSED = %f seconds", time_taken);
}

@ -34,5 +34,6 @@ void axes(double* ap, double* scf, int N)
}
}
}
return;
}

@ -47,5 +47,17 @@ void build_real(int n[3], int NTOT, double* covar, double* realization, double*
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, realization = %f, ireal = %f, ELAPSED = %f seconds", *realization, *ireal, time_taken);
}

@ -23,6 +23,18 @@ double cardsin(double h) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, z = %f, ELAPSED = %f seconds", z, time_taken);
return z;

@ -47,5 +47,17 @@ void cgrid(struct vario_mod variogram, struct grid_mod grid, int n[3]) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, n[0] = %d, n[1] = %d, n[2] = %d, ELAPSED = %f seconds", n[0], n[1], n[2], time_taken);
}

@ -45,5 +45,17 @@ void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid,
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, ELAPSED = %f seconds", time_taken);
}

@ -57,6 +57,18 @@ double cov_value(struct vario_mod variogram, double di, double dj, double dk) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, hx = %f, hy = %f, hz = %f, h = %f, cov = %f, ELAPSED = %f seconds", hx, hy, hz, h, cov, time_taken);
return cov;

@ -83,5 +83,17 @@ void covariance(double* covar, struct vario_mod variogram, struct grid_mod mesh,
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, di = %f, dj = %f, dk = %f, ELAPSED = %f seconds", di, dj, dk, time_taken);
}

@ -21,6 +21,18 @@ double cubic(double h) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, z = %f, ELAPSED = %f seconds", z, time_taken);
return z;

@ -103,5 +103,17 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, NTOT = %d, NMAX = %d, NDIM = %d, ntot = %d, nmax = %d, NXYZ = %d, nxyz = %d, ELAPSED = %f seconds", NTOT, NMAX, NDIM, ntot, nmax, NXYZ, nxyz, time_taken);
}

@ -589,6 +589,18 @@ void fourt(double* datar, double* datai, int nn[3], int ndim, int ifrwd, int icp
L920:
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, ELAPSED = %f", time_taken);
return;

@ -19,6 +19,18 @@ double gammf(double h, double alpha) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, delta = %f, z = %f, ELAPSED = %f seconds", delta, z, time_taken);
return z;
}

@ -32,6 +32,18 @@ double gasdev(long* idum, long* idum2, long* iy, long iv[NTAB]) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, gset = %f, fac = %f, v1 = %f, ELAPSED = %f seconds", gset, fac, v1, time_taken);
return (v2 * fac);
} else {
@ -40,6 +52,18 @@ double gasdev(long* idum, long* idum2, long* iy, long iv[NTAB]) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, gset = %f, ELAPSED = %f seconds", gset, time_taken);
return gset;
}

@ -51,6 +51,16 @@ void generate(long* seed, int n, struct realization_mod* realization, int cores)
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
for (int i = 0; i < cores; i++) {
get_stats(&final[i], i - 1);
}
for (int i = 0; i < cores; i++) {
log_info("CPU %d: %lf%%\n", i, calculate_load(&initial[i], &final[i]));
}
free(iv);
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
@ -60,17 +70,8 @@ void generate(long* seed, int n, struct realization_mod* realization, int cores)
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
for (int i = 0; i < cores; i++) {
get_stats(&final[i], i - 1);
}
for (int i = 0; i < cores; i++) {
log_info("CPU %d: %lf%%\n", i, calculate_load(&initial[i], &final[i]));
}
free(total_ram);
free(used_ram);
free(iv);
log_info("RESULT = success, ELAPSED = %f seconds", time_taken);
}

@ -44,6 +44,18 @@ int length(int N, int i, double* scf, double* ap, double D, int Nvari) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, n = %d, ELAPSED = %f seconds", n, time_taken);
return n;
}

@ -39,6 +39,18 @@ int maxfactor(int n) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, maxfac = %d, ELAPSED = %f seconds", maxfac, time_taken);
return maxfac;
}

@ -75,5 +75,17 @@ void nor2log(struct realization_mod* realin, int typelog, struct realization_mod
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, ELAPSED = %f seconds", time_taken);
}

@ -54,5 +54,17 @@ void prebuild_gwn(struct grid_mod grid, int n[3], struct realization_mod* realin
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
log_info("RESULT = success, ELAPSED = %f seconds", time_taken);
}

@ -60,6 +60,18 @@ double ran2(long* idum, long* idum2, long* iy, long iv[NTAB]) {
t = clock() - t;
double time_taken = ((double)t)/CLOCKS_PER_SEC; // calculate the elapsed time
double* total_ram = malloc(sizeof(double));
getTotalVirtualMem(total_ram);
double* used_ram = malloc(sizeof(double));
getVirtualMemUsed(used_ram);
log_info("TOTAL VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM = %5.1f MB, USED VIRTUAL MEM BY CURRENT PROCESS = %d MB",
*total_ram, *used_ram, getVirtualMemUsedByCurrentProcess());
free(total_ram);
free(used_ram);
if ((temp = AM * (*iy)) > RNMX) {
log_info("RESULT = success, ELAPSED = %f", time_taken);
return (RNMX);

@ -13,6 +13,7 @@ double spherical(double h) {
} else {
z = 1. - 1.5 * (double)h + 0.5 * (double)(h * h * h);
}
log_info("RESULT = success, z = %f", z);
return z;

Loading…
Cancel
Save