Skip to content

Commit

Permalink
more printing
Browse files Browse the repository at this point in the history
  • Loading branch information
mads256h committed Mar 5, 2024
1 parent cf2d916 commit 68ec73b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 33 deletions.
13 changes: 2 additions & 11 deletions include/atlas_cptesttime.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ static int DoGenString(int verb, char *genstr)
printf("genstr='%s'\n", genstr);
if (!genstr)
err=1;
else if (verb < 3) /* want to redirect output */
{
char *ln;
ln = NewMergedString(genstr, " > /dev/null 2>&1");
err = system(ln);
free(ln);
}
else
err = system(genstr);
if (err)
Expand Down Expand Up @@ -97,7 +90,7 @@ double TimeCPKernel
}
if (cp->genstr)
{
sprintf(ln, "%s > /dev/null 2>&1", cp->genstr);
sprintf(ln, "%s", cp->genstr);
if (system(ln))
{
fprintf(stderr, "UNABLE TO GENERATE WITH='%s'\n", ln);
Expand Down Expand Up @@ -128,8 +121,6 @@ double TimeCPKernel
i += sprintf(ln+i, " alpha=2 alphan=X");
if (nrep)
i += sprintf(ln+i, " FMFS=\"-r %lu\"", nrep);
if (verb < 3)
i += sprintf(ln+i, " > /dev/null 2>&1");
if (system(ln))
{
fprintf(stderr, "ERROR IN COMMAND: '%s'\n", ln);
Expand Down Expand Up @@ -279,7 +270,7 @@ int CPKernelFailsTestMM(char pre, int mb, int nb, int ialp, int ibet,
else
i += sprintf(ln+i, " CM2blk=%s", cp->rout);
}
i += sprintf(ln+i, " > /dev/null 2>&1");
i += sprintf(ln+i, "");
assert(i < sz);
i = system(ln);
if (i)
Expand Down
5 changes: 2 additions & 3 deletions include/atlas_genparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ int Sys2File(char *cmnd, char *file)
int lF, lC, i;
char *sp, *sys;
assert(cmnd);
if (!file)
file = "/dev/null";
if (!file) {}
else if (!strcmp(file, "stdout"))
file = NULL;
lC = strlen(cmnd);
Expand Down Expand Up @@ -480,7 +479,7 @@ static char *GetGoodGcc()
if (!INIT)
{
FILE *fpin;
assert(system("make res/goodgcc.txt > /dev/null 2>&1") == 0);
assert(system("make res/goodgcc.txt") == 0);
fpin = fopen("res/goodgcc.txt", "r");
assert(fpin);
assert(fscanf(fpin, "'%[^\']", gcc) == 1);
Expand Down
2 changes: 1 addition & 1 deletion include/atlas_mmgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ static void PrepMMForGen(char pre, char *outd, char *nm, ATL_mmnode_t *mb)
sp = GetMMFilename(cpr, nm, mp);
mp->rout = NewMergedString(od, sp); /* want to gen in outd/ */
sp1 = MMGetGenString(cpr, mp);
mp->genstr = NewMergedString(sp1, " > /dev/null 2>&1");
mp->genstr = NewMergedString(sp1, " ");
free(sp1);
free(mp->rout);
mp->rout = sp; /* want filename w/o path for GenMake */
Expand Down
17 changes: 2 additions & 15 deletions include/atlas_mmtesttime.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,6 @@ int MMDoGenString(int verb, char *genstr)
printf("genstr='%s'\n", genstr);
if (!genstr)
err=1;
else if (verb < 3) /* want to redirect output */
{
char *ln;
ln = NewMergedString(genstr, " > /dev/null 2>&1");
err = system(ln);
free(ln);
}
else
err = system(genstr);
if (err)
Expand Down Expand Up @@ -1061,10 +1054,7 @@ double TimeMMKernel3F
}
if (FORCETIME || !FileExists(fnam))
{
if (verb < 3)
i += sprintf(ln+i, " > /dev/null 2>&1\n");
else
i += sprintf(ln+i, "\n");
i += sprintf(ln+i, "\n");
if (verb > 1)
fprintf(stdout, "SYSTEM: %s", ln);
if (i=system(ln))
Expand Down Expand Up @@ -1432,10 +1422,7 @@ double TimeMMKernel
}
if (FORCETIME || !FileExists(fnam))
{
if (verb < 3)
i += sprintf(ln+i, " > /dev/null 2>&1\n");
else
i += sprintf(ln+i, "\n");
i += sprintf(ln+i, "\n");
if (verb > 1)
fprintf(stdout, "SYSTEM: %s", ln);
if (system(ln))
Expand Down
2 changes: 1 addition & 1 deletion tune/blas/gemm/uammgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ void GenAllKerns(char pre, char *outd, ATL_mmnode_t *rb,
cp->nu, outd, cp->rout);
}
assert(k < len);
k += sprintf(sgen+k, " > /dev/null 2>&1");
k += sprintf(sgen+k, " ");
assert(k <= len);
if ((k=system(sgen)))
{
Expand Down
1 change: 0 additions & 1 deletion tune/sysinfo/masrch.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ double matime
i += sprintf(ln+i, " -t 1");
ln[i++] = '"';
ln[i] = '\0';
sprintf(ln+i, "2>&1 > /dev/null");
if (system(ln))
{
fprintf(stderr, "\nFAILED: '%s'\n\n", ln);
Expand Down
2 changes: 1 addition & 1 deletion tune/sysinfo/probeFPU.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ double getMflop(char pre, int isa, int vlenb, int nacc, int nmul, double mf)
int i;
FILE *fpin;
i = sprintf(ln, "make fpucase isa=%s nacc=%d nmul=%d vlen=%d mf=%f "
"typ=\"%s\" > /dev/null 2>&1",
"typ=\"%s\"",
isas[isa], nacc, nmul, vlenb, mf > 0.0?mf:0.0,
pre=='s'?"-DSREAL=1":"");
assert(i < LNLEN);
Expand Down

0 comments on commit 68ec73b

Please sign in to comment.