SEARCH
TOOLBOX
LANGUAGES
Forum Menu

Maximum number of constraints in CDFT

From NWChem

Viewed 641 times, With a total of 9 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 3
Posts 9
Hi,

The default maximum number of constraints in CDFT is 10. Is it possible to increase it to some larger value by simply changing the max_constr? Thanks


Best,

JT

  • Bert Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Forum Vet
Threads 5
Posts 576
You can update max_constr in file cdft.fh in src/nwdft/include . After updating you will need to rekompile the dft directory, i.e. in src nwdft do a make (with all the options you normally use to kompile). Then, follow this by a "make link" at src to build the binary.


Bert
Edited On 9:42:23 AM PDT - Mon, Jul 23rd 2012 by Bert

Clicked A Few Times
Threads 3
Posts 9
thanks!

Clicked A Few Times
Threads 3
Posts 9
Hi bert,

I made the suggested changes and recompiled everything, but it did not work. I got error messages like " Numerical result out of range" and "Segmentation Violation error, status=: 11". Any further suggestions?

best

JT

  • Bert Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Forum Vet
Threads 5
Posts 576
Hmmm, the change in the include file might not have triggered a remake of all the files that use this file. You may have to:

in src/nwdft do a "make clean"
in src/nwdft do a make
in src/ do a make link

If this doesn't help, I strongly recommend doing a "make clean" in src/ and rebuild NWChem.

Bert


Quote:Jtravers Jul 24th 3:00 pm
Hi bert,

I made the suggested changes and recompiled everything, but it did not work. I got error messages like " Numerical result out of range" and "Segmentation Violation error, status=: 11". Any further suggestions?

best

JT

Clicked A Few Times
Threads 3
Posts 9
Hi Bert,

I did rebuild everything as you suggested. It still did not work! I really did not find other parameters that control this.

Best,

JT

Forum Regular
Threads 1
Posts 268
Bug Fix
JT
Please edit line 454 of $NWCHEM_TOP/src/nwdft/scf_dft/dft_scf.F and change it from

        if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr,

to

        if (.not.MA_alloc_Get(MT_DBL,max(nfock,nconstr)*nconstr,

Clicked A Few Times
Threads 3
Posts 9
Hi Edoapra,

Thank you for the suggestion. In dft_scf.F, both line 454 and line 457 contain
" if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr, "

if I only change line 454 and recompile the code, it does not work. But if I change both, it seems the code is working (I will need to do a few tests). Please let me know if I am on the right track. thanks!

Best,

JT



Quote:Edoapra Jul 27th 9:56 pm
JT
Please edit line 454 of $NWCHEM_TOP/src/nwdft/scf_dft/dft_scf.F and change it from

        if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr,

to

        if (.not.MA_alloc_Get(MT_DBL,max(nfock,nconstr)*nconstr,[/quote]

Forum Regular
Threads 1
Posts 268
457 is right line number
JT,
You spotted the right line to change. 457 is the right line and not 454.
Sorry for the wrong information.
Please let me know if this fixes your issue.
Cheers, Edo

Clicked A Few Times
Threads 3
Posts 9
Hi
Quote:Edoapra Jul 30th 3:59 pm
JT,
You spotted the right line to change. 457 is the right line and not 454.
Sorry for the wrong information.
Please let me know if this fixes your issue.
Cheers, Edo




Hi Edo

  Actually my tests showed that I have to change both lines (454 and 457) to make it work. Any further suggestions?

Best

JT


Forum >> NWChem's corner >> NWChem functionality



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC