|
|
| (13 intermediate revisions by 3 users not shown) |
| Line 1: |
Line 1: |
| Here is a script for submitting a Quantum Espresso (QE) job
| | go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]] |
|
| |
|
| To submit to CSUC collserola, usually for small jobs, shorter waiting queue
| | [[Media:QE_Beamer.pdf|Introduction to Quantum Espresso]] |
| <pre>
| |
| #!/bin/bash
| |
| # specifies the name of your job
| |
| # BSUB -J jobname
| |
| #
| |
| # send standard output here
| |
| # BSUB -o quantum_espresso.log
| |
| #
| |
| # send standard error here
| |
| # BSUB -e quantum_espresso.err
| |
| #
| |
| # pick a queue
| |
| # BSUB -q parallel4
| |
| #
| |
| # pick the machine
| |
| # BSUB -R collserola
| |
| #
| |
| # Indicate the number of cores
| |
| # BSUB -n 4
| |
| # All process should be executed in the same node
| |
| # BSUB -R span[hosts=1]
| |
| #
| |
| # Send an email notice once the job is finished
| |
| # BSUB -N -u MYEMAIL@iciq.es
| |
|
| |
|
| export ESPRESSO_PSEUDO=$HOME/espresso_pseudo
| | - [[Examples for Quantum Espresso]] |
|
| |
|
| | - [[Submitting a Quantum Espresso job]] |
|
| |
|
| INDIR=$ESPRESSO_TMPDIR # directory with your input and the .UPF files
| | - [[Useful links for Quantum Espresso]] |
| INPUT=INPUT.in
| |
| OUTPUT=OUTPUT.out
| |
|
| |
|
| date
| | - [[How to cite Quantum Espresso]] |
|
| |
|
| # Set up the environment
| | - [[Some scripts for file format conversion]] |
| . /opt/modules/default/init/bash
| |
| module load quantumespresso/5.4.0
| |
| | |
| unset OMP_NUM_THREADS
| |
| | |
| export ESPRESSO_PSEUDO=$HOME/espresso_pseudo #May be redefined because of module loading
| |
| export ESPRESSO_TMPDIR=$HOME/espresso_tmp
| |
| | |
| EXE=/prod/QuantumESPRESSO/5.4.0/bin/pw.x
| |
| | |
| # Change to the work directory and copy all the necessary files to this folder
| |
| | |
| cd $TMPDIR
| |
| cp $INDIR/$INPUT $INDIR/*.UPF $TMPDIR
| |
|
| |
| # Run the job
| |
| | |
| mpijob $EXE < $INPUT > $OUTPUT
| |
| | |
| # Create a new directory in the $SCRATCH directory, each new directory for each job specifying the JobID, and copy the output to this directory
| |
| | |
| mkdir -p $SCRATCH/output_$LSB_JOBID
| |
| cp -r * $SCRATCH/output_$LSB_JOBID
| |
| | |
| # move in HOME and delete in scratch
| |
| mv $SCRATCH/output_$LSB_JOBID $HOME/.
| |
| | |
| date
| |
| </pre>
| |
| | |
| To submit to CSUC pirineus, usually for very big jobs that requires a lot of nodes and therefore longer waiting queue
| |
| <pre>
| |
| #!/bin/ksh
| |
| # specifies the name of your job
| |
| # BSUB -J jobname
| |
| #
| |
| # send standard output here
| |
| # BSUB -o quantum_espresso.log
| |
| #
| |
| # send standard error here
| |
| # BSUB -e quantum_espresso.err
| |
| #
| |
| # pick a queue
| |
| # BSUB -q parallel16
| |
| #
| |
| # pick the machine
| |
| # BSUB -R pirineus
| |
| #
| |
| # Indicate the number of cores
| |
| # BSUB -n 16
| |
| # All process should be executed in the same node
| |
| # BSUB -R span[hosts=1]
| |
| #
| |
| # Send an email notice once the job is finished
| |
| # BSUB -N -u MYEMAIL@iciq.es
| |
| | |
| INDIR=$HOME/WORKDIRECTORY # directory with your input and the .UPF files
| |
| INPUT=INPUT.in
| |
| OUTPUT=OUTPUT.out
| |
| | |
| date
| |
| | |
| # Set up the environment
| |
| . /opt/modules/default/init/bash
| |
| module load quantumespresso/5.4.0
| |
| | |
| export ESPRESSO_PSEUDO=$HOME/espresso_pseudo
| |
| export ESPRESSO_TMPDIR=$HOME/espresso_tmp
| |
| | |
| unset OMP_NUM_THREADS
| |
| ##pseudo_dir= $INDIR/ #this should be in your input file not submit script
| |
| export ESPRESSO_PSEUDO=$INDIR/
| |
| EXE=/prod/QuantumESPRESSO/5.4.0/bin/pw.x
| |
| | |
| # Change to the work directory and copy all the necessary files to this folder
| |
| | |
| cd $TMPDIR
| |
| cp $INDIR/$INPUT $INDIR/*.UPF $TMPDIR
| |
|
| |
| # Run the job
| |
| | |
| mpijob $EXE < $INPUT > $OUTPUT
| |
| | |
| # Create a new directory in the $SCRATCH directory, each new directory for each job specifying the JobID, and copy the output to this directory
| |
| | |
| mkdir -p $SCRATCH/output_$LSB_JOBID
| |
| cp -r * $SCRATCH/output_$LSB_JOBID
| |
| | |
| # move in HOME and delete in scratch
| |
| mv $SCRATCH/output_$LSB_JOBID $HOME/.
| |
| date
| |
| </pre>
| |
| Jobs are sent to CSUC queue with the command
| |
| <pre>
| |
| bsub< jobname.lsf
| |
| </pre>
| |
| Do not forget the "<" or you will see the message that your job was submitted to the default "short" queue but in reality nothing happened.
| |
| | |
| To submit a job to CESVIMA pmagerit
| |
| <pre>
| |
| #!/bin/bash
| |
| #----------------------- Start job description -----------------------
| |
| #@ total_tasks = 32
| |
| #@ wall_clock_limit = 48:00:00
| |
| #@ output = out-%j.log
| |
| #@ error = err-%j.log
| |
| #@ initialdir = /home/iciq23/iciq23336/espresso_tmp/
| |
| | |
| #------------------------ End-job description ------------------------
| |
|
| |
| #-------------------------- Start execution --------------------------
| |
|
| |
| # Run our program
| |
| module load gcc/4.7
| |
| srun /sw/openmpi/Quantum-ESPRESSO/5.1-gnu64-4.7/bin/pw.x < INPUT.in > OUTPUT.out
| |
|
| |
| #--------------------------- End execution ---------------------------
| |
| </pre>
| |
| | |
| Jobs are sent CESVIMA queue with
| |
| <pre>
| |
| jobsubmit jobname.sh
| |
| </pre>
| |
| | |
| | |
| To submit job to tekla (currently only c12m48ib and c24m128ib have QE 6.1)
| |
| | |
| <pre>
| |
| #!/bin/bash
| |
| # - Dra. Nuria's Lopez Group -
| |
| ##########################################
| |
| # SGE Parameters
| |
| ##########################################
| |
| #$ -S /bin/bash
| |
| #$ -N Si
| |
| #$ -cwd
| |
| #$ -masterq c12m48ib.q
| |
| #$ -pe c12m48ib_mpi 12
| |
| #$ -m ae
| |
| #$ -M YOUREMAIL@iciq.es
| |
| #$ -o $JOB_NAME.o$JOB_ID
| |
| #$ -e $JOB_NAME.e$JOB_ID
| |
| cat $TMP/machines.$JOB_ID >> $JOB_NAME.MACHINES.$JOB_ID
| |
| | |
| | |
| # Set up the environment
| |
| . /etc/profile.d/modules.sh
| |
| module load quantum-espresso/6.1
| |
| | |
| ##########################################
| |
| # Running Job
| |
| ##########################################
| |
| export ESPRESSO_PSEUDO=$HOME/espresso_pseudo
| |
| export ESPRESSO_TMPDIR=$HOME/espresso_tmp
| |
| | |
| export OMP_NUM_THREADS=1
| |
| | |
| echo $PWD >> $JOB_NAME.o$JOB_ID
| |
| echo $TMP >> $JOB_NAME.o$JOB_ID
| |
| | |
| time mpirun -np $NSLOTS $BIN_DIR/pw.x -input INPUT.in > OUTPUT.out
| |
| </pre>
| |