On Nov 1, 2008, at 7:39 AM, Jeff Squyres wrote:
On Oct 31, 2008, at 4:52 PM, Gilbert Grosdidier wrote:
To monitor the environment from inside the application, it could be
useful to
issue a 'system("printenv")' call at the very beginning of the main
program,
even before (and after, btw) the MPI_Init call, when running in
serial job mode
with a single CAB, using mpirun.
Note that it may not be safe to call system(), depending on your
environment. It might be better to getenv() to look for the specific
environment variable that you're looking for, or loop over environ to
show the entire environment.
Thanks for the heads up about system(). It seems to be working for
me, but I'll be sure to remember that tidbit for the future.
I've tried printing out the environment variables from within the
program and it appears to set the MCS_LICENSE_PATH environment
variable correctly.
One thing to note is that I once accidently set the variable to the
wrong path. When I tried running my program, it printed an error
stating that the license file could not be found. When I fixed the
path to the correct location, it printed the error I described in my
original post, i.e. invalid license. This indicates to me that it is
able to find and access the license file, but for some reason is
interpreting the licenses contained in the file as invalid.
You can also use the -x option to mpirun to export a specific
environment variable to all the MPI processes. If you're using the
rsh/ssh launcher, OMPI won't automatically export mpirun's entire
environment to the MPI processes.
This is exactly what I'm doing, I'm using the -x option to set
MCS_LICENSE_PATH on all the CABs. In fact, I was the one who posted a
few weeks about having a problem setting environment variables when
launching onto a node that is running /bin/sh. I saw that the fix for
this is included in 1.2.8, but at this point, we're so close to our
deadline I'm wary of spending the time to recompile OpenMPI for the
CABs, which is, unfortunately, not a straightforward process.
A quick update: I've fixed the whole problem by linking our
application to the previous version of MCF, i.e. 1.0, which didn't use
a runtime license. We did most of our development on 1.0 and we're
not using any new features in the current version, i.e. 2.0, so
downgrading back to 1.0 doesn't really impact us.
Thanks to everyone who responded. At some point, I would like to
figure out what's causing this problem. To be honest, it may not even
be a problem with OpenMPI. It's possible that we have something
misconfigured on our system that causing this problem. When I get
some free time (ha!), I may try to see if I can replicate this problem
using MPICH2, if I can get MPICH2 to compile for the CABs.
Hahn
--
Jeff Squyres
Cisco Systems
_______________________________________________
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users
--
Hahn Kim, h...@ll.mit.edu
MIT Lincoln Laboratory
244 Wood St., Lexington, MA 02420
Tel: 781-981-0940, Fax: 781-981-5255