FoX for NWChem

52 views
Skip to first unread message

Peter Murray-Rust

unread,
Nov 2, 2011, 11:50:01 PM11/2/11
to fox-d...@googlegroups.com, DeJong, Wibe A
We are about to start FoXifying NWChem. I first attach Bert deJong's successful recipe for linking in FoX

---------- Forwarded message ----------
From: DeJong, Wibe A <Wibe....@pnnl.gov>
Date: Tue, Nov 1, 2011 at 9:38 PM


Adding FoX to NWChem. Easiest approach in short term:

 

1.       Get FoX

2.       Do configure and make

3.       In nwchem-6.0/src/config/makefile.h add FoX pieces:

 

ifdef SLURM

  EXTRA_LIBS += $(SLURMOPT)

endif

 

# FoX library

  LIB_INCLUDES += -I/home/bert/FoX-4.1.0/objs/finclude

  CORE_LIBS += /home/bert/FoX-4.1.0/objs/lib/*.a

 

       where the path needs to be updated to point to your FoX location

 

or

 

ifdef SLURM

  EXTRA_LIBS += $(SLURMOPT)

endif

 

# FoX library

  LIB_INCLUDES += -I$(FOX_ROOT)/objs/finclude

  CORE_LIBS += $(FOX_ROOT)/objs/lib/*.a

 

       Where you set the environment variable FOX_ROOT to point to the appropriate FoX location.

4.       make cc=gcc FC=gfortran link     (will link in FoX though it is not used).

 

Good starting testcase: src/geom/geom_print_ecce.F where instead of printing to the ecce.out file we can write to store a geometry using the FoX geometry cml capability http://www1.gly.bris.ac.uk/~walker/FoX/DoX/FoX_wcml.html .

 

Bert

 

--------------------------------


Are there any good examples of simple FoX , both WCML and WXML? I couldn't easily find them in FoXDoX?

Are there any points of strategy when tackling a large distrib like NWChem? (I'm thinking of alternative returns from subroutines, etc.)

Do you have actual dictionaries for any of your codes? If so is there any compile time validation or test time validation of dictRefs?

Do you have any units dictionaries?

Do any of you throw errors if dictionary entries don't exist? I suspect not as URL resolution in FORTRAN is probably a bit hairy?


I am very excited about NWChem as it will be another example of how to put FoX in the code rather than parse the output file.

P




--
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069

Andrew Walker

unread,
Nov 3, 2011, 5:46:05 AM11/3/11
to fox-d...@googlegroups.com, DeJong, Wibe A
Hi,

On 3 Nov 2011, at 03:50, Peter Murray-Rust wrote:

> Adding FoX to NWChem. Easiest approach in short term:
>

> Are there any good examples of simple FoX , both WCML and WXML? I couldn't easily find them in FoXDoX?

Not online but you can freely mix calls to WCML and WXML to make a mixed document. We did this in Gulp to handle shell positions (for atomic polarisation). The trick is to do as much as possible in WCML and take care that the WXML calls won't try to produce ill-formed XML (which will cause a run-time crash from FoX's output checking stuff). You can insert child elements using WXML whenever you have a cmlStartX / cmlEndX pair of subroutine calls, but not when you have a cmlAddX call. The xmlf_t variable can be shared.

>
> Are there any points of strategy when tackling a large distrib like NWChem? (I'm thinking of alternative returns from subroutines, etc.)

Group *all* of the XML writing stuff together into one or more (fortran) modules which contains subroutines that mirror the main output subroutines from NWChem and produce well-formed snippets of CML. Call these subroutines (with what you want to output as arguments) from right next to the print statements you want to echo in the XML file. Do not mix xml output code with the chemistry - it's will get broken the first time a new feature is added to that part of the code. Give all XML output subroutines an option to silently return without producing any output and use this to turn off XML output on non rank-0 MPI processes.

> Do you have actual dictionaries for any of your codes? If so is there any compile time validation or test time validation of dictRefs?

We did have some. The latest are (I think) embedded within the ccVis code:

https://github.com/tow/ccviz

There is no validation in FoX - it would be hard to do and it seemed easer to write the CML document with dictRefs then fill in the dictionary later. Didn't somebody have a tool to list undefined dictionary references at some point?

> Do you have any units dictionaries?

No.

> Do any of you throw errors if dictionary entries don't exist? I suspect not as URL resolution in FORTRAN is probably a bit hairy?

No - see above.

Andrew


> --
> You received this message because you are subscribed to the Google Groups "FoX-discuss" group.
> To post to this group, send email to fox-d...@googlegroups.com.
> To unsubscribe from this group, send email to fox-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fox-discuss?hl=en.

--

Andrew Walker <andrew...@bris.ac.uk>
http://www1.gly.bris.ac.uk/~walker/

Department of Earth Sciences,
University of Bristol,
Wills Memorial Building,
Queen’s Road,
Bristol, BS8 1RJ, UK

Reply all
Reply to author
Forward
0 new messages