Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › DFT

How to Fix Common Quantum ESPRESSO Errors Involving Pseudopotentials and Input Files

By Freedom251 Team · · 12 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Most pw.x failures become easier to fix once you separate four classes of problem: the input parser has not understood the file, a pseudopotential cannot be found or is unsuitable, the electronic diagonalization has failed, or the executable and MPI environment have not delivered the input correctly. Preserve the complete error text and the original output first, then change one variable at a time.

Start by identifying which layer failed

Do not respond to every Quantum ESPRESSO message by changing cutoffs, mixing, or k-points. The first useful question is whether pw.x actually read the input file. A parser error occurs before the scientific calculation starts. A missing pseudopotential is a file-location or file-content problem. An inconsistent DFT message is a compatibility problem between potential files. Errors such as cdiaghg and rdiaghg occur later, during diagonalization, and have several possible causes. A shared-library or MPI-redirection failure can happen before the program reads anything.

As an Amazon Associate I earn from qualifying purchases.

What you see Most useful first check Do not assume
error while reading data or a namelist read error Inspect the exact input text, encoding, line endings, namelist order, and variable spelling. That the line printed in the message is the only defective line.
Pseudopotential file not found Resolve pseudo_dir and compare every filename in ATOMIC_SPECIES character by character. That a file for the same element, with a similar name, will be accepted.
inconsistent DFT error Read the DFT flavor recorded in every UPF file and replace mismatched potentials. That setting input_dft is a safe way to make incompatible files consistent.
error in cdiaghg or rdiaghg Check geometry and potentials, then try a more robust diagonalization algorithm as a diagnostic. That the pseudopotential is automatically the cause.
error while loading shared libraries or no input consumption in MPI Check the executable’s runtime libraries and pass input explicitly with -i. That editing the namelist will fix a program that never opened it.

Save the complete standard output and standard error, the input file, the command used to launch the job, the Quantum ESPRESSO version, and the machine or MPI environment. This record lets you distinguish a reproducible input defect from a platform-dependent failure.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix pw.x read and namelist errors

Quantum ESPRESSO’s current pw.x input reference (version 7.5 documentation) requires plain ASCII text and a specific namelist order. A file can look normal in an editor and still contain a tab, a carriage return, a typographic quotation mark, or another byte that the Fortran input reader does not expect. The official warning is: “BEWARE: TABS, CRLF, ANY OTHER STRANGE CHARACTER, ARE A SOURCES OF TROUBLE USE ONLY PLAIN ASCII TEXT FILES (CHECK THE FILE TYPE WITH UNIX COMMAND "file")”.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Check the file before changing the calculation

  1. Confirm that the run used the file you think it used. Print the command from the job script and verify the path and filename. An empty or wrong file can produce a generic read failure.
  2. Check size and type. Run ls -l input.in and file input.in on a preserved copy. The file result should identify ordinary ASCII text rather than a document format or a file with unusual encoding.
  3. Inspect hidden characters. Display the file with a tool that makes tabs and carriage returns visible, or inspect a small copy in a hex-aware editor. Look specifically for ^M (CRLF endings), tabs in places where values are expected, non-breaking spaces, and curly quotation marks.
  4. Check the final newline. Add a normal line ending at the end of the file if it is missing. Keep the original unchanged so you can compare it later.
  5. Check names and spelling against the input reference. Namelist variables must be spelled exactly as documented. A misspelled variable can cause only a generic “Error while reading namelist” message.
  6. Check namelist order and terminators. Keep the namelists in the order required by the reference and ensure each one ends correctly before the next card begins. Do not place card data inside a namelist.
  7. Check array indices and dimensions. An index beyond the declared dimension is an input error even when the surrounding syntax looks valid.

When a file was created on another operating system, preserve it and convert a copy. For example, after confirming the original, use an appropriate conversion utility or iconv to produce plain ASCII text. Do not blindly run a conversion that silently replaces scientific symbols or quotation marks; inspect the result and rerun file.

Use card syntax exactly

Cards such as ATOMIC_POSITIONS, K_POINTS, and CELL_PARAMETERS are not namelist assignments. The input reference’s examples put a space between a card name and its option, for example ATOMIC_POSITIONS (bohr). Copy the documented spelling, punctuation, and ordering. A parser failure can be caused by one malformed card even if the namelists above it are correct.

Why the displayed line can mislead

Fortran compilers often report the namelist in which reading stopped, not the exact character that caused the failure. A stray comma, an unmatched quote, a malformed logical value, or a previous line with a hidden carriage return may be the real cause. Compare the input with a known-good minimal file, remove recently added blocks, and add them back one at a time. Keep the physical and chemical model unchanged until the parser accepts the file.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Resolve a pseudopotential file-not-found error

