write output in different directory than cwd

97 views
Skip to first unread message

Christopher Mauney

unread,
Apr 22, 2019, 5:25:16 PM4/22/19
to cp2k
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?

Thanks,
cm

Tiziano Müller

unread,
Apr 23, 2019, 3:19:30 AM4/23/19
to Christopher Mauney, cp...@googlegroups.com
Hi Christopher,
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

[1]
https://manual.cp2k.org/cp2k-6_1-branch/CP2K_INPUT/FORCE_EVAL/DFT/SCF/PRINT/RESTART.html#FILENAME
--
Tiziano Müller
University of Zurich
Department of Chemistry
Winterthurerstrasse 190
CH-8057 Zürich

Tel: +41 44 63 54234
www.chem.uzh.ch
tiziano...@chem.uzh.ch
Reply all
Reply to author
Forward
0 new messages