10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-21 11:53:30 +01:00

Fixed ocaml compiling

This commit is contained in:
Anthony Scemama 2015-12-29 02:19:08 +01:00
parent a5fe15571f
commit 006731f327
4 changed files with 14 additions and 24 deletions

View File

@ -258,6 +258,6 @@ References
[Quantum Monte Carlo for large chemical systems: Implementing efficient strategies for petascale platforms and beyond](http://dx.doi.org/10.1002/jcc.23216)
> Anthony Scemama , Michel Caffarel , Emmanuel Oseret and William Jalby (2013), in: Journal of Computational Chemistry, 34:11(938--951)
[Quantum Monte Carlo with very large multideterminant wavefunctions](http://arxiv.org/abs/1509.03114)
[Quantum Monte Carlo with very large multideterminant wavefunctions](http://arxiv.org/abs/1510.00730)
> Anthony Scemama , Thomas Applencourt , Emmanuel Giner and Michel Caffarel (2015), in: ArXiv ePrints:arXiv:1510.00730v2 [physics.chem-ph]

View File

@ -44,7 +44,7 @@ rule clean
# put all files of PROPERTIES here
# --------------------------------
build ezfio_config/properties.config: build_properties_config | scripts/create_properties_python.py src/PROPERTIES/properties.irp.f src/PROPERTIES/properties_energy.irp.f src/PROPERTIES/properties_general.irp.f || src/IRPF90_temp/build.ninja
build ezfio_config/properties.config ocaml/Property.ml: build_properties_config | scripts/create_properties_python.py src/PROPERTIES/properties.irp.f src/PROPERTIES/properties_energy.irp.f src/PROPERTIES/properties_general.irp.f || src/IRPF90_temp/build.ninja
# EZFIO
# -----
@ -68,7 +68,7 @@ build qmcchem.tar.gz: create_archive
# Ocaml
# -----
build ocaml/generated.ninja : compile_ocaml_dep | EZFIO/Ocaml/ezfio.ml always || src/irpf90.make
build ocaml/generated.ninja : compile_ocaml_dep | EZFIO/Ocaml/ezfio.ml ocaml/Property.ml always
build ocaml/qmcchem : compile_ocaml | ocaml/generated.ninja EZFIO/Ocaml/ezfio.ml
target = qmcchem

View File

@ -17,7 +17,7 @@ OCAMLC_FLAGS=-g -warn-error A
# Flags to give to ocamlc, for example:
# OCAMLC_FLAGS=-g -warn-error A
LINK_FLAGS=-cclib '-Wl,-rpath=../lib,--enable-new-dtags'
LINK_FLAGS=
# Flags to give to the linker, for example:
# LINK_FLAGS=-cclib '-Wl,-rpath=../lib,--enable-new-dtags'
@ -34,7 +34,7 @@ rule run_ninja_ocaml
description = Finding dependencies in OCaml files
rule run_clean
command = ninja -f $GENERATED_NINJA -t clean ; rm -f $GENERATED_NINJA rm -f *.cmx *.cmi *.o .ls_md5
command = ninja -f $GENERATED_NINJA -t clean ; rm -f $GENERATED_NINJA rm -f *.cmx *.cmi *.o .ls_md5 ; ninja -t clean
pool = console
description = Cleaning directory
@ -51,7 +51,7 @@ rule ocamlc_link
description = Compiling $out (bytecode)
rule ocamlopt_link
command = ocamlfind ocamlopt $OCAMLC_FLAGS $THREAD $LINK_FLAGS $PACKAGES $SYNTAX -o $out $in
command = ocamlfind ocamlopt $OCAMLC_FLAGS $THREAD -linkpkg $PACKAGES $PACKAGES $SYNTAX -o $out $in
description = Compiling $out (native)
rule create_qptypes
@ -62,19 +62,19 @@ rule copy
command = cp $in $out
description = Copying $in to $out
build always: phony | ezfio.ml
build $GENERATED_NINJA: run_ninja_ocaml | always
build always: phony
build $GENERATED_NINJA: run_ninja_ocaml | Qptypes.ml ezfio.ml always
build ezfio.ml: copy ../EZFIO/Ocaml/ezfio.ml
build Qptypes.ml: create_qptypes qptypes_generator
build qptypes_generator: run_ninja | $GENERATED_NINJA ezfio.ml
target = qptypes_generator
build Qptypes.ml: create_qptypes qptypes_generator | ezfio.ml
build qptypes_generator.o qptypes_generator.cmx: ocamlopt qptypes_generator.ml | ezfio.ml
build qptypes_generator: ocamlopt_link qptypes_generator.cmx
build clean: run_clean
build $MAIN: run_ninja | $GENERATED_NINJA ezfio.ml Qptypes.ml
build $MAIN: run_ninja | ezfio.ml Qptypes.ml $GENERATED_NINJA
target = $MAIN
build all: run_ninja | ezfio.ml $GENERATED_NINJA Qptypes.ml
build all: run_ninja | ezfio.ml Qptypes.ml $GENERATED_NINJA
target =
default $MAIN

View File

@ -25,17 +25,7 @@ if [[ ${MD5} != ${REF} ]]
then
echo ${MD5} > ${LSMD5_FILE}
echo Finding dependencies in OCaml files
python ./ninja_ocaml.py
if [[ ! -f qptypes_generator ]]
then
ninja -f generated.ninja qptypes_generator
fi
if [[ ! -f Qptypes.ml ]]
then
./qptypes_generator
python ./ninja_ocaml.py
fi
exec python ./ninja_ocaml.py
fi