Every species listed in ATOMIC_SPECIES has a pseudopotential filename. Quantum ESPRESSO must find that exact filename in the directory selected by pseudo_dir. The documented default is $ESPRESSO_PSEUDO when that environment variable is set; otherwise it is $HOME/espresso/pseudo/. Consequently, a job can work interactively and fail in a batch queue if the environment or working directory differs.

Verify the path and names

  1. Read the input rows. For each species, copy the filename exactly as it appears after the mass and element label in ATOMIC_SPECIES. Case, punctuation, compression suffixes, and every character matter.
  2. Determine the effective directory. If the input sets pseudo_dir, resolve that path as the job sees it. Otherwise check whether ESPRESSO_PSEUDO is exported in the batch environment. If it is not, check $HOME/espresso/pseudo/.
  3. List the directory from inside the job. Use pwd and ls -l in the same script or shell context that launches pw.x. Relative paths can point somewhere different when a scheduler changes the working directory.
  4. Compare names literally. Use a filename comparison rather than relying on visual similarity. A file named Si.UPF is not the same as Si.upf on a case-sensitive filesystem.
  5. Check readability. Confirm that the job account can read the file and that it is not an empty, truncated, or unrelated download. The UPF header should be readable text, not an HTML error page.

Do not solve a path error by renaming files at random. Either correct pseudo_dir, place the required files in the intended directory, or change the input filename to the verified file. Record the final mapping from each chemical species to its potential.

Confirm format and calculation suitability

The input description assumes the newer UPF format. Quantum ESPRESSO supports PAW, ultrasoft, and separable norm-conserving potentials through its unified UPF format, while some calculation types impose additional restrictions. A potential that is readable is not necessarily valid for every workflow. Check the intended calculation against the potential family and the file’s stated valence configuration.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Do not substitute an arbitrary potential merely because it has the right element symbol. Compare the exchange-correlation flavor, element and valence configuration, potential family, file readability, and evidence that it has been tested for systems like yours.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix an “inconsistent DFT error”

Quantum ESPRESSO reads the DFT flavor recorded in the pseudopotential files and checks that the set is consistent. As a rule, all potentials in one calculation should have been generated with the same DFT flavor used by the calculation. Mixing, for example, files generated with different exchange-correlation choices can trigger an inconsistent DFT error or undermine the meaning of the result even if the run proceeds.

Inspect and replace, rather than override

  1. Identify every potential. Include all species, including elements introduced by an adsorbate, defect, dopant, or auxiliary calculation.
  2. Read the metadata. UPF headers and metadata identify the generating functional or DFT flavor. Record the value for each file.
  3. Choose one compatible set. Replace outliers with potentials generated using the same flavor and an appropriate generation recipe. Keep the family and valence choices scientifically defensible for the calculation.
  4. Regenerate the input mapping. Recheck every ATOMIC_SPECIES filename and the effective pseudo_dir after replacing files.
  5. Only then rerun. Preserve the failed output so you can show exactly which metadata caused the mismatch.

The troubleshooting guide says that input_dft can force a functional only “at your own risk.” It is not a routine repair for mismatched pseudopotentials. Overriding the input label does not regenerate the files or make their underlying approximations compatible.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Choose and validate pseudopotentials deliberately

The official pseudopotential overview identifies three supported families: PAW, ultrasoft, and norm-conserving. The best choice depends on the calculation, not on the element name alone. Some examples documented by Quantum ESPRESSO include certain meta-GGA calculations, Gamma-only phonon calculations, and third-order energy-derivative calculations that require norm-conserving potentials; the overview also notes that CP does not yet support PAW. These are calculation-specific restrictions, not a universal ranking of the three families.

Compare potential sets on the axes that matter

Selection axis Questions to answer
DFT flavor Were all files generated with the same exchange-correlation flavor required by the calculation?
Potential family Does the intended module or method support PAW, ultrasoft, or norm-conserving files in this case?
Format Is each file in a readable UPF format and intact?
Valence configuration Does the valence treatment include the states needed for the chemistry, oxidation states, magnetism, or bonding being modeled?
Validation evidence Has the set been tested on simple systems and compared with an appropriate reference for the intended use?

The Quantum ESPRESSO pseudopotential page identifies SSSP as a resource of verified potentials maintained by THEOS and MARVEL on Materials Cloud. It also says to test files on simple systems before serious calculations and to credit the pseudopotential authors. “always test the PPs on simple test systems before proceeding to serious calculations” is guidance for validation, not a guarantee that one collection suits every element or method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical validation sequence

  1. Run a small, well-understood cell containing each new element or a representative compound.
  2. Confirm that the file loads, the DFT metadata is consistent, and the expected valence charge is reported.
  3. Check basic convergence behavior with respect to the relevant wavefunction and charge-density cutoffs.
  4. Compare structural, magnetic, or energetic behavior with a trusted reference appropriate to the system.
  5. Only after these checks, use the set in a larger supercell, phonon calculation, molecular-dynamics run, or production relaxation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose cdiaghg and rdiaghg diagonalization failures

cdiaghg and rdiaghg report a failure in an eigensolver or subspace diagonalization step. The official troubleshooting guide lists several possibilities: bad atomic positions or crystal or supercell data, a problematic pseudopotential such as one with ghost states or an ultrasoft charge-density issue, failure of the subspace algorithm, and buggy or incompatible numerical libraries. The message does not identify one cause by itself.

Check geometry and structural data first

  • Verify that every atom has a valid species label and coordinates.
  • Check units on ATOMIC_POSITIONS, CELL_PARAMETERS, and lattice constants.
  • Look for overlapping atoms, an accidental zero or near-zero cell vector, impossible fractional coordinates, or a malformed supercell.
  • Confirm that the number of coordinates matches nat and that species labels match ntyp.
  • For a restarted calculation, ensure that the geometry in the input is compatible with the saved data.

Use a robust algorithm as a diagnostic

Try conjugate-gradient diagonalization by setting diagonalization='cg'. The guide describes it as slower but robust. If available in the documented workflow, paro is another option to investigate. A successful run with a different algorithm does not prove that the original potential or geometry was wrong; it tells you that the failure is sensitive to the eigensolver path. Change one setting, keep the rest fixed, and compare the output.

Investigate potentials and numerical libraries

If the error persists, test the same potential on a simple structure. Pay particular attention to suspected ghost states and to ultrasoft charge-density behavior. Then compare runs across machines or builds. A failure that changes with a small parameter adjustment, compiler, BLAS/LAPACK implementation, or MPI layout may point to numerical-library or reproducibility issues rather than a chemical input defect. Keep the executable, library versions, processor count, and input in your record so the comparison is meaningful.

Separate execution and MPI problems from input problems

“Error while loading shared libraries”

This message indicates that the operating system could not load a library required by the executable. It is a machine or environment configuration problem, not evidence of malformed namelist syntax. Check the library search path, module environment, executable build, and scheduler environment used at runtime. A binary that starts only in an interactive shell may fail in a batch job because the required modules or environment variables were not exported.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When MPI never appears to consume the input

Some parallel launchers do not propagate shell redirection to every process as expected. If the program appears to start without reading the file, pass the input explicitly with the command-line form pw.x -i input.in (or the equivalent filename syntax supported by your build) rather than relying on < input.in. Confirm in the output that the expected title, cell, species, and atom count were read. Do not edit dozens of namelist settings until you know the executable opened the intended file.

Recover from restart and data-file errors

“Cannot recover or error reading recover file”

A recovery-file error can mean that the previous job left corrupted files or never produced the restart data the new job expects. The documented remedy is to restart from scratch. Before deleting anything, copy the old output and recovery directory if you need it for diagnosis. Starting over is safer than treating potentially corrupt data as a valid continuation.

Phonon data-file read failures

A phonon read error can arise from incomplete or bad data, or from data written by an incompatible code version. Check that the producing calculation completed, that all expected files are present and readable, and that the phonon and electronic-structure programs are compatible. If the data cannot be trusted, regenerate it rather than patching individual files.

A controlled troubleshooting workflow

  1. Freeze the evidence. Copy the input, output, error stream, job script, executable version, and environment information.
  2. Classify the failure. Decide whether it is parser, file path, DFT consistency, diagonalization, loader/MPI, or restart related.
  3. Make the smallest relevant check. For a parser error, inspect encoding and order. For a missing file, resolve pseudo_dir. For DFT inconsistency, inspect metadata. For diagonalization, check geometry and use a diagnostic algorithm.
  4. Change one thing. Keep a short log of the exact edit and its result. Multiple simultaneous changes prevent you from identifying the cause.
  5. Test on a minimal case. Reduce the system only enough to isolate the failing potential, geometry, or execution path; do not treat a reduced calculation as proof that production settings are correct.
  6. Restore production settings deliberately. Once the cause is understood, reintroduce the original cell, k-point mesh, cutoffs, parallel layout, and restart mode one at a time.

Final checklist before rerunning pw.x

  • The input is non-empty, plain ASCII, free of tabs and CRLF or other unusual characters, and ends with a newline.
  • Namelists, cards, variable names, array indices, and card options follow the current input reference.
  • pseudo_dir resolves to the directory used by the actual job, not merely by an interactive shell.
  • Every ATOMIC_SPECIES filename exists, is readable, and is a valid UPF file.
  • All pseudopotentials use a compatible DFT flavor and a supported family for the intended calculation.
  • Atomic positions, cell data, species counts, units, and restart files are internally consistent.
  • If diagonalization failed, geometry and potential tests were performed before blaming the eigensolver.
  • If MPI or the loader failed, the input was passed explicitly and the runtime libraries were checked.
  • Old output and recovery data were preserved before a clean restart.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DFTHPC troubleshootingpseudopotentialspw.xQuantum ESPRESSO

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.