Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - filipr

Pages: [1] 2 3 4
1
In general the performance of QuantumATK should be almost equivalent on Linux and Windows. However for certain MPI parallel algorithms we rely on third party libraries whose newest and most performant versions are not available on Windows and we therefore have to fall back on an older, less performant, version.

QuantumATK calculations are computationally demanding and will thus benefit from running on powerful workstations, servers or HPC compute clusters. The HPC infrastructure is almost exclusively designed around the Linux environment.

So, it is my recommendation that you run your QuantumATK calculations on a powerful Linux machine or compute cluster. I think it will have better performance than an equivalent Windows machine, but we haven't made any rigorous benchmarks to back up this claim. You can still use the GUI desktop app on e.g. a Windows laptop just fine and just submit your calculations to be run on a Linux machine.

For system requirements and supported OS and distributions see https://docs.quantumatk.com/faq/faq_technical_hardware_for_u2022_12.html

2
General Questions and Answers / Re: I-V curve
« on: May 17, 2023, 14:48 »
There is an automated workflow for this, see the tutorial: https://docs.quantumatk.com/tutorials/ivcharacteristics/ivcharacteristics.html

3
General Questions and Answers / Re: Error
« on: May 12, 2023, 15:01 »
Intel MPI exit code 9 means that the MPI process has recieved the SIGKILL signal and has been stopped by the Operating System.

This is usually done by the job scheduling system if your process uses more memory or time than it is allowed to. If you have configured your submission script (and job scheduling system) correctly you should (or could) receive and email explaining why the job scheduling system killed your job.

For advice on how to reduce memory consumption check out: https://docs.quantumatk.com/technicalnotes/advanced_performance/advanced_performance.html

4
The dapl async_event error could either be 1) a bug or incompatibility in Intel MPI 2) a wrongly configured Intel MPI or 3) a wrongly configured network infrastructure on the cluster.

If you can run other MPI software on the cluster, we can disregard (3).

QuantumATK 2019.12 ships Intel MPI 2018 update 1. For (2) please read the Intel MPI user guide and documentation which you can find here. I suggest reaching out to your cluster administrator to get advice on how to configure Intel MPI to use the cluster network infrastructure.

If you believe that Intel MPI 2018 update 1 is incompatible with your cluster it is possible to use a newer version when running QuantumATK. If your cluster already has a new version of Intel MPI installed in a module system you can simply put e.g.:

Code
module load intel-mpi

in your submission script. If Intel MPI is not installed, you can install it yourself by downloading the oneAPI installer from Intel's website. Then in your submission script put:

Code
source /path/to/intel/oneapi/mpi/latest/env/mpivars.sh

You can verify that it find the correct version by executing

Code
mpirun --version

Be sure that your submission script uses the mpiexec/mpirun executable of the new version of Intel MPI (which should now be in your PATH) and not the hardcoded path to the one in QuantumATK/libexec/mpiexec.hydra. If you use a job scheduler you may have to use the MPI launcher it provides, e.g. for SLURM use srun.

Now, this will still not work out of the box. The reason is that the QuantumATK/bin/atkpython file is actually not an executable but a launcher script, which sets up environment variables so that third party libraries like Intel MPI can be found. You can open it in a text editor if you are curious. Importantly in this case is that it prepends the path to the QuantumATK/lib directory to LD_LIBRARY_PATH. When the program launches it will look for the mpi library (libmpi.so) in the directories in LD_LIBRARY_PATH in the order they appear. It will then always find the 2018.1 version in QuantumATK/lib. In order to force it to use the newer version of Intel MPI you thus have to delete or rename all files starting with "libmpi" in the QuantumATK/lib directory. That way it will end up instead finding the newest version in e.g. /path/to/intel/oneapi/mpi/latest/lib.

You can verify that an atkpython run uses the correct Intel MPI version by setting:

Code
export I_MPI_DEBUG=5

in your submission script. When the program starts it should output debug log messages from Intel MPI, including the version of the library used.

Starting from QuantumATK 2022.12 we now ship Intel MPI in a separate folder and append, instead of prepend, the directory to LD_LIBRARY_PATH. This makes it easier for users to use their own installation of Intel MPI without them having to delete/rename files.

5
Dear Filipr,
What to do when we have a gas adsorbed on a periodic system?
How shall we perform the HOMO-LUMO calculation in such case?

  • You would have to ensure that the size of the periodic system is repeated enough times so that the molecule does not artificially interact with its periodic images in the neighboring cells. You can either just guesstimate the size/number of repeats or do a convergence study if you want to be more thorough.
  • You can use a k-point sampling for the ground state calculation, of if the system is big enough it should be sufficient with a Gamma only calculation
  • Then you calculate the BandStructure of the system.
  • You need to find the band indices (= quantum numbers) of the states corresponding to the HOMO and LUMO on the molecule. Localized states on the molecule will typically have zero dispersion (if you made the system big enough), so they appear as a flat horizontal line in the band structure spectrum. It can be a bit hard to identify these on a spectrum where all the bands have been folded in due to the repeats of the substrate unit cell.
  • Another approach is to calculate the Eigenvalues (or just use BandStructure) at the Gamma point and select a few states around the Fermi level , then calculate the BlochState for those and visually inspect whether they are localized on the molecule or not.

6
See https://docs.quantumatk.com/manual/Types/Eigenstate/Eigenstate.html for reference.

Answers to your specific questions:

  • "Quantum number" is in this context simply the index of the state you want to calculate and plot. The index 0 corresponds to the state with the lowest energy.
  • You typically don't have to check any of the projection settings - only if you know you have to
  • "Atom indices" is a subsetting under "Projection Selector", so unless you want to project the Hamiltonian on a subsystem, you also should leave this blank
  • Same as above

So just put in a number in "Quantum number", leave rest blank and you should be fine. Note that "Eigenstate" is for molecules only - if you want to visualize the eigenstates of an extended, periodic system you should use "Bloch state" instead.

7
General Questions and Answers / Re: Charge Density Difference
« on: March 31, 2023, 10:00 »
If I understand what you mean by charge density difference, you need to split it up in three different calculations: 1) Full system, e.g. surface + molecule 2) only surface 3) only molecule. It is important that you use the same unit cell and grid sampling for each calculation, even the small molecule. To set a specific grid sampling you can use: density_mesh_cutoff=GridSampling(Na, Nb, Nc). If you do the calculation of the full system you can read off the grid sampling used in the log output or using e.g. density.shape() in Python.

Calculate the electron density for each system, then you can calculate the difference as:

Code
density_full = nlread('calculation_surface+molecule.hdf5', ElectronDensity)[0]
density_surface = nlread('calculation_surface.hdf5', ElectronDensity)[0]
density_molecule = nlread('calculation_molecule.hdf5', ElectronDensity)[0]

charge_difference_density = density_full - density_surface - density_molecule
nlsave('charge_difference_density.hdf5', charge_difference_density)

The charge_difference_density variable will contain a generic GridValues object that can be opened and viewed in NanoLab.

8
First try to run the script in serial from the terminal like so:

Code
export I_MPI_DEBUG=5
/path/to/quantumatk/bin/atkpython your_script.py

if that works, then try to run in parallel like so:

Code
export I_MPI_DEBUG=5
/path/to/quantumatk/libexec/mpiexec.hydra -n <#PROCS> /path/to/quantumatk/bin/atkpython your_script.py

where <#PROCS> are the number of MPI processes you want to use.

If any of these fail, please report back any output or error messages that are shown.

9
What do you mean by "not run"? How do you run it? and does it show any error messages?

10
General Questions and Answers / Re: Charge Density Difference
« on: December 12, 2022, 11:40 »
If I understand what you mean by charge density difference, you need to split it up in three different calculations: 1) Full system, e.g. surface + molecule 2) only surface 3) only molecule. It is important that you use the same unit cell and grid sampling for each calculation, even the small molecule. To set a specific grid sampling you can use: density_mesh_cutoff=GridSampling(Na, Nb, Nc). If you do the calculation of the full system you can read off the grid sampling used in the log output or using e.g. density.shape() in Python.

Calculate the electron density for each system, then you can calculate the difference as:

Code
density_full = nlread('calculation_surface+molecule.hdf5', ElectronDensity)[0]
density_surface = nlread('calculation_surface.hdf5', ElectronDensity)[0]
density_molecule = nlread('calculation_molecule.hdf5', ElectronDensity)[0]

charge_difference_density = density_full - density_surface - density_molecule
nlsave('charge_difference_density.hdf5', charge_difference_density)

The charge_difference_density variable will contain a generic GridValues object that can be opened and viewed in NanoLab.

11
General Questions and Answers / Re: ERROR
« on: December 7, 2022, 13:50 »
You calculate the total energy of the configuration, but with different distances between the ribbon and molecule. The most optimal distance is the one that minimizes the total energy.

This can be done in a Pythons script with a loop over distances, for example:

Code
distances = numpy.linspace(1.0, 3.0, 11) * Angstrom

for distance in distances:
    cartesian_coordinates[molecule_indices, 1] += distance

    configuration = BulkConfiguration(..., cartesian_coordinates=cartesian_coordinates)

    total_energy_analysis = TotalEnergy(configuration)
    nlsave(total_energy_analysis, ...)

Of course you have to write the actual script yourself so that it actually works. You can also do it by setting up multiple configurations in the Builder in the GUI and manually adjust the distance using the coordinate tools and submit each job separately if you're not experienced with Python programming.

12
General Questions and Answers / Re: ERROR
« on: December 6, 2022, 09:12 »
Geometry optimization is really hard and time consuming for all but the simplest systems due to the very high number of degrees of freedom. You need very high numerical parameters (basis set, k-point sampling, density mesh cutoff) in order for it to converge smoothly, as you otherwise get random numerical errors that are on the order of magnitude as the energy differences and forces involved in the optimization steps.

The first step before doing geometry optimization is always to first determine the numerical parameters to use by doing a convergence study. This means doing repeatet DFT calculations of energy, forces and stress for the initial structure at increasing basis set, k-point sampling and density mesh cutoff (vary each independently) until the energy/forces/stress change less than at least an order of magnitude lower than the tolerances you want to use for the geometry optimization. Having found the optimal numerical parameters you can then proceed to use those for the geometry optimization.

However, in many cases, especially for larger composite system, geometry optimization is simply not possible in a single "hit the button and run" approach. Either it simply takes too long time or it gets stuck jumping between the many local minima. In these situations it is better to break the optimization into steps.

For instance in your case you can break the optimization into 4 steps, each done as separate calculations/jobs:

  • Optimize the Stanene nanoribbon geometry alone by running a geometry optimization (atoms + unit cell along periodic direction) of a single unit cell
  • Optimize the molecule alone without the nanoribbin in a separate calculation
  • Find the optimimal nanoribbon <-> molecule distance by simply calculating the total energy of the nanoribbon + molecule system at different distances, fitting some polynomial to the results and finding the minimum
  • Relax the atoms in the molecule and in the nanoribbon close to the molecule with a regular geometry optimization where you fix the unit cell and most atoms in the nanoribbon. The more atoms and thus degrees of freedom you fix, the faster and more stable the geometry optimization will be

In this way you trade computational load with more manual work, but the above approach should work in most cases. Also you can find the optimum numerical parameters from doing calculations on the sub-parts: nanoribbon unit cell and molecule separately - this will be much, much faster than trying to do so for the entire system.

13
General Questions and Answers / Re: ERROR
« on: December 5, 2022, 11:17 »
I can't try out your script as copying from a PDF doesn't work for me. It would have been more useful if you simply attached the original .py file.

I'm not an expert in all kinds of materials, but my immediate intuition tells me that this Tin-Hydrogen-Iron compound is metallic (also it only really makes sense to do spin-polarized calculations for metallic systems). For metallic systems you should use a sizeable smearing, but you use 0.01 eV which is very low and only useful for ungapped systems. So try to change the smearing/electron temperature to the default value of 1000K, which is suitable for most metals. This should improve convergence. If you think this influences the results too much you have to use a denser k-point sampling. See also: https://docs.quantumatk.com/manual/technicalnotes/occupation_methods/occupation_methods.html

14
General Questions and Answers / Re: Error - Exit Code : 9
« on: November 22, 2022, 13:56 »
MPI exit code 9 means that the program recieved the SIGKILL event, see https://www.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top/troubleshooting/error-message-bad-termination.html. This means that the process was killed by an outside process like the job scheduler or the OS. The reason is typically that the program used more memory than it was allowed or that a runtime limit was exceeded. Be sure to submit the job in way so that the job scheduler sends you an email when it aborts the program. Such an email will typically state the reason for why the job was killed.

15
General Questions and Answers / Re: Simulating protein
« on: October 31, 2022, 14:28 »
Quote
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Killed (signal 9)

Means that your calculation was killed = stopped by an external process or user. This is in most cases the job scheduling system (Torque, Slurm, SGE, ...) on the cluster that kills the job if it takes longer than the allowed time, uses more memory than allowed or requested or uses more processes than there are cores on the node. If the job scheduler is configured correctly and you configured your submission script for it it should send you an email with clarification of why the job was killed.

If the job used too much memory you will have to run on machines with more memory or try to get the calculation to consume less or distribute the memory use over more nodes (physical machines). This can be done in a multitude of ways:

  • Use more OpenMP threads
  • Use more nodes and thus more MPI processes
  • Increase use of multilevel parallelism where possible (processes_per_<...>)
  • Reduce the computational load by decreasing system size or computational parameters

See also:

Pages: [1] 2 3 4