koopmans installation

68 views
Skip to first unread message

Chieh-Min

unread,
Sep 29, 2022, 12:18:01 PM9/29/22
to koopmans-users

Dear developers,


I am interested in using 'koopmans' package to calculate electron affinity and ionizing potential of some materials. However, the program is not working properly so I am looking for help. Here are what I have seen:

1. After installing the program, I tried "make tests", but the test failed when running "tests/workflows/test_singlepint.py".
2. I downloaded "ozone.json", ran the program for a while and it showed error message indicating: kcp.x -in dft_init_nspin1.cpi > dft_init_nspin1.cpo 2>&1 failed
3. I checked the output files and in "init" there is a "CRASH" file showing:

%%%%%%%%%%%%%%%%%%%%%%%
     task #         0
     from  dspev_drv  : error #         8
      diagonalization failed 
%%%%%%%%%%%%%%%%%%%%%%%

In addition, two files are attached:
make.sys
dft_init_nspin1.cpo


Chieh-Min Hsieh
PhD student
Institute for Physical and Theoretical Chemistry
University of Bremen
make.sys.txt
dft_init_nspin1.cpo.txt

Edward Linscott

unread,
Sep 29, 2022, 12:34:37 PM9/29/22
to koopmans-users
Hi Chieh-Min,

Thanks for the message and the various files.

If I look in dft_init_nspin1.cpo and scroll down to the part of the output file where we are iteratively minimising the energy, you will see that Etot = Infinity, which is clearly no good! I think that this is due to a divide-by-zero bug that I discovered yesterday, and we have been trying to it fix today. It appears when using the latest versions of the gfortran compiler with high levels of optimisation.

We are working on this as a matter of urgency, and will get back to you when a fix is implemented. If you are feeling impatient and don't want to wait, you can turn off the optimisation (in make.sys, change instances of -O3 to -O0) and then run "make kcp" in that directory to recompile kcp.x. Without optimisation the code will run slower, but hopefully the infinite energies will disappear and the calculations will behave. (Please let us know if you try this and the infinities don't go away...)

Good luck!
Edward

Edward Linscott

unread,
Oct 7, 2022, 9:59:43 AM10/7/22
to koopmans-users
Dear Chieh-Min,

We have now resolved this bug (see https://github.com/epfl-theos/koopmans-kcp/pull/7 for details).

Downloading these latest changes might not be straightforward, because we recently migrated some code into/out of submodules. If you have koopmans v1.0.0-beta3, run `git pull; cd quantum-espresso/kcp; git checkout master; git pull`. If you have an earlier version, probably the simplest way to obtain the bugfixes is to download a fresh copy of `koopmans`.

Best wishes,
Edward

Chieh-Min

unread,
Oct 13, 2022, 12:01:51 PM10/13/22
to koopmans-users
Dear Edward,

Thank you for the update. I can confirm that the infinite energy problem is solved and the program works when using only one thread. For parallel run it shows error message:

Running init/dft_init_nspin1... done
 done
   Running init/dft_init_nspin2_dummy... done
   Running init/dft_init_nspin2_dummy...   Running init/dft_init_nspin2_dummy...                                                                                                                                                              done
   Running init/dft_init_nspin2_dummy... done
 done
 done
Traceback (most recent call last):
  File "/home/chsieh/.local/bin/koopmans", line 8, in <module>
    sys.exit(main())
  File "/mnt/programs/chsieh/koopmans/src/koopmans/cli/main.py", line 27, in mai                                                                                                                                                             n
    workflow.run()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_workflow.py", line                                                                                                                                                              351, in run
    self._run()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_singlepoint.py", l                                                                                                                                                             ine 154, in _run
    dscf_workflow.run()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_workflow.py", line                                                                                                                                                              349, in run
    self._run()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_koopmans_dscf.py",                                                                                                                                                              line 228, in _run
    self.perform_initialization()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_koopmans_dscf.py",                                                                                                                                                              line 407, in perform_initialization
    self.run_calculator(calc, enforce_ss=self.parameters.fix_spin_contamination)
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_workflow.py", line                                                                                                                                                              639, in run_calculator
    self.run_calculator_single(qe_calc)
  File "/mnt/programs/chsieh/koopmans/src/koopmans/workflows/_workflow.py", line                                                                                                                                                              695, in run_calculator_single
    qe_calc.calculate()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_koopmans_cp.py",                                                                                                                                                              line 146, in calculate
    super().calculate()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_utils.py", line                                                                                                                                                              137, in calculate
    self._calculate()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_utils.py", line                                                                                                                                                              154, in _calculate
    super().calculate()
  File "/home/chsieh/.local/lib/python3.8/site-packages/ase/calculators/calculat                                                                                                                                                             or.py", line 925, in calculate
    self.read_results()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_koopmans_cp.py",                                                                                                                                                              line 366, in read_results
    self.results['lambda'] = self.read_ham_files()
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_koopmans_cp.py",                                                                                                                                                              line 356, in read_ham_files
    ham_matrix = self.read_ham_pkl_files(bare)
  File "/mnt/programs/chsieh/koopmans/src/koopmans/calculators/_koopmans_cp.py",                                                                                                                                                              line 343, in read_ham_pkl_files
    ham_matrix = pickle.load(fd)
EOFError: Ran out of input 

Or, sometimes it shows "fileexisterror".
I wonder if this is correlated to my python version (3.8)
Please let me know if I should upload some files.

Best,
Chieh-Min


edwardl...@gmail.com 在 2022年10月7日 星期五下午3:59:43 [UTC+2] 的信中寫道:

Edward Linscott

unread,
Oct 13, 2022, 12:05:51 PM10/13/22
to koopmans-users
Dear Chieh-Min,

Just to double-check, are you running this in parallel by defining PARA_PREFIX? (As described here https://koopmans-functionals.org/en/latest/running.html#parallelism)

Judging by your output, it looks like you are doing something different... 

Best wishes,
Edward

Chieh-Min

unread,
Oct 13, 2022, 12:36:10 PM10/13/22
to koopmans-users

Hi Edward,

No, I did mpirun -np -4 koopmans <inputfile>.

Best,
Chieh-Min
edwardl...@gmail.com 在 2022年10月13日 星期四下午6:05:51 [UTC+2] 的信中寫道:

Edward Linscott

unread,
Oct 14, 2022, 4:23:22 PM10/14/22
to Chieh-Min, koopmans-users
Dear Chieh-Min,

(I thought I replied to this, but it has not appeared on the google group, so I'm just sending this again just in case my message did not get through to you either)

OK, that is not the correct way to run koopmans in parallel. Please set PARA_PREFIX (i.e. in the terminal run 'export PARA_PREFIX="mpirun -np 4"') and then try again.

We will investigate to see if it is possible to make koopmans give a more helpful error message in these instances (see https://github.com/epfl-theos/koopmans/issues/190)

Best,
Edward

--
You received this message because you are subscribed to the Google Groups "koopmans-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to koopmans-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/koopmans-users/06203bf0-27ca-4f30-b4c5-b6c4cf439587n%40googlegroups.com.

Chieh-Min

unread,
Oct 17, 2022, 3:19:10 AM10/17/22
to koopmans-users
Dear Edward,

Thank you so much. It works.

Best,
Chieh-Min

edwardl...@gmail.com 在 2022年10月14日 星期五晚上10:23:22 [UTC+2] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages