diff --git a/lang/en/docs/remote-connection/actions/open-terminal.md b/lang/en/docs/remote-connection/actions/open-terminal.md index fe842953..190f9a19 100644 --- a/lang/en/docs/remote-connection/actions/open-terminal.md +++ b/lang/en/docs/remote-connection/actions/open-terminal.md @@ -1,6 +1,6 @@ # Open / Close Web Terminal -The [Web Terminal](../web-terminal.md) remote connection method for accessing the [Command Line Interface](../../cli/overview.md) of our platform is accessible under the corresponding `Terminal` option included in the [right-hand sidebar menu](../../ui/right-sidebar.md) of the [Web Interface](../../ui/overview.md). +The [Web Terminal](../web-terminal.md) remote connection method for accessing the [Command Line Interface](../../cli/overview.md) of our platform is accessible by clicking on the "Remote Access" icon in the top right corner of the platform [Web Interface](../../ui/overview.md) (just left of your account logo) and selecting `Terminal` option. The Web Terminal can subsequently be closed by clicking the ✕ button at its top-right corner, which reverts the entire screen to its previous appearance. diff --git a/lang/en/docs/tutorials/jobs-cli/job-cli-example.md b/lang/en/docs/tutorials/jobs-cli/job-cli-example.md index 35513d9c..02b5df1e 100644 --- a/lang/en/docs/tutorials/jobs-cli/job-cli-example.md +++ b/lang/en/docs/tutorials/jobs-cli/job-cli-example.md @@ -1,106 +1,135 @@ -# Running Jobs via Command Line Interface +# Creating, Running, and Inspecting Jobs via Command Line Interface -This page explains how to run a [job](../../jobs/overview.md) via the [Command Line Interface](../../cli/overview.md) (CLI) of our platform. The reader is recommended to first consult the [relevant part of the documentation](../../jobs-cli/overview.md) before proceeding further with the present Tutorial. - -Here, we will use a template input file and a bash script to sweep the lattice parameter space for a given structure. We will use [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md) as an example simulations engine, however all command-line related directives apply universally. - -## 1. Input File - -We start with preparing an **input file** for [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md). Below is an example input file for performing a total ground-state "self-consistent field" (scf) energy computation, with pseudopotential paths set to use the default **"gbrv" set of pseudopotentials** [^1] implemented on our platform. - -The material being considered in this particular example is a supercell of "Strontium Zirconate" (SrZrO3), in its ground state equilibrium crystal structure with space group "Pnma" [^2]. The reader is referred to the official documentation for the "PWscf" module of Quantum ESPRESSO [^3] [^4] for a description of the keyword parameters contained here. +This tutorial explains how to run a [job](../../jobs/overview.md) via the [Command Line Interface](../../cli/overview.md) (CLI) of our platform. +Additionally, we discuss how to enable (or disable, if desired) an automatic extraction of information from the job output files, to make them available for user analysis in the web interface, under the [Files Tab](../../jobs/ui/files-tab.md) of [Job Viewer](../../jobs/ui/viewer.md). For further details, you can consult the [relevant part of the documentation](../../jobs-cli/overview.md) as you follow the tutorial. +The reader is assumed to be familiar with command line basics, such as file system navigation and file editing in Linux. + + +Here, we will use a template input file and a bash script to sweep the lattice parameter space for a given structure. We will use [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md) (**QE**) as an example simulations engine, however all command-line related directives apply universally. + +## 1. Connect to CLI + +First, [navigate](../../remote-connection/actions/open-terminal.md) to the [Web Terminal](../../remote-connection/web-terminal.md) for accessing the [command-line interface](../../cli/overview.md) of our platform. (You can also use any other available [remote connection method](../../remote-connection/overview.md).) + +Once CLI is open, navigate to (or create) the desired job [working directory](../../jobs-cli/batch-scripts/directories.md), which you *must* position into a subdirectory of the [Home Folder](../../infrastructure/clusters/directories.md) of one of the [clusters](../../infrastructure/clusters/overview.md). Remember that it is the *location* of the working directory (or, more precisely, of the directory from which you submit the job) that will determine *which cluster* your job would run at. (Here we assume you are logged into the main login node, which is the default behavior; however, if you log in directly into one of the clusters, you would not be able to access home directories of other clusters anyway, nor to submit to other clusters.) + + +## 2. Input File +We now need to prepare the **input file(s)**, defining our desired calculation. For our example, you can copy-paste the template **QE** input file from the expandable section below +(you can also copy from this link, which opens in a new browser tab.) +Name the file `pw.in` and place it in your [working directory](../../jobs-cli/batch-scripts/directories.md). +??? example "Template input file (click to expand)" + + ```fortran title="pw.in" + ! scf for SrZrO3 for a supercell of Pnma ground state structure + &control + calculation = 'scf', + restart_mode = 'from_scratch', + prefix = 'srzro' + tstress =.true. + tprnfor=.true. + outdir = './_outdir' + wfcdir = './' + prefix = '${celldm1}' + pseudo_dir = './_pseudo' + / + &system + ibrav = 1 + celldm(1) = ${celldm1}, + nat = 40 + ntyp = 3 + ecutwfc = 40 + ecutrho = 200 + tot_charge = 0 + / + &electrons + mixing_beta = 0.7 + conv_thr = 1.0d-8 + / + ATOMIC_SPECIES + Sr 87.62 sr_pbe_gbrv_1.0.upf + Zr 91.224 zr_pbe_gbrv_1.0.upf + O 15.999 o_pbe_gbrv_1.2.upf + !supercell of "Strontium Zirconate" (SrZrO3), in its ground state equilibrium crystal structure (space group "Pnma") + ATOMIC_POSITIONS (crystal) + Zr 0.250000000 0.250000000 0.250000000 + Zr 0.750000000 0.250000000 0.250000000 + Zr 0.250000000 0.750000000 0.250000000 + Zr 0.750000000 0.750000000 0.250000000 + Zr 0.250000000 0.250000000 0.750000000 + Zr 0.750000000 0.250000000 0.750000000 + Zr 0.250000000 0.750000000 0.750000000 + Zr 0.750000000 0.750000000 0.750000000 + Sr 0.000000000 0.000000000 0.000000000 + Sr 0.500000000 0.000000000 0.000000000 + Sr 0.000000000 0.500000000 0.000000000 + Sr 0.500000000 0.500000000 0.000000000 + Sr 0.000000000 0.000000000 0.500000000 + Sr 0.500000000 0.000000000 0.500000000 + Sr 0.000000000 0.500000000 0.500000000 + Sr 0.500000000 0.500000000 0.500000000 + O 0.000000000 0.250000000 0.250000000 + O 0.250000000 0.000000000 0.250000000 + O 0.250000000 0.250000000 0.000000000 + O 0.500000000 0.250000000 0.250000000 + O 0.750000000 0.000000000 0.250000000 + O 0.750000000 0.250000000 0.000000000 + O 0.000000000 0.750000000 0.250000000 + O 0.250000000 0.500000000 0.250000000 + O 0.250000000 0.750000000 0.000000000 + O 0.500000000 0.750000000 0.250000000 + O 0.750000000 0.500000000 0.250000000 + O 0.750000000 0.750000000 0.000000000 + O 0.000000000 0.250000000 0.750000000 + O 0.250000000 0.000000000 0.750000000 + O 0.250000000 0.250000000 0.500000000 + O 0.500000000 0.250000000 0.750000000 + O 0.750000000 0.000000000 0.750000000 + O 0.750000000 0.250000000 0.500000000 + O 0.000000000 0.750000000 0.750000000 + O 0.250000000 0.500000000 0.750000000 + O 0.250000000 0.750000000 0.500000000 + O 0.500000000 0.750000000 0.750000000 + O 0.750000000 0.500000000 0.750000000 + O 0.750000000 0.750000000 0.500000000 + K_POINTS (automatic) + 3 3 3 1 1 1 + ``` + This input file instructs [**QE**](../../software-directory/modeling/quantum-espresso/overview.md) to perform a "self-consistent field" (scf) total energy computation for a supercell of "Strontium Zirconate" (SrZrO3), in its equilibrium crystal structure (space group *Pnma* [^1]). (The reader is referred to the official documentation for the "PWscf" module of Quantum ESPRESSO [^2] [^3] for a description of the keyword parameters contained in our input example.) + +Note that since we want to sweep the values of the lattice parameter, our template input file is using a variable on line 15 of the file: ```fortran -&control - calculation = 'scf', - restart_mode = 'from_scratch', - prefix = 'srzro' - tstress =.true. - tprnfor=.true. - outdir = './_outdir' - wfcdir = './' - prefix = '${celldm1}' - pseudo_dir = './_pseudo' - / - &system - ibrav = 1 celldm(1) = ${celldm1}, - nat = 40 - ntyp = 3 - ecutwfc = 40 - ecutrho = 200 - tot_charge = 0 -/ -&electrons - mixing_beta = 0.7 - conv_thr = 1.0d-8 -/ -ATOMIC_SPECIES - Sr 87.62 sr_pbe_gbrv_1.0.upf - Zr 91.224 zr_pbe_gbrv_1.0.upf - O 15.999 o_pbe_gbrv_1.2.upf -ATOMIC_POSITIONS (crystal) -Zr 0.250000000 0.250000000 0.250000000 -Zr 0.750000000 0.250000000 0.250000000 -Zr 0.250000000 0.750000000 0.250000000 -Zr 0.750000000 0.750000000 0.250000000 -Zr 0.250000000 0.250000000 0.750000000 -Zr 0.750000000 0.250000000 0.750000000 -Zr 0.250000000 0.750000000 0.750000000 -Zr 0.750000000 0.750000000 0.750000000 -Sr 0.000000000 0.000000000 0.000000000 -Sr 0.500000000 0.000000000 0.000000000 -Sr 0.000000000 0.500000000 0.000000000 -Sr 0.500000000 0.500000000 0.000000000 -Sr 0.000000000 0.000000000 0.500000000 -Sr 0.500000000 0.000000000 0.500000000 -Sr 0.000000000 0.500000000 0.500000000 -Sr 0.500000000 0.500000000 0.500000000 -O 0.000000000 0.250000000 0.250000000 -O 0.250000000 0.000000000 0.250000000 -O 0.250000000 0.250000000 0.000000000 -O 0.500000000 0.250000000 0.250000000 -O 0.750000000 0.000000000 0.250000000 -O 0.750000000 0.250000000 0.000000000 -O 0.000000000 0.750000000 0.250000000 -O 0.250000000 0.500000000 0.250000000 -O 0.250000000 0.750000000 0.000000000 -O 0.500000000 0.750000000 0.250000000 -O 0.750000000 0.500000000 0.250000000 -O 0.750000000 0.750000000 0.000000000 -O 0.000000000 0.250000000 0.750000000 -O 0.250000000 0.000000000 0.750000000 -O 0.250000000 0.250000000 0.500000000 -O 0.500000000 0.250000000 0.750000000 -O 0.750000000 0.000000000 0.750000000 -O 0.750000000 0.250000000 0.500000000 -O 0.000000000 0.750000000 0.750000000 -O 0.250000000 0.500000000 0.750000000 -O 0.250000000 0.750000000 0.500000000 -O 0.500000000 0.750000000 0.750000000 -O 0.750000000 0.500000000 0.750000000 -O 0.750000000 0.750000000 0.500000000 -K_POINTS (automatic) -3 3 3 1 1 1 ``` +indicating that the lattice parameter `celldm(1)` for the underlying simple cubic [Bravais Lattice](../../properties-directory/structural/lattice.md) of the crystal structure would need be defined by the combined `run.sh` script, as explained below. -Note that we are using a template variable in place of `celldm(1)`, indicating the lattice parameter of the underlying simple cubic [Bravais Lattice](../../properties-directory/structural/lattice.md) of the crystal structure. These template variables are defined once the combined `run.sh` script is put together, as explained in what follows. - -We also need to copy the pseudopotential files into the current [working directory](../../jobs-cli/batch-scripts/directories.md) where the input file is stored, as follows. - +For pseudopotentials, our input file references (on lines 27-29) the default **"gbrv"** set of pseudopotentials[^4], available on our platform at `/export/share/pseudo`. To use them, we need to copy the pseudopotential files fto the working directory (more accurately, to the subdirectory `_pseudo`, as indicated on line 16). For our example, don't copy them right now, as they will be copied by the `run.sh` script below. + + +This completes the standard **QE** input setup. Note that in the case of [**QE**](../../software-directory/modeling/quantum-espresso/overview.md) a single input file describes both the atomic positions and all the calculation parameters; for other codes (e.g. [VASP](../../software-directory/modeling/vasp/overview.md)), multiple input files may need be created, as would be defined by the respective documentation. -## 2. Batch Script +## 3. Batch Job Script -Secondly, we prepare the [Batch Script](../../jobs-cli/batch-scripts/overview.md) necessary for [submitting jobs via CLI](../../jobs-cli/overview.md). +A [job batch script file](../../jobs-cli/batch-scripts/overview.md) is used to both submit the job to the `PBS` scheduler and to control whether the system should collect the job information and create job entry inside the web interface. [In this page](../../jobs-cli/batch-scripts/sample-scripts.md), the reader can find **sample job script files** for running [Job simulations via Command Line Interface](../../jobs-cli/overview.md) that can be used as templates. The general structure of such scripts is further explained [here](../../jobs-cli/batch-scripts/general-structure.md). + +!!!note "Keep job scripts simple" + Please avoid using complex formatting and extra indentations or spacing in the job script. (See [this subsection](#31-importing-job-results-to-the-web-interface) for details.) + +For our example, copy-paste the following template `PBS` script into a file `jobpbs.temp`: ```bash #!/bin/bash -#PBS -A ${PROJECT} +#PBS -A ${PROJECT} ### omit this line to charge the default project #PBS -M ${EMAIL} #PBS -N SrZrO3 #PBS -l nodes=1 @@ -113,190 +142,248 @@ Secondly, we prepare the [Batch Script](../../jobs-cli/batch-scripts/overview.md module add espresso cd $PBS_O_WORKDIR # $EXEC_CMD is set by the environment module -mpirun -np $PBS_NP $EXEC_CMD pw.x -in pw.in > pw.out +mpirun -np $PBS_NP $EXEC_CMD pw.x -in srzro3_${celldm1}.in | tee srzro3_${celldm1}.out ``` -Just like before, we are using template variables again instead of the [project](../../jobs/projects.md) name and email. Variables starting with `$PBS` are automatically set by the [resource manager](../../infrastructure/resource/overview.md), and are known as the ["PBS Directives"](../../jobs-cli/batch-scripts/directives.md). +Just like before, we are using template variables instead of the [project](../../jobs/projects.md) name, email, and the lattice-parameter-specific input and output filenames; those would all be set by `run.sh` below. The variables starting with `$PBS` are automatically set by the [resource manager](../../infrastructure/resource/overview.md), and are known as ["PBS Directives"](../../jobs-cli/batch-scripts/directives.md). The variable `$EXEC_CMD` is set by the `module add` command. -The rest of the Batch Script contains UNIX commands necessary for [loading the required modules](../../cli/actions/modules-actions.md) and running the executables in parallel. +The reader should note that within the `mpirun` line we make use of the `tee` command. This redirects the output of the simulation to both the standard output (abbreviated as "stdout") and to the output file simultaneously. Redirecting to "stdout" in this way allows the status of the job to be regularly updated and refreshed under the corresponding [Job Viewer](../../jobs/ui/viewer.md) in the [Web Interface](../../ui/overview.md), as we discuss next. -## 3. Shell Script +### 3.1 Importing Job Results to the Web Interface +In order to submit a new job through [command-line interface](../../cli/overview.md), and then view its progress and the corresponding output files under the [Web Interface](../../ui/overview.md), the following [directive](../../jobs-cli/batch-scripts/directives.md) can be added to the [job submission script](../../jobs-cli/batch-scripts/overview.md): +```bash +#PBS -R y +``` + +!!!note "Default Behavior" + The `#PBS -R y` [directive](../../jobs-cli/batch-scripts/directives.md) is always enabled by default, but it can still be added manually as a failsafe. + +This directive instructs our software to automatically parse the output of the calculation, and send back the results to the web interface. After adding this directive, the job can then be [submitted](../../jobs-cli/actions/submit.md) as usual, and once the job starts executing, the user should be able to see the job entry in the web interface under [Jobs Explorer](../../jobs/ui/explorer.md), including the [status](../../jobs/status.md) of its execution, the produced files, and the extracted results. + +This feature can conversely be *disabled* by inserting the following other directive option in the [job submission script](../../jobs-cli/batch-scripts/overview.md). + +```bash +#PBS -R n +``` +Note that currently only simple job scripts containing a single [execution command](../../jobs-cli/batch-scripts/general-structure.md#4.-commands) support import to web interface. Hence, the user is advised make sure that the script's content is straightforward and properly formatted. + + +## 4. Shell Script + +Since we want to sweep the the lattice parameter space, we'll use a script to prepare and submit not just one job, but separate jobs for each lattice parameter value. The logic for parameter sweep calculations through shell scripting can be summarized as below (in pseudo code). ```bash -#!/bin/sh +#!/bin/sh +### DO NOT USE VERBATIM - PSEUDO-CODE ONLY!!! for celldm1 in 5.81 5.82 5.83 do - render_input_file(celldm1) + render_input_files(celldm1) render_job_submission_script(email, project) submit_job("cluster-001") done ``` +This logic can be implemented either by using `sed` command to explicitly process the template input and job files that we created above, or, alternatively, by incorporating the text of the template files into the shell script itself. -## 4. Combined Input Script +### 4.1 Using `sed` to Explicitly Process Template Files -When combined together, all the above components give the following structure. +This approach allows one to separate changes one may later want to make to the main input file from the changes to the `PBS` job script or to the shell script itself. Copy-paste the following script into a file `run.sh`: ```bash #!/bin/sh -# ---------------------------------------------------------- # -# # -# Example job submission script for Exabyte.io platform # -# # -# Combines bash and resource management directives: # -# # -# 1. creates input files for simulations # -# 2. creates resource management scripts (PBS) # -# 3. submits resource management scripts for execution # -# # -# ---------------------------------------------------------- # - # Email to receive info on job progress -EMAIL="user@exabyte.io" +EMAIL="user@exabyte.io" +## if not using default account, uncomment the next line and specify account name +#ACCOUNT= -# ---------------------------------------------------------- # -# Quantum ESPRESSO pseudopotentials # -# ---------------------------------------------------------- # +# Copy Quantum ESPRESSO pseudopotentials: # mkdir -p _pseudo -cp /export/share/pseudo/sr/gga/pbe/gbrv/1.0/us/sr_pbe_gbrv_1.0.upf ./_pseudo +cp /export/share/pseudo/sr/gga/pbe/gbrv/1.0/us/sr_pbe_gbrv_1.0.upf ./_pseudo cp /export/share/pseudo/zr/gga/pbe/gbrv/1.0/us/zr_pbe_gbrv_1.0.upf ./_pseudo cp /export/share/pseudo/o/gga/pbe/gbrv/1.2/us/o_pbe_gbrv_1.2.upf ./_pseudo +#loop over parameter values, create job files, and submit them: for celldm1 in 5.81 5.82 5.83 do # ---------------------------------------------------------- # # Quantum ESPRESSO input file # # ---------------------------------------------------------- # - cat > srzro3_${celldm1}.in < run_QE_${celldm1}.pbs <<-EOF -#!/bin/bash -#PBS -M ${EMAIL} -#PBS -N SrZrO3 -#PBS -l nodes=1 -#PBS -l ppn=16 -#PBS -q OR -#PBS -j oe -#PBS -l walltime=02:00:00 -#PBS -m abe - -module add espresso -cd \$PBS_O_WORKDIR -mpirun -np \$PBS_NP $EXEC_CMD pw.x -in srzro3_${celldm1}.in | tee srzro3_${celldm1}.out -EOF + cat pw.in |sed "s/\${celldm1}/${celldm1}/g"> srzro3_${celldm1}.in + cat jobpbs.temp |sed "s/\${EMAIL}/${EMAIL}/g; s/\${celldm1}/${celldm1}/g" > run_QE_${celldm1}.pbs qsub run_QE_${celldm1}.pbs done - ``` -The reader should note that within the `mpirun` command we make use of the `tee` command. This redirects the output of the simulation to both the standard output (abbreviated as "stdout") and to the output file simultaneously. Redirecting to "stdout" in this way allows the status of the job to be regularly updated and refreshed under the corresponding [Job Viewer](../../jobs/ui/viewer.md) in the [Web Interface](../../ui/overview.md), as demonstrated in [another Tutorial](cli-job-import.md). - -We can put the content of the above file into a bash script called `run.sh` for example, and then make the script executable with `chmod a+x run.sh` command. +### 4.2 Alternative: Incorporating Templates into a Single Script +Instead of creating separate template files `pw.in` and `jobpbs.temp`, as we did above, one can also combine the above components into a single script, giving the following structure for the alternative version of `run.sh`: +??? example "Combined input script (click to expand)" + ```bash + #!/bin/sh + + # ---------------------------------------------------------- # + # # + # Example job submission script for Exabyte.io platform # + # # + # Combines bash and resource management directives: # + # # + # 1. creates input files for simulations # + # 2. creates resource management scripts (PBS) # + # 3. submits resource management scripts for execution # + # # + # ---------------------------------------------------------- # + + # Email to receive info on job progress + EMAIL="user@exabyte.io" + + # ---------------------------------------------------------- # + # Quantum ESPRESSO pseudopotentials # + # ---------------------------------------------------------- # + mkdir -p _pseudo + cp /export/share/pseudo/sr/gga/pbe/gbrv/1.0/us/sr_pbe_gbrv_1.0.upf ./_pseudo + cp /export/share/pseudo/zr/gga/pbe/gbrv/1.0/us/zr_pbe_gbrv_1.0.upf ./_pseudo + cp /export/share/pseudo/o/gga/pbe/gbrv/1.2/us/o_pbe_gbrv_1.2.upf ./_pseudo + + for celldm1 in 5.81 5.82 5.83 + do + # ---------------------------------------------------------- # + # Quantum ESPRESSO input file # + # ---------------------------------------------------------- # + cat > srzro3_${celldm1}.in < run_QE_${celldm1}.pbs <<-EOF + #!/bin/bash + #PBS -M ${EMAIL} + #PBS -N SrZrO3 + #PBS -l nodes=1 + #PBS -l ppn=16 + #PBS -q OR + #PBS -j oe + #PBS -l walltime=02:00:00 + #PBS -m abe + + module add espresso + cd \$PBS_O_WORKDIR + mpirun -np \$PBS_NP $EXEC_CMD pw.x -in srzro3_${celldm1}.in | tee srzro3_${celldm1}.out + EOF + qsub run_QE_${celldm1}.pbs + done + + ``` + + +## 5. Submitting and Viewing Submitted Jobs + +After you put the content of the above file into a bash script called (for example)`run.sh`, make the script executable with `chmod a+x run.sh` command. -The job can finally be [submitted](../../jobs-cli/actions/submit.md) as a set to the [Resource Manager](../../infrastructure/resource/overview.md) by invoking the script via the `./run.sh` command (the `qsub` command is not necessary in this case since it is already included as part of `run.sh`, towards the end of the script). - -## 5. View Submitted Jobs +For a single job, you would normally [submit](../../jobs-cli/actions/submit.md) it using `qsub` command. However, as we made a script submitting a set of jobs sweeping parameter values, we only need to invoke our the script via the +```bash +./run.sh +``` +command (in this case, the `qsub` command is not necessary, since it is already included as part of `run.sh`, towards the end of the script). -The user can view the currently submitted jobs and their statuses in CLI with the `qstat` [command](../../jobs-cli/actions/check-status.md). +You can view the currently submitted jobs and their statuses in CLI with the `qstat` [command](../../jobs-cli/actions/check-status.md). You can also use `watch qstat` command for an automatically-refreshing version of `qstat`. -The reader is referred to the video below for an explanation on how to inspect the results of the above simulation under the [Web Interface](../../ui/overview.md) of our platform. +Assuming you have **not** added the `#PBS -R n` option to the script, you should also be able to see the job entry in the web interface under [Jobs Explorer](../../jobs/ui/explorer.md), and thus monitor the corresponding [status](../../jobs/status.md) of its execution. The reader is referred to the videos below for an explanation on how to inspect the simulation results under the [Web Interface](../../ui/overview.md) of our platform. -## Animation +## Animations of Job Submission and Inspection -We summarize the above-mentioned steps in the following video. +You can watch the following video, which illustrates job submission and inspection, starting from a pre-prepared `run.sh` script (using the single-script approach of [section 4.2](#42-alternative-incorporating-templates-into-a-single-script).) Here, the `run.sh` script is submitted for execution under the [Home Folder](../../infrastructure/clusters/directories.md) of `cluster-007`, and you can see that the [status of the job](../../jobs-cli/actions/check-status.md) inspected with the `watch qstat` command indicates that it is running on cluster number "007". Note that in the animation, only one lattice parameter has been tested for simplicity, and thus only one job has been launched and is returned by `qstat` in this case (scanning over all three lattice parameters, as in the original script shown above, would have correspondingly launched three distinct jobs). The video explains how to inspect the stdin/stdout while the job is running, and inspect the job files once the job completes. -Here, we begin by entering the [Command Line Interface](../../cli/overview.md) via the [Web Terminal](../../remote-connection/web-terminal.md) connection method. We then navigate to the directory containing the `run.sh` script under the [Home Folder](../../infrastructure/clusters/directories.md) of `cluster-007`, where we submit it for execution. +
+ +
-We conclude by inspecting the [status of the job](../../jobs-cli/actions/check-status.md) on the selected cluster number "007" by entering the `watch qstat` command, for an automatically-refreshing version of `qstat`. Since only one lattice parameter was tested in this example animation for simplicity, only one job has been launched and is returned by `qstat` in this case (scanning over all three lattice parameters, as in the original script shown above, would have correspondingly launched three distinct jobs). +As another illustration, we also provide an animation of a submission of a [VASP Template Job](../../jobs-cli/batch-scripts/directories.md#job-templates). Here, we edit the [job submission script](../../jobs-cli/batch-scripts/overview.md) to insert the aforementioned `#PBS -R y` [directive](../../jobs-cli/batch-scripts/directives.md) for completeness (even though as explained earlier this directive is already enabled by default.) This ensures we can monitor the job [status](../../jobs/status.md) under [Jobs Explorer](../../jobs/ui/explorer.md) in [Web Interface](../../ui/overview.md), which we inspect towards the end of the animation.
- +
+ ## Links -[^1]: [GBRV pseudopotential library, Official Website](https://www.physics.rutgers.edu/gbrv/) +[^1]: [Strontium Zirconate, Materials Project Website](https://materialsproject.org/materials/mp-4387/) -[^2]: [Strontium Zirconate, Materials Project Website](https://materialsproject.org/materials/mp-4387/) +[^2]: [PWscf User’s Guide, Document](https://www.quantum-espresso.org/Doc/pw_user_guide.pdf) -[^3]: [PWscf User’s Guide, Document](https://www.quantum-espresso.org/Doc/pw_user_guide.pdf) +[^3]: [PWscf Input File Description, Website](https://www.quantum-espresso.org/Doc/INPUT_PW.html) -[^4]: [PWscf Input File Description, Website](https://www.quantum-espresso.org/Doc/INPUT_PW.html) +[^4]: [GBRV pseudopotential library, Official Website](https://www.physics.rutgers.edu/gbrv/) diff --git a/lang/en/docs/tutorials/jobs-cli/overview.md b/lang/en/docs/tutorials/jobs-cli/overview.md index cbea2d73..f8fcfa95 100644 --- a/lang/en/docs/tutorials/jobs-cli/overview.md +++ b/lang/en/docs/tutorials/jobs-cli/overview.md @@ -1,11 +1,13 @@ # Tutorials on Jobs via Command Line Interface -We explain how the user can go through the procedure for [submitting jobs via the Command Line Interface (CLI)](../../jobs-cli/overview.md) of our platform with the help of the following tutorials. +The tutorials below explain how to submit jobs via the [Command Line Interface (CLI)](../../jobs-cli/overview.md), and how to make the job results available for post-processing with other tools in our platform. -## [Creating and Running Jobs](job-cli-example.md) +Follow these tutorials if you are accustomed to command line and are still transitioning to the Mat3ra workflows, or if you are an advanced user trying to implement a workflow not yet natively supported by the web interface (in which case, please also [let us know](other/support.md) what functionality is desirable!) -[This first tutorial](job-cli-example.md) explains how to create the input scripts for running a materials science computation with the [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md) modeling application. We also explain how to submit the corresponding [simulation job](../../jobs/overview.md) to the [Resource Manager](../../infrastructure/resource/overview.md) of our computational [infrastructure](../../infrastructure/overview.md) via the [Command Line Interface](../../cli/overview.md). -## [Import Command Line Jobs to Web Interface](cli-job-import.md) +## Tutorial: [Creating, Running, and Inspecting Jobs](job-cli-example.md) -[This tutorial](cli-job-import.md) explains how to import the results of a [job](../../jobs-cli/overview.md) run via [command-line interface](../../cli/overview.md) to the main [Web Interface](../../ui/overview.md) of our platform. +[This first tutorial](job-cli-example.md) explains how to create the input scripts for running a materials science computation (in this case using the [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md) modeling application.) We also explain how to submit the corresponding [simulation job](../../jobs/overview.md) to the [Resource Manager](../../infrastructure/resource/overview.md) of our computational [infrastructure](../../infrastructure/overview.md) via the [Command Line Interface](../../cli/overview.md), how to control whether the results are automatically imported to the main [Web Interface](../../ui/overview.md) of our platform, and how to inspect the status of the job and the job results. + +## Tutorial: [QE GPU Job](jobs-cli/qe-gpu.md) +[This tutorial](jobs-cli/qe-gpu.md) explains how to run jobs utilizing GPUs via [command-line interface](../../cli/overview.md), using a [Quantum ESPRESSO](../../software-directory/modeling/quantum-espresso/overview.md) job as an example, and presents an example of a computational speed-up achieved. diff --git a/lang/en/docs/tutorials/jobs-cli/script_examples/pw.in b/lang/en/docs/tutorials/jobs-cli/script_examples/pw.in new file mode 100644 index 00000000..09eaccab --- /dev/null +++ b/lang/en/docs/tutorials/jobs-cli/script_examples/pw.in @@ -0,0 +1,71 @@ +&control + calculation = 'scf', + restart_mode = 'from_scratch', + prefix = 'srzro' + tstress =.true. + tprnfor=.true. + outdir = './_outdir' + wfcdir = './' + prefix = '${celldm1}' + pseudo_dir = './_pseudo' + / + &system + ibrav = 1 + celldm(1) = ${celldm1}, + nat = 40 + ntyp = 3 + ecutwfc = 40 + ecutrho = 200 + tot_charge = 0 +/ +&electrons + mixing_beta = 0.7 + conv_thr = 1.0d-8 +/ +ATOMIC_SPECIES + Sr 87.62 sr_pbe_gbrv_1.0.upf + Zr 91.224 zr_pbe_gbrv_1.0.upf + O 15.999 o_pbe_gbrv_1.2.upf +ATOMIC_POSITIONS (crystal) +Zr 0.250000000 0.250000000 0.250000000 +Zr 0.750000000 0.250000000 0.250000000 +Zr 0.250000000 0.750000000 0.250000000 +Zr 0.750000000 0.750000000 0.250000000 +Zr 0.250000000 0.250000000 0.750000000 +Zr 0.750000000 0.250000000 0.750000000 +Zr 0.250000000 0.750000000 0.750000000 +Zr 0.750000000 0.750000000 0.750000000 +Sr 0.000000000 0.000000000 0.000000000 +Sr 0.500000000 0.000000000 0.000000000 +Sr 0.000000000 0.500000000 0.000000000 +Sr 0.500000000 0.500000000 0.000000000 +Sr 0.000000000 0.000000000 0.500000000 +Sr 0.500000000 0.000000000 0.500000000 +Sr 0.000000000 0.500000000 0.500000000 +Sr 0.500000000 0.500000000 0.500000000 +O 0.000000000 0.250000000 0.250000000 +O 0.250000000 0.000000000 0.250000000 +O 0.250000000 0.250000000 0.000000000 +O 0.500000000 0.250000000 0.250000000 +O 0.750000000 0.000000000 0.250000000 +O 0.750000000 0.250000000 0.000000000 +O 0.000000000 0.750000000 0.250000000 +O 0.250000000 0.500000000 0.250000000 +O 0.250000000 0.750000000 0.000000000 +O 0.500000000 0.750000000 0.250000000 +O 0.750000000 0.500000000 0.250000000 +O 0.750000000 0.750000000 0.000000000 +O 0.000000000 0.250000000 0.750000000 +O 0.250000000 0.000000000 0.750000000 +O 0.250000000 0.250000000 0.500000000 +O 0.500000000 0.250000000 0.750000000 +O 0.750000000 0.000000000 0.750000000 +O 0.750000000 0.250000000 0.500000000 +O 0.000000000 0.750000000 0.750000000 +O 0.250000000 0.500000000 0.750000000 +O 0.250000000 0.750000000 0.500000000 +O 0.500000000 0.750000000 0.750000000 +O 0.750000000 0.500000000 0.750000000 +O 0.750000000 0.750000000 0.500000000 +K_POINTS (automatic) +3 3 3 1 1 1 diff --git a/lang/en/docs/tutorials/overview.md b/lang/en/docs/tutorials/overview.md index a8a740c5..7032aa4e 100644 --- a/lang/en/docs/tutorials/overview.md +++ b/lang/en/docs/tutorials/overview.md @@ -7,10 +7,10 @@ sidebar navigation. ## Table of Contents - [Overview](overview.md) -- Jobs via Command Line +- Jobs via Command Line: *you may skip this unless you are an experienced HPC user seeking familiar command line interface while transitioning to Mat3ra. For advanced platform functionality we recommend using web submission as described in subsequent sections.* - [Overview](jobs-cli/overview.md) - - [Create + run a CLI Job](jobs-cli/job-cli-example.md) - - [Import a CLI Job to Web Interface](jobs-cli/cli-job-import.md) + - [Create, Run, and Inspect a CLI Job](jobs-cli/job-cli-example.md) + - [QE GPU Job](jobs-cli/qe-gpu.md) - Templating - [Overview](templating/overview.md) - [Flags by Elemental Composition](templating/set-flag-by-composition.md) @@ -24,7 +24,7 @@ sidebar navigation. - [Training a Classifier](python-ml/train-classification-model.md) - [Predicting with a Classifier](python-ml/predict-with-classification.md) - [DeePMD (molecular dynamics)](ml/deepmd-mlff-with-espresso-cp-and-lammps.md) -- Density Functional Theory +- Density Functional Theory (DFT) - Electronic Properties - [Overview](dft/electronic/overview.md) - [Effective Screening Medium](dft/electronic/esm-qe.md) diff --git a/mkdocs.yml b/mkdocs.yml index 0db9cab8..353406e3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -152,8 +152,8 @@ nav: - Overview: tutorials/overview.md - Jobs via Command Line: - Overview: tutorials/jobs-cli/overview.md - - Create + run a CLI Job: tutorials/jobs-cli/job-cli-example.md - - Import a CLI Job to Web Interface: tutorials/jobs-cli/cli-job-import.md + - Create, Run, and Inspect a CLI Job: tutorials/jobs-cli/job-cli-example.md +# - Import a CLI Job to Web Interface: tutorials/jobs-cli/cli-job-import.md - QE GPU Job: tutorials/jobs-cli/qe-gpu.md - Templating: - Overview: tutorials/templating/overview.md