CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   OpenFoam2.3 project path error in Rocks6.1.1 using qsub (https://www.cfd-online.com/Forums/openfoam-solving/164233-openfoam2-3-project-path-error-rocks6-1-1-using-qsub.html)

aerospain December 16, 2015 11:57

OpenFoam2.3 project path error in Rocks6.1.1 using qsub
 
Hello everyone,

My qsub scripts are not running on our group's server because the node receiving the job looks for the 0, constant, system directories where it it not supposed to.
These scripts used to work some time ago, there has been some updates in this server but our administrators don't see any reason why my scripts are not running any longer.

I am pasting the files I use below in case someone can give me some hints:

***
run.sh
***
#!/bin/bash
#
#$ -cwd
#$ -j y
#$ -S /bin/bash
#$ -pe * 8
#$ -v MPI_BUFFER_SIZE=200000000

# ACTIVATE OPENFOAM ENVIRONMENT
# source /share/apps/centFOAM/OpenFOAM/OpenFOAM-2.1.0/etc/bashrc
# or
. /share/apps/OpenFOAM/OpenFOAM-2.3.0/etc/bashrc

# Shouldn't be necessary, since the OpenFOAM should already have this defined
export PATH=$PATH:/opt/openmpi/bin

# FORMATO GENERAL:
# mpirun -np <nProcs> <foamExec> <otherArgs> -parallel > log &

mpirun -np 8 simpleFoam -parallel > log.simpleFoam


I use the following command to submit my job:
>>> qsub -N hembase -q <computation_node> run.sh

And the following error message is received:
Cannot read "/<home>/<user>/system/decomposeParDict"

When that file is at:
/<home>/<user>/OpenFOAM/carlos-2.3.0/run/<project>/system/decomposeParDict

Some time ago I had to create a bashrc file in:
/<home>/<user>/OpenFOAM/bashrc
to overwrite the bashrc file that OpenFOAM installs at the 'etc' directory inside the installation path.

Any hints?

Thanks!!!

alexeym December 16, 2015 16:09

Hi,

Usually I prepend execution of the solver in PBS script with

Code:

cd $PBS_O_WORKDIR
and then submit job from case folder. Or you can pass the path with -case solver flag i.e.

Code:

mpirun -np 8 simpleFoam -parallel -case $PBS_O_WORKDIR > log.simpleFoam
According to the error, job was executed from your home folder. Guess, it is default location for execution of users jobs.

aerospain December 17, 2015 02:39

Dear Alexey,

Thanksfor your reply!

The job was 'q'submitted from the project folder, the same way it's done when working on a local computer. The error message tells me that the node receiving the job through 'qsub' doesn't know about the openfoam paths. But, if I 'ssh' to that node and run the case locally on it (from the project folder), it's all fun&games.

I am guessing now that the qsub command doesn't "tell" the node to start the job from the folder it was launched.

The policy in our cluster is to always use 'qsub', if we 'ssh' to the node we want to use, the administrators lose the ability to manage properly the system.

By the way, I get no information if I "echo $PBS_O_WORKDIR".

cheers!

alexeym December 17, 2015 11:50

Hi,

Did not pay attention to the syntax of configuration comments. So in fact it is SGE and not OpenPBS derivative and variable name should be SGE_O_WORKDIR. Or just use man qsub to figure out name for your job scheduler.

Using qsub in fact a question of optimal cluster resources distribution.


All times are GMT -4. The time now is 05:44.