|
[Sponsors] |
Environment variable ($MPI_PROCS) in decomposeParDict |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 7, 2013, 23:30 |
Environment variable ($MPI_PROCS) in decomposeParDict
|
#1 |
Member
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13 |
Hi everyone,
this is my second post, so please excuse me if the question is pretty stupid. I'm trying to run a OpenFOAM case on a super-computer with PBS queue manager. In the launch script I create the environment variable MPI_PROCS that contains the number of CPU that i'm using. Is it possible to use this variable as number of subdomain in the decomposeParDict? (I'm using the scotch/ptscotch method, so I don't have to bother about the number of subdomain in other options) I've tried to set just $MPI_PROCS in the place of the number of subdomain, but it gives me the error "Bad token in decomposeParDict ....etc etc". PS: I'm not even very sure of what i'm saying, but could it be that i need to "export" the variable from the launch script to the variables of the run? (excuse me if my language is not technically correct, but I'm not a computer technician, I don't even now very well what environment variables are...) thank you |
|
April 8, 2013, 03:34 |
|
#2 |
Senior Member
Join Date: Dec 2011
Posts: 111
Rep Power: 19 |
Ok; this might not be what you want, but this is my solution to this problem:
However, if someone has a method of getting environment variables directly in a dictionary, that would be great, as this method is a bit "dirty". |
|
April 8, 2013, 03:38 |
|
#3 |
Member
Luca
Join Date: Mar 2013
Posts: 68
Rep Power: 13 |
Thank you very much haakon.
I see what you mean when you say that it's a bit "dirty", but it does exactly what I need. It saves me from change that damn number every time i need to change number of CPU. Thank you very much for the tip |
|
Tags |
decomposepar, environment variable, mpi, pbs |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] SWAK4FOAM_SRC environment variable | fcuevas | OpenFOAM Community Contributions | 2 | June 18, 2012 10:58 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
How to set environment variables | kanishka | OpenFOAM Installation | 1 | September 4, 2005 11:15 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |