Open MPI logo

MTT Devel Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all MTT Users mailing list

From: Ethan Mallove (ethan.mallove_at_[hidden])
Date: 2006-09-18 12:57:39

I finally got the &shell funclet to grab the Sun Studio compiler
version. The below one worked from the shell, but not in the mtt
client (because the cc -V output goes to stderr?).

compiler_version = &shell("cc -V |& head -n 1 | nawk '{print \$4}'");

The workaround was to have the 'cc -V' output and the head/nawk
utilities rendezvous in a file instead of a pipe.

compiler_version = &shell("cc -V 2> /tmp/cc.out; cat /tmp/cc.out | head -n 1 | nawk '{print \$4}'");