Sorry, you're missing one key piece of information. The files that end in ".aff12.1D" should have 12 values per row. If you redirect from another file or otherwise create a text file with 3 rows of 4 values, you should not use the .aff12.1D extension. Just use the .1D extension instead. Here are some example of how to use cat_matvec with these matrices. I start by creating a 4x3 matrix manually on the command line and then swap between the two formats.
cat > test.1D
1 0 0 10
0 1 0 -10
0 0 1 20
^C
% cat_matvec test.1D
1 0 0 10
0 1 0 -10
0 0 1 20
% cat_matvec -ONELINE test.1D
1 0 0 10 0 1 0 -10 0 0 1 20
% cat_matvec -ONELINE test.1D > test.aff12.1D
% cat_matvec -ONELINE test.aff12.1D
1 0 0 10 0 1 0 -10 0 0 1 20
% cat_matvec test.aff12.1D
1 0 0 10
0 1 0 -10
0 0 1 20
% cp test.1D test2.aff12.1D
% cat_matvec test2.aff12.1D
** FATAL ERROR: File 'test2.aff12.1D' has 4 values per row, which isn't 12
** Program compile date = Nov 9 2017