From 96a16cc46ee75afccc14507128c8c479c3674946 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 11 Jun 2015 16:25:35 +0200 Subject: [PATCH 1/7] Little changes --- configure.py => configure | 20 ++++++++---- ocaml/.gitignore | 2 ++ ocaml/Makefile | 2 +- ocaml/Qpackage.ml | 6 +++- scripts/compilation/qp_create_ninja.py | 4 +-- src/CID_selected/README.rst | 42 +++++++++++++------------- src/CISD_selected/README.rst | 42 +++++++++++++------------- src/Hartree_Fock/EZFIO.cfg | 5 --- 8 files changed, 66 insertions(+), 57 deletions(-) rename configure.py => configure (96%) diff --git a/configure.py b/configure similarity index 96% rename from configure.py rename to configure index 76410b1a..7b559555 100755 --- a/configure.py +++ b/configure @@ -4,14 +4,22 @@ Usage: configure (--production | --development) + Options: - config_file A config file will all the information for the compilation - (Fortran Compiler, FLag, ...) - --production You cannot compile only one module with this flag. - but the compilation will be lighting fast + + config_file A config file with all the information for the compilation + Example config_files are given in config/ + + --production You can only compile all the modules with this flag, + but the compilation will be lighting fast + --development It will create a build.ninja for each directory - who containt a binary, than you can compile then - individualy if you want + who contains a binary, than you can compile then + individualy if you want + +Example: + + ./configure config/gfortran.cfg --production """ diff --git a/ocaml/.gitignore b/ocaml/.gitignore index e63d3ecc..cbd77939 100644 --- a/ocaml/.gitignore +++ b/ocaml/.gitignore @@ -5,6 +5,7 @@ qptypes_generator.byte _build qp_basis_clean.native qp_create_ezfio_from_xyz.native +qp_edit.native qp_print.native qp_run.native qp_set_ddci.native @@ -32,6 +33,7 @@ test_molecule test_point3d qp_basis_clean qp_create_ezfio_from_xyz +qp_edit qp_print qp_run qp_set_ddci diff --git a/ocaml/Makefile b/ocaml/Makefile index 6bf8d81b..53a750b6 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -72,7 +72,7 @@ Qptypes.ml: qptypes_generator.byte ./qptypes_generator.byte > Qptypes.ml ${QP_ROOT}/install/EZFIO/Ocaml/ezfio.ml: - $(MAKE) -C ${QP_ROOT}/install/src ezfio + $(NINJA) -C ${QP_ROOT}/install/EZFIO Input_auto_generated.ml qp_edit.ml: ei_handler.py ocaml_global diff --git a/ocaml/Qpackage.ml b/ocaml/Qpackage.ml index ef4476c6..3656327f 100644 --- a/ocaml/Qpackage.ml +++ b/ocaml/Qpackage.ml @@ -109,7 +109,11 @@ let get_ezfio_default directory data = let dirname = root^"/data/ezfio_defaults/" in let rec aux = function - | [] -> raise Not_found + | [] -> + begin + Printf.printf "%s/%s not found\n%!" directory data; + raise Not_found + end | filename :: tail -> let filename = dirname^filename diff --git a/scripts/compilation/qp_create_ninja.py b/scripts/compilation/qp_create_ninja.py index 05cc4be3..9277b276 100755 --- a/scripts/compilation/qp_create_ninja.py +++ b/scripts/compilation/qp_create_ninja.py @@ -38,10 +38,10 @@ header = r"""# # # https://github.com/LCPQ/quantum_package, # -# Generated automatically by {0}.".format(__file__) +# Generated automatically by {0} # # -""" +""".format(__file__) # __ # /__ | _ |_ _. | _. ._ o _. |_ | _ _ diff --git a/src/CID_selected/README.rst b/src/CID_selected/README.rst index ad309857..5a56d57a 100644 --- a/src/CID_selected/README.rst +++ b/src/CID_selected/README.rst @@ -33,120 +33,120 @@ Documentation Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z `_ +`h_apply_cisd_selection_dipole_moment_z `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_dipole_moment_z_diexc `_ +`h_apply_cisd_selection_dipole_moment_z_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z_monoexc `_ +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet `_ +`h_apply_cisd_selection_epstein_nesbet `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2 `_ +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2 `_ +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core `_ +`h_apply_cisd_selection_h_core `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_h_core_diexc `_ +`h_apply_cisd_selection_h_core_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core_monoexc `_ +`h_apply_cisd_selection_h_core_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/src/CISD_selected/README.rst b/src/CISD_selected/README.rst index 230df80c..00ef10bb 100644 --- a/src/CISD_selected/README.rst +++ b/src/CISD_selected/README.rst @@ -33,120 +33,120 @@ Documentation Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z `_ +`h_apply_cisd_selection_dipole_moment_z `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_dipole_moment_z_diexc `_ +`h_apply_cisd_selection_dipole_moment_z_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_dipole_moment_z_monoexc `_ +`h_apply_cisd_selection_dipole_moment_z_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet `_ +`h_apply_cisd_selection_epstein_nesbet `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2 `_ +`h_apply_cisd_selection_epstein_nesbet_2x2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_2x2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2 `_ +`h_apply_cisd_selection_epstein_nesbet_sc2 `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_no_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ +`h_apply_cisd_selection_epstein_nesbet_sc2_projected_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core `_ +`h_apply_cisd_selection_h_core `_ Calls H_apply on the HF determinant and selects all connected single and double excitations (of the same symmetry). Auto-generated by the ``generate_h_apply`` script. -`h_apply_cisd_selection_h_core_diexc `_ +`h_apply_cisd_selection_h_core_diexc `_ Generate all double excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. -`h_apply_cisd_selection_h_core_monoexc `_ +`h_apply_cisd_selection_h_core_monoexc `_ Generate all single excitations of key_in using the bit masks of holes and particles. Assume N_int is already provided. diff --git a/src/Hartree_Fock/EZFIO.cfg b/src/Hartree_Fock/EZFIO.cfg index 6410df46..e2b0ea5a 100644 --- a/src/Hartree_Fock/EZFIO.cfg +++ b/src/Hartree_Fock/EZFIO.cfg @@ -20,8 +20,3 @@ default: Huckel type: double precision doc: Calculated HF energy interface: output - -[energy_sdfsdf] -type: double precision -doc: Calculated HF energy -interface: output From 5f64a7f568b507e836319b8517a6d0b2f69d5c73 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 11 Jun 2015 16:45:44 +0200 Subject: [PATCH 2/7] Renamed configure in travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 43eee06c..0e5f92ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_script: - sudo apt-get install graphviz script: - - ./configure.py --production ./config/gfortran.cfg + - ./configure --production ./config/gfortran.cfg - source ./quantum_package.rc - ninja - cd ocaml ; make ; cd - From 0f19d8514e534420796e33797ec42dc4b4d5c453 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 11 Jun 2015 17:26:05 +0200 Subject: [PATCH 3/7] gfortran options --- config/gfortran.cfg | 7 +++---- configure | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/config/gfortran.cfg b/config/gfortran.cfg index 2e1206d4..50dd00d1 100644 --- a/config/gfortran.cfg +++ b/config/gfortran.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -ffree-line-length-none -I . +FC : gfortran -ffree-line-length-none LAPACK_LIB : -lblas -llapack IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 @@ -29,21 +29,20 @@ OPENMP : 1 ; Append OpenMP flags # Optimization flags #################### # -# -march=native : Compile a binary optimized for the current architecture # -Ofast : Disregard strict standards compliance. Enables all -O3 optimizations. # It also enables optimizations that are not valid # for all standard-compliant programs. It turns on # -ffast-math and the Fortran-specific # -fno-protect-parens and -fstack-arrays. [OPT] -FCFLAGS : -Ofast -march=native +FCFLAGS : -Ofast # Profiling flags ################# # [PROFILE] FC : -p -g -FCFLAGS : -Ofast -march=native +FCFLAGS : -Ofast # Debugging flags ################# diff --git a/configure b/configure index 7b559555..f4094776 100755 --- a/configure +++ b/configure @@ -70,7 +70,7 @@ path_github = {"head": "http://github.com/", "tail": "archive/master.tar.gz"} ocaml = Info( url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh', - description=' ocaml (it will take some time roughly 20min)', + description=' Ocaml, Opam and the Core library (it will take some time roughly 20min)', default_path=join(QP_ROOT_BIN, "opam")) m4 = Info( @@ -95,12 +95,12 @@ path = Info( irpf90 = Info( url='{head}/LCPQ/irpf90/{tail}'.format(**path_github), - description=' irpf90', + description=' IRPF90', default_path=join(QP_ROOT_BIN, "irpf90")) docopt = Info( url='{head}/docopt/docopt/{tail}'.format(**path_github), - description=' docop', + description=' docopt', default_path=join(QP_ROOT_INSTALL, "docopt")) resultsFile = Info( @@ -116,7 +116,7 @@ ninja = Info( emsl = Info( url='{head}/LCPQ/EMSL_Basis_Set_Exchange_Local/{tail}'.format(** path_github), - description=' emsl', + description=' EMSL basis set library', default_path=join(QP_ROOT_INSTALL, "emsl")) ezfio = Info( From 9ead8acdb71196f731bf09b7b167267371fcef7e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 16 Jun 2015 14:35:16 +0200 Subject: [PATCH 4/7] Spelling --- configure | 8 ++++---- doc/code_architecture/Script.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index f4094776..3b974dc4 100755 --- a/configure +++ b/configure @@ -297,7 +297,7 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | | d_print = { "install_ninja": "Install ninja...", "build": "Creating build.ninja...", - "install": "Installing the dependancy through ninja..." + "install": "Installing the dependency through ninja..." } length = max(map(len, d_print.values())) @@ -347,15 +347,15 @@ _|_ | | _> |_ (_| | | (_| |_ | (_) | | ""] # Build to install - l_dependancy = [d_info[i].default_path for i in d_dependency[need] + l_dependency = [d_info[i].default_path for i in d_dependency[need] if i in l_install_descendant] - str_dependancy = " ".join(l_dependancy) + str_dependency = " ".join(l_dependency) rule = "install" if need != "ocaml" else "install_verbose" l_build += ["build {0}: {1} {2} {3}".format(default_path, rule, archive_path, - str_dependancy), + str_dependency), " target = {0}".format(need), " descr = {0}".format(descr), ""] diff --git a/doc/code_architecture/Script.md b/doc/code_architecture/Script.md index 6c5ff34a..ba918f78 100644 --- a/doc/code_architecture/Script.md +++ b/doc/code_architecture/Script.md @@ -12,7 +12,7 @@ For more information you can type `ei_handler.py -h` # `module_handler.py` This script in located in `$QP_ROOT/scripts/module/`. -It provide all the resource related to the tree dependancy of the modules. +It provide all the resource related to the tree dependency of the modules. If more useful as a librairy than a cli. It have some usefull property: From 5be8d24ad2b93c0d085684311bee8f85b0f390e2 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 16 Jun 2015 14:43:24 +0200 Subject: [PATCH 5/7] configure --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 3b974dc4..635325f4 100755 --- a/configure +++ b/configure @@ -45,6 +45,8 @@ QP_ROOT = os.getcwd() QP_ROOT_BIN = join(QP_ROOT, "bin") QP_ROOT_INSTALL = join(QP_ROOT, "install") +os.environ["PATH"] = os.environ["PATH"] + ":"+QP_ROOT_BIN + d_dependency = { "ocaml": ["m4", "curl", "zlib", "patch", "gcc"], "m4": ["make"], From 8d35cf142562c04a79a7bc021c6bbca2a8c66f92 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 16 Jun 2015 14:52:20 +0200 Subject: [PATCH 6/7] configure --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 635325f4..05128976 100755 --- a/configure +++ b/configure @@ -128,7 +128,7 @@ ezfio = Info( d_info = dict() -for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", +for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", "gcc", "resultsFile", "ninja", "emsl", "ezfio"]: exec ("d_info['{0}']={0}".format(m)) @@ -188,7 +188,7 @@ def checking(d_dependency): print "To old version (need >2.5). Abort" sys.exit(1) - def check_availabiliy(binary): + def check_availability(binary): """ If avalabie return the path who can can't find the binary else return 0 @@ -238,7 +238,7 @@ def checking(d_dependency): for i in d_dependency.keys(): print "Checking {0:>{1}}...".format(i, length), - r = check_availabiliy(i) + r = check_availability(i) if r: print "[ OK ] ( {0} )".format(r.strip()) l_installed[i] = r.strip() From f15c6583ec4f23dd2ace4abb03bdb132d04621e1 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 17 Jun 2015 10:49:43 +0200 Subject: [PATCH 7/7] -I . is important for gfortran --- config/gfortran.cfg | 2 +- configure | 2 +- install/scripts/install_ocaml.sh | 5 ++++- install/scripts/install_zlib.sh | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config/gfortran.cfg b/config/gfortran.cfg index 50dd00d1..d84d8486 100644 --- a/config/gfortran.cfg +++ b/config/gfortran.cfg @@ -10,7 +10,7 @@ # # [COMMON] -FC : gfortran -ffree-line-length-none +FC : gfortran -ffree-line-length-none -I . LAPACK_LIB : -lblas -llapack IRPF90 : irpf90 IRPF90_FLAGS : --ninja --align=32 diff --git a/configure b/configure index 05128976..b810f600 100755 --- a/configure +++ b/configure @@ -128,7 +128,7 @@ ezfio = Info( d_info = dict() -for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", "gcc", +for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", "resultsFile", "ninja", "emsl", "ezfio"]: exec ("d_info['{0}']={0}".format(m)) diff --git a/install/scripts/install_ocaml.sh b/install/scripts/install_ocaml.sh index 34410c62..5c9bb89e 100755 --- a/install/scripts/install_ocaml.sh +++ b/install/scripts/install_ocaml.sh @@ -32,7 +32,10 @@ export LIBRARY_PATH=${QP_ROOT}/lib:${LIBRARY_PATH} export C_INCLUDE_PATH=${QP_ROOT}/lib:${C_INCLUDE_PATH} source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -${QP_ROOT}/bin/opam install ${PACKAGES} -y -q || exit 1 + +NCPUs=$(cat /proc/cpuinfo | grep -i MHz | wc -l) +${QP_ROOT}/bin/opam install -j ${NCPUs} ${PACKAGES} -y -q || exit 1 + rm -f ../_build/ocaml.log exit 0 diff --git a/install/scripts/install_zlib.sh b/install/scripts/install_zlib.sh index 26139f5c..06ce67f3 100755 --- a/install/scripts/install_zlib.sh +++ b/install/scripts/install_zlib.sh @@ -14,6 +14,8 @@ function _install() make install prefix=$QP_ROOT/install/${TARGET} || exit 1 ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.so $QP_ROOT/lib || exit 1 ln -s -f $QP_ROOT/install/${TARGET}/lib/libz.a $QP_ROOT/lib || exit 1 + ln -s -f $QP_ROOT/install/${TARGET}/include/zlib.h $QP_ROOT/lib || exit 1 + ln -s -f $QP_ROOT/install/${TARGET}/include/zconf.h $QP_ROOT/lib || exit 1 } source scripts/build.sh