I made this change because the Einstein Toolkit wouldn't compiler on AIX. Now it does.
The expansion of $(cat ...) is a very long string, but it is never turned into a command line argument. The shell (bash) takes the output of cat, parses it, and then runs the for loop. Bash has no problems with long strings. However, calling another program requires calling the "exec" routine of the operating system, and this is what imposes the limit. I assume that the argument that xargs created were too long. I don't know what the respective limit is on AIX, but it may be something small such as 127 characters. Or maybe we picked up an AIX implementation of xargs instead of the GNU version -- in this case the patch could be reverted if we can switch to GNU xargs. -erik On Sun, Dec 28, 2014 at 11:56 AM, Roland Haas <[email protected]> wrote: > Hello Frank, Ian, Erik, all, > >> Here, the shell expanded to a potentially quite long command. I imagine >> the new code circumvents this problem by only partially evaluating the >> arguments, "finding" the files bit by bit. > I am confused the same way that Ian was. Looking at the old code I am > unable to find any shell expansion that would lead to a long command > line (unless the objectlist file contains wildcards). > > > > The new code on the other hand has to read in all of the objectlist file > and generate a list of word for the for loop in: > > $$(cat > $(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)$$thorn$(LIBNAME_SUFFIX).objectlist) > > which could be a very long list of words as well (though on my Linux > laptop there seems no practical limit, even 1e7 words work). > > If I would not now know better I would expect the patch in > https://bitbucket.org/cactuscode/cactus/commits/359b98096708/ to be > reversed. > > Yours, > Roland > > -- > My email is as private as my paper mail. I therefore support encrypting > and signing email messages. Get my PGP key from http://keys.gnupg.net. > > > > > _______________________________________________ > Users mailing list > [email protected] > http://cactuscode.org/mailman/listinfo/users > -- Erik Schnetter <[email protected]> http://www.perimeterinstitute.ca/personal/eschnetter/ _______________________________________________ Users mailing list [email protected] http://cactuscode.org/mailman/listinfo/users
