[CP2K-user] [CP2K:11584] write output in different directory than cwd

Tiziano Müller tiziano... at chem.uzh.ch
Tue Apr 23 07:19:24 UTC 2019

Hi Christopher,

On 22.04.19 23:25, Christopher Mauney wrote:
> Hello,
> I've made a diligent search to find any answers to this, but nothing 
> immediately pops up. (could be a bad mix of search terms)
> Is there a input section, or some combination, where I can specify that 
> I would like all output to go to another directory?

Not sure what you mean by "all output", but by default are all files 
created relative to $CWD and there is no global flag to give all of them 
a new common prefix.
The path for each file you can of course change and you can also give an 
absolute path. If it is governed by a print section, it is always 
similar to [1], just in different parent sections.

My usage pattern is usually something like this:

   cd /scratch/my-project
   mpirun /sw/cp2k/cp2k.popt -i proj.inp -o proj.out

respectively if you want to separate the input and the output:

   cd /scratch/my-project
   mpirun /sw/cp2k/cp2k.popt -i $HOME/my-project/proj.inp -o proj.out

respectively if you also have data files (like basis sets, potentials 
and parameter files) and do not want to specify absolute paths for them 
in the input file:

   cd /scratch/my-project
   CP2K_DATA_DIR="$HOME/my-project" mpirun /sw/cp2k/cp2k.popt -i 
$HOME/my-project/proj.inp -o proj.out

... CP2K_DATA_DIR specifies a directory where CP2K is looking for 
input/data files to open.

Hope that helps,
Best regards,

Tiziano Müller
University of Zurich
Department of Chemistry
Winterthurerstrasse 190
CH-8057 Zürich

Tel: +41 44 63 54234
tiziano... at chem.uzh.ch

More information about the CP2K-user mailing list