Configuration
Servers
Since DFControl
utilizes a client-server rest-api model, each server will have its own local deamon running, which stores certain server-side items such as pseudopotentials, Environments
and Execs
.
First start by setting up your local server:
Servers.configure_local()
To set up another Server
, in this case with name = "daint"
an interactive menu can be called like:
Server("daint")
This will set up all the required information and store it for later use. To start a Server
simply call start(server)
, which will launch the daemon externally.
Pseudopotentials
Pseudopotentials are grouped in sets, which are stored for later ease of use. They can be set up using the configure_pseudoset
function.
configure_pseudoset(local_server(), "set_name", "/dir/to/pseudos")
This will go through the specified directories and find files that follow the naming convention element.x_y_z.xyz
e.g. Si.pbesol-n-kjpaw_psl.0.1.UPF
or si.pbesol-n-kjpaw_psl.0.1.UPF
. If multiple are found, all will be stored and the required one can be later specified.
The pseudos will remain on the server where they are stored, and can be listed using list_pseudosets
. See Pseudo Potentials for further usage details.
DFControl.Client.configure_pseudoset
— Functionconfigure_pseudoset(server::Server, set_name::String, dir::String)
Reads the specified dir
and sets up the pseudos for set
.
DFControl.Client.list_pseudosets
— Functionlist_pseudosets(server::Server)
Lists the pseudosets that have previously been set up.
DFControl.Client.rm_pseudoset!
— Functionrm_pseudoset!(server::Server, set_name::String)
Removes the pseudo set from the server.
Environments
Environments specify the skeleton of the job script, i.e. which environment variables need to be set, which scheduler flags, etc. Here we will set up an environment and save it on the local Server
. Change the information according to your own setup.
e = Environment(name="default", MPI_command="mpirun -np 4", scheduler_flags=["-N 1", "--partition=parallel"], exports=["OMP_NUM_THREADS=1"])
save(local_server(), e)
While not recommended because it doesn't always work, one can try to extract an environment from a preexisting jobscript using
DFControl.Client.environment_from_jobscript
— Functionenvironment_from_jobscript([server::Server, name::String,] scriptpath::String)
Tries to extract an Environment
from a jobscript.
Execs
An Exec
embodies an executable as the name suggests. They hold both the executable, directory and modules required to run the executable. Similar to Environments
, they are stored on the server for later use. When storing it is verified that they are able to run.
e = Exec(name="pw", exec="pw.x", dir="/home/user/Softare/qe/bin", modules = ["intel", "intel-mpi", "intel-mkl"])
save(local_server(), e)
Loading/Saving
As shown above there are three main methods related to storing and retrieving data i.e.:
DFControl.Database.load
— Functionload([server::Server], e::Environment)
load([server::Server], e::Exec)
load([server::Server], s::Server)
Loads a previously stored item from the server
. If server
is not specified the local item is loaded.
load(server::Server, j::Job)
Tries to load the Job
from server
at directory j.dir
. If no exact matching directory is found, a list of job directories that comprise j.dir
will be returned.
DFControl.Database.save
— Functionsave([server::Server], e::Environment)
save([server::Server], e::Exec)
save([server::Server], s::Server)
Saves an item to the database of server
. If server
is not specified the item will be stored in the local database.
save(job::Job)
Saves the job's calculations and job.sh
submission script in job.dir
. Some sanity checks will be performed on the validity of flags, execs, pseudopotentials, etc. The job will also be registered for easy retrieval at a later stage.
If a previous job is present in the job directory (indicated by a valid job script), it will be copied to the .versions
sub directory as the previous version of job
, and the version of job
will be incremented.
Base.Filesystem.rm
— MethodBase.rm([server::Server], e::Environment)
Base.rm([server::Server], e::Exec)
Base.rm([server::Server], s::Server)
Removes an item from the database of server
. If server
is not specified the item will removed from the local database.
After completing this configuration, it is suggested to look at the (Basic Usage)[@ref] for an introduction to the basic usage of DFControl
.