From 380169d219606915488e74f6c2b21b44b7085adc Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 23 Jul 2019 17:27:02 +0200 Subject: [PATCH] Fixing Ocaml --- build.ninja | 4 +- ezfio_config/qmc.config | 12 +-- ocaml/Block.ml | 2 +- ocaml/Command_line.ml | 15 +++- ocaml/Command_line.mli | 2 +- ocaml/Input.ml | 2 +- ocaml/Makefile | 1 - ocaml/Md5.ml | 149 ------------------------------------ ocaml/QmcMd5.ml | 2 +- ocaml/Qmcchem_dataserver.ml | 9 +-- ocaml/Qmcchem_edit.ml | 4 +- ocaml/Qmcchem_forwarder.ml | 4 +- ocaml/Qmcchem_info.ml | 2 +- ocaml/Qmcchem_result.ml | 2 +- ocaml/Qmcchem_run.ml | 4 +- ocaml/Qputils.ml | 23 +++++- ocaml/Random_variable.ml | 2 +- ocaml/Watchdog.ml | 25 +++--- ocaml/qmcchem.ml | 72 +++++++++++------ ocaml/qptypes_generator.ml | 2 +- scripts/clean.sh | 2 +- scripts/compile_ocaml.sh | 2 +- src/ezfio_interface.irp.f | 2 +- src/mo.irp.f | 2 +- 24 files changed, 121 insertions(+), 225 deletions(-) delete mode 100644 ocaml/Md5.ml diff --git a/build.ninja b/build.ninja index 010530e..4b789ea 100644 --- a/build.ninja +++ b/build.ninja @@ -28,7 +28,7 @@ rule compile_ocaml_dep pool = console rule compile_ocaml - command = cd ocaml ; ninja $target + command = cd ocaml ; make $target description = Compiling OCaml tools pool = console @@ -77,7 +77,7 @@ build ocaml/qmcchem : compile_ocaml | EZFIO/Ocaml/ezfio.ml ocaml/Property.ml build bin/qmc: copy_to_bin src/MAIN/qmc build bin/qmcchem_info: copy_to_bin src/MAIN/qmcchem_info build bin/qmc_create_walkers: copy_to_bin src/MAIN/qmc_create_walkers -build bin/qmcchem: copy_to_bin ocaml/qmcchem +build bin/qmcchem: copy_to_bin ocaml/qmcchem default bin/qmc bin/qmcchem_info bin/qmc_create_walkers bin/qmcchem diff --git a/ezfio_config/qmc.config b/ezfio_config/qmc.config index d41db6d..992033b 100644 --- a/ezfio_config/qmc.config +++ b/ezfio_config/qmc.config @@ -8,12 +8,12 @@ ao_basis ao_expo real (ao_basis_ao_num,ao_basis_ao_prim_num_max) mo_basis - mo_tot_num integer - mo_coef real (ao_basis_ao_num,mo_basis_mo_tot_num) - mo_classif character (mo_basis_mo_tot_num) - mo_energy real (mo_basis_mo_tot_num) - mo_occ real (mo_basis_mo_tot_num) - mo_symmetry character*(8) (mo_basis_mo_tot_num) + mo_num integer + mo_coef real (ao_basis_ao_num,mo_basis_mo_num) + mo_classif character (mo_basis_mo_num) + mo_energy real (mo_basis_mo_num) + mo_occ real (mo_basis_mo_num) + mo_symmetry character*(8) (mo_basis_mo_num) electrons elec_alpha_num integer diff --git a/ocaml/Block.ml b/ocaml/Block.ml index 106bbd8..1e0ebe7 100644 --- a/ocaml/Block.ml +++ b/ocaml/Block.ml @@ -86,7 +86,7 @@ let update_raw_data ?(locked=true) () = in let files = let result = - if Sys.is_directory dir_name then + if Sys.file_exists dir_name && Sys.is_directory dir_name then begin Sys.readdir dir_name |> Array.map (fun x -> dir_name^x) diff --git a/ocaml/Command_line.ml b/ocaml/Command_line.ml index ad52658..098f268 100644 --- a/ocaml/Command_line.ml +++ b/ocaml/Command_line.ml @@ -166,7 +166,7 @@ let help () = -let set_specs specs_in = +let set_specs ?(no_help=false) specs_in = specs := { short='h' ; long ="help" ; doc ="Prints the help message." ; @@ -188,11 +188,20 @@ let set_specs specs_in = ) in - Getopt.parse_cmdline cmd_specs (fun x -> anon_args := !anon_args @ [x]); + let cmdline = + Sys.argv + |> Array.to_list + |> List.filter (fun x -> x <> "") + |> Array.of_list + in + Getopt.parse cmd_specs (fun x -> anon_args := !anon_args @ [x]) + cmdline 1 (Array.length cmdline -1); - if show_help () then + + if not no_help && (show_help ()) then (help () ; exit 0); + (* Check that all mandatory arguments are set *) List.filter (fun x -> x.short <> ' ' && x.opt = Mandatory) !specs |> List.iter (fun x -> diff --git a/ocaml/Command_line.mli b/ocaml/Command_line.mli index f02756e..b82aab0 100644 --- a/ocaml/Command_line.mli +++ b/ocaml/Command_line.mli @@ -117,7 +117,7 @@ val help : unit -> unit (** Sets the specification list as a list of tuples: ( short option, long option, documentation, argument ) *) -val set_specs : description list -> unit +val set_specs : ?no_help:bool -> description list -> unit (** Returns the list of anonymous arguments *) diff --git a/ocaml/Input.ml b/ocaml/Input.ml index ae0fd10..16c7d94 100644 --- a/ocaml/Input.ml +++ b/ocaml/Input.ml @@ -788,7 +788,7 @@ end = struct let doc = "Type of Jastrow factor [ None | Core | Simple ]" let of_string s = - match String.capitalize (String.trim s) with + match String.capitalize_ascii (String.trim s) with | "Core" -> Core | "Simple" -> Simple | "None" -> None diff --git a/ocaml/Makefile b/ocaml/Makefile index 2899669..b319f61 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -24,7 +24,6 @@ ALL_EXE=$(patsubst %.ml,%.native,$(wildcard qp_*.ml)) qmcchem.native default: $(ALL_EXE) - mv qmcchem.native $(QMCCHEM_PATH)/bin/qmcchem tests: $(ALL_TESTS) diff --git a/ocaml/Md5.ml b/ocaml/Md5.ml deleted file mode 100644 index fa177f1..0000000 --- a/ocaml/Md5.ml +++ /dev/null @@ -1,149 +0,0 @@ -open Core - -(** Directory containing the list of input files. The directory is created is inexistant. *) -let input_directory = lazy ( - - let ezfio_filename = - Lazy.force Qputils.ezfio_filename - in - - let dirname = - Filename.concat ezfio_filename "input" - in - - begin - match ( Sys.is_directory dirname ) with - | `No -> Unix.mkdir dirname - | _ -> () - end ; - - dirname -) - - -(** List of files responsible for the MD5 key of the input *) -let files_to_track = [ - "ao_basis/ao_coef.gz" ; - "ao_basis/ao_expo.gz" ; - "ao_basis/ao_nucl.gz" ; - "ao_basis/ao_num" ; - "ao_basis/ao_power.gz" ; - "ao_basis/ao_prim_num.gz" ; - "electrons/elec_alpha_num" ; - "electrons/elec_beta_num" ; - "electrons/elec_walk_num" ; - "jastrow/jast_type" ; - "mo_basis/mo_coef.gz" ; - "mo_basis/mo_tot_num" ; - "nuclei/nucl_charge.gz" ; - "nuclei/nucl_coord.gz" ; - "nuclei/nucl_num" ; - "simulation/ci_threshold" ; - "simulation/nucl_fitcusp_factor" ; - "simulation/jast_a_up_dn" ; - "simulation/jast_a_up_up" ; - "simulation/jast_b_up_dn" ; - "simulation/jast_b_up_up" ; - "simulation/jast_core_a1" ; - "simulation/jast_core_a2" ; - "simulation/jast_core_b1" ; - "simulation/jast_core_b2" ; - "simulation/jast_een_e_a.gz" ; - "simulation/jast_een_e_b.gz" ; - "simulation/jast_een_n.gz" ; - "simulation/jast_pen.gz" ; - "simulation/method" ; - "simulation/time_step" ; - "simulation/dmc_projection_time" ; - "spindeterminants/bit_kind" ; - "spindeterminants/n_det" ; - "spindeterminants/n_det_alpha" ; - "spindeterminants/n_det_beta" ; - "spindeterminants/n_int" ; - "spindeterminants/n_states" ; - "spindeterminants/psi_coef_matrix_columns.gz" ; - "spindeterminants/psi_coef_matrix_rows.gz" ; - "spindeterminants/psi_coef_matrix_values.gz" ; - "spindeterminants/psi_det_alpha.gz" ; - "spindeterminants/psi_det_beta.gz" ; - "/pseudo/do_pseudo" ; - "/pseudo/mo_pseudo_grid.gz" ; - "/pseudo/pseudo_dz_kl.gz"; - "/pseudo/pseudo_klocmax" ; - "/pseudo/pseudo_n_k.gz" ; - "/pseudo/pseudo_v_kl.gz" ; - "/pseudo/pseudo_grid_rmax" ; - "/pseudo/pseudo_kmax" ; - "/pseudo/pseudo_n_kl.gz" ; - "/pseudo/pseudo_dz_k.gz" ; - "/pseudo/pseudo_grid_size" ; - "/pseudo/pseudo_v_k.gz" ; - ] - - -(** Get an MD5 ke from the content of a file. *) -let hash_file filename = - match Sys.is_file filename with - | `Yes -> - begin - In_channel.with_file filename ~f:(fun ic -> - Cryptokit.hash_channel (Cryptokit.Hash.md5 ()) ic - |> Cryptokit.transform_string (Cryptokit.Hexa.encode ()) ) - end - | _ -> "" - - -(** Cache containing the current value of the MD5 hash. *) -let _hash = - ref None - -(** Get the hash correcponding to the EZFIO file. *) -let hash () = - let compute_hash () = - let ezfio_filename = - Lazy.force Qputils.ezfio_filename - in - let old_md5 = - if Ezfio.has_simulation_md5_key () then - Ezfio.get_simulation_md5_key () - else - "" - in - let md5_string = - files_to_track - |> List.map ~f:(fun x -> Printf.sprintf "%s/%s" ezfio_filename x) - |> List.map ~f:hash_file - |> String.concat - in - - let new_md5 = - md5_string - |> Cryptokit.hash_string (Cryptokit.Hash.md5 ()) - |> Cryptokit.transform_string (Cryptokit.Hexa.encode ()) - in - if (new_md5 <> old_md5) then - begin - Printf.eprintf "Info : MD5 key changed\n %s\n-> %s\n%!" old_md5 new_md5 ; - Ezfio.set_simulation_md5_key new_md5 - end - ; - new_md5 - in - match (!_hash) with - | Some key -> key - | None -> - begin - let key = - compute_hash () - in - _hash := Some key ; - key - end - -(** Reset the cache of the MD5 hash. *) -let reset_hash () = - _hash := None; - ignore (hash ()) - - - diff --git a/ocaml/QmcMd5.ml b/ocaml/QmcMd5.ml index ab1fdd8..33dbf19 100644 --- a/ocaml/QmcMd5.ml +++ b/ocaml/QmcMd5.ml @@ -10,7 +10,7 @@ let input_directory = lazy ( in begin - if not (Sys.is_directory dirname) then + if not (Sys.file_exists dirname && Sys.is_directory dirname) then Unix.mkdir dirname 0o777 end ; diff --git a/ocaml/Qmcchem_dataserver.ml b/ocaml/Qmcchem_dataserver.ml index fb46fae..11d965b 100644 --- a/ocaml/Qmcchem_dataserver.ml +++ b/ocaml/Qmcchem_dataserver.ml @@ -36,13 +36,12 @@ let run ?(daemon=true) ezfio_filename = Printf.printf "Generating initial walkers...\n%!"; match Unix.fork () with | 0 -> - Unix.execv + Unix.execvp (Lazy.force Qmcchem_config.qmc_create_walkers) [|"qmc_create_walkers" ; ezfio_filename|] | pid -> begin - let pid', status = Unix.waitpid [] pid in - assert (status = Unix.WEXITED 0); + ignore @@ Unix.waitpid [] pid; Printf.printf "Initial walkers ready\n%!" end end @@ -348,8 +347,8 @@ let run ?(daemon=true) ezfio_filename = Lazy.force Block.dir_name in let () = - if not (Sys.is_directory dirname) then - Unix.mkdir dirname 0o600 + if not ( Sys.file_exists dirname && Sys.is_directory dirname ) then + Unix.mkdir dirname 0o755 in Filename.concat dirname ( hostname ^ "." ^ (string_of_int dataserver_pid) diff --git a/ocaml/Qmcchem_edit.ml b/ocaml/Qmcchem_edit.ml index 4f7a589..5d08a42 100644 --- a/ocaml/Qmcchem_edit.ml +++ b/ocaml/Qmcchem_edit.ml @@ -252,12 +252,12 @@ let run ~c ?f ?t ?l ?m ?e ?et ?s ?ts ?w ?wt ?n ?j ?p ?input ezfio_filename = Filename.concat (Filename.concat ezfio_filename "blocks") (QmcMd5.hash ()) in let rec clean_dir y = - if Sys.is_directory y then + if Sys.file_exists y && Sys.is_directory y then begin Sys.readdir y |> Array.map (fun x -> Filename.concat y x) |> Array.iter (function x -> - if Sys.is_directory x then + if Sys.file_exists x && Sys.is_directory x then clean_dir x else Sys.remove x diff --git a/ocaml/Qmcchem_forwarder.ml b/ocaml/Qmcchem_forwarder.ml index 9852ab6..f5bda97 100644 --- a/ocaml/Qmcchem_forwarder.ml +++ b/ocaml/Qmcchem_forwarder.ml @@ -48,7 +48,7 @@ let run ezfio_filename dataserver = *) let () = try - Unix.mkdir tmpdir 0o600; + Unix.mkdir tmpdir 0o755; Unix.chdir tmpdir with | Unix.Unix_error _ -> @@ -69,7 +69,7 @@ let run ezfio_filename dataserver = | pid -> try Unix.kill pid 0 ; - ignore @@ Unix.execv prog argv + ignore @@ Unix.execvp prog argv with | Unix.Unix_error (Unix.ESRCH, _, _) -> () end diff --git a/ocaml/Qmcchem_info.ml b/ocaml/Qmcchem_info.ml index 09143c6..aa977e6 100644 --- a/ocaml/Qmcchem_info.ml +++ b/ocaml/Qmcchem_info.ml @@ -10,7 +10,7 @@ let run ezfio_filename = [| qmcchem_info ; ezfio_filename |] in ignore @@ - Unix.execv prog argv + Unix.execvp prog argv let command () = let open Command_line in diff --git a/ocaml/Qmcchem_result.ml b/ocaml/Qmcchem_result.ml index 8ae1816..d1abdb0 100644 --- a/ocaml/Qmcchem_result.ml +++ b/ocaml/Qmcchem_result.ml @@ -224,7 +224,7 @@ let command () = doc="Display the convergence of the error of the property by merging blocks"; arg=With_arg ""; }; - { short='h' ; long="histogram" ; opt=Optional ; + { short='i' ; long="histogram" ; opt=Optional ; doc="Display the histogram of the property blocks" ; arg=With_arg ""; }; diff --git a/ocaml/Qmcchem_run.ml b/ocaml/Qmcchem_run.ml index ace83f1..f2201f9 100644 --- a/ocaml/Qmcchem_run.ml +++ b/ocaml/Qmcchem_run.ml @@ -48,7 +48,6 @@ let full_run ?(start_dataserver=true) ezfio_filename = end; -(* (* Check if the Zmq Rep socket is open *) let test_open_rep_socket () = let zmq_context = @@ -86,7 +85,7 @@ let full_run ?(start_dataserver=true) ezfio_filename = | n -> if (not (test_open_rep_socket ())) then begin - Unix.sleepf 0.5; + Unix.sleep 2; count (n-1); end else @@ -94,7 +93,6 @@ let full_run ?(start_dataserver=true) ezfio_filename = in if (not (count 300)) then Watchdog.kill (); - *) Unix.sleep 3; diff --git a/ocaml/Qputils.ml b/ocaml/Qputils.ml index d13a651..199ceab 100644 --- a/ocaml/Qputils.ml +++ b/ocaml/Qputils.ml @@ -13,7 +13,7 @@ let set_ezfio_filename ezfio_filename = failwith (ezfio_filename^" does not exist") in let () = - if Sys.is_directory ezfio_filename then + if Sys.file_exists ezfio_filename && Sys.is_directory ezfio_filename then Ezfio.set_file ezfio_filename else failwith ("Error : "^ezfio_filename^" is not a directory") @@ -34,13 +34,30 @@ let ezfio_filename = lazy ( match f with | "EZFIO_File" -> begin - if (Array.length Sys.argv = 1) then + let args = + Command_line.anon_args () + |> Array.of_list + in + if (Array.length args < 1) then failwith "Error : EZFIO directory not specified on the command line\n"; - Sys.argv.(1) + args.(0) end | f -> f in set_ezfio_filename full_path; + + (* + (* Check if input directory is present *) + let dirname = Filename.concat full_path "input" in + if not (Sys.file_exists dirname) then + Unix.mkdir dirname 0o755; + + (* Check if blocks directory is present *) + let dirname = Filename.concat full_path "blocks" in + if not (Sys.file_exists dirname) then + Unix.mkdir dirname 0o755; + *) + !Ezfio.ezfio_filename ) diff --git a/ocaml/Random_variable.ml b/ocaml/Random_variable.ml index eb0bc97..14351c8 100644 --- a/ocaml/Random_variable.ml +++ b/ocaml/Random_variable.ml @@ -686,7 +686,7 @@ let compress_files () = Filename.concat "qmc" rand_num in try - Unix.mkdir tmp_dir 0o600; + Unix.mkdir tmp_dir 0o755; tmp_dir with _ -> raise (Sys_error "Cannot create temp dir") in diff --git a/ocaml/Watchdog.ml b/ocaml/Watchdog.ml index 819737b..8d5ee27 100644 --- a/ocaml/Watchdog.ml +++ b/ocaml/Watchdog.ml @@ -1,16 +1,16 @@ -let _list = ref [] ;; -let _running = ref false;; -let _threads = ref [] ;; +let _list = ref [] +let _running = ref false +let _threads = ref [] (** Kill the current process and all children *) let kill () = let kill pid = - Unix.kill pid Sys.sigint; + Unix.kill pid Sys.sigkill; Printf.printf "Killed %d\n%!" pid in List.iter kill (!_list); exit 1 -;; + (** Start watchdog *) @@ -50,7 +50,7 @@ let start () = in _threads := ( (Thread.create f) () ) :: (!_threads) end -;; + (** Stop watchdog *) let stop () = @@ -58,14 +58,14 @@ let stop () = _running := false else failwith "Watchdog error: Already stopped" -;; + (** Add a PID to tracking *) let add pid = if (not !_running) then start (); _list := pid :: (!_list) -;; + (** Remove a PID from tracking *) let del pid = @@ -82,14 +82,13 @@ let del pid = match (!_list) with | [] -> if (!_running) then stop () | _ -> () -;; + (** Fork and exec a new process *) let fork_exec ~prog ~args () = let pid = match Unix.fork () with - | 0 -> (* Chile process *) - let _ = Unix.execv prog args in 0 + | 0 -> Unix.execvp prog args | pid -> pid in @@ -111,11 +110,11 @@ let fork_exec ~prog ~args () = in _threads := ( (Thread.create f) () ) :: (!_threads); pid -;; + (** Wait for threads to finish *) let join () = (* if (!_running) then stop (); *) List.iter Thread.join (!_threads); assert (not !_running) -;; + diff --git a/ocaml/qmcchem.ml b/ocaml/qmcchem.ml index 80e0331..c2b80e9 100644 --- a/ocaml/qmcchem.ml +++ b/ocaml/qmcchem.ml @@ -1,36 +1,60 @@ let update_command_line () = let last = (Array.length Sys.argv) - 2 in - Sys.argv.(0) <- Sys.argv.(0) ^ " " ^ Sys.argv.(1); + Sys.argv.(0) <- Sys.argv.(0) ^ "_" ^ Sys.argv.(1); for i=1 to last do Sys.argv.(i) <- Sys.argv.(i+1) done; - Sys.argv.(last+1) <- "--" + Sys.argv.(last+1) <- "" +let help () = + Printf.printf " +qmcchem - QMC=Chem command + +Usage: + + qmcchem [-h] COMMAND + +Arguments: + + COMMAND QMC=Chem command to run : + [run|edit|stop|result|md5|info|debug] + +Options: + + -h --help Prints the help message. + +Description: + + Driver for subcommands. + +" let () = - let open Command_line in - begin - set_header_doc (Sys.argv.(0) ^ " - QMC=Chem command"); - set_description_doc "Driver for subcommands."; - set_specs [] - end; - if Array.length Sys.argv < 2 then - (Command_line.help (); failwith "Inconsistent command line"); - - let command = Sys.argv.(1) in - update_command_line (); - Command_line.reset (); - - match command with - | "debug" -> let open Qmcchem_debug in command () - | "edit" -> let open Qmcchem_edit in command () - | "info" -> let open Qmcchem_info in command () - | "md5" -> let open Qmcchem_md5 in command () - | "result" -> let open Qmcchem_result in command () - | "run" -> let open Qmcchem_run in command () - | "stop" -> let open Qmcchem_stop in command () - | _ -> (Command_line.help () ; failwith "Inconsistent command line") + (help (); failwith "Inconsistent command line") ; + + match String.trim Sys.argv.(1) with + | "-h" | "--help" -> + begin + help () ; + exit 0 + end + | _ -> + begin + let command = + Sys.argv.(1) + in + update_command_line (); + match command with + | "debug" -> let open Qmcchem_debug in command () + | "edit" -> let open Qmcchem_edit in command () + | "info" -> let open Qmcchem_info in command () + | "md5" -> let open Qmcchem_md5 in command () + | "result" -> let open Qmcchem_result in command () + | "run" -> let open Qmcchem_run in command () + | "stop" -> let open Qmcchem_stop in command () + | _ -> (help () ; failwith "Inconsistent command line") + end diff --git a/ocaml/qptypes_generator.ml b/ocaml/qptypes_generator.ml index 04d0c58..2fc112b 100644 --- a/ocaml/qptypes_generator.ml +++ b/ocaml/qptypes_generator.ml @@ -296,7 +296,7 @@ let input_lines filename = let create_ezfio_handler () = let lines = input_lines "ezfio.ml" - |> List.mapi (fun i l -> if i > 470 then Some l else None) + |> List.mapi (fun i l -> if i > 474 then Some l else None) |> List.filter (fun x -> x <> None) |> List.map (fun x -> match x with diff --git a/scripts/clean.sh b/scripts/clean.sh index 978f9a3..026e001 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,7 +1,7 @@ #!/bin/bash # This script is supposed to run in $QMCCHEM_PATH -ninja -C ocaml clean +make -C ocaml clean if [[ -d src/IRPF90_temp ]] then ninja -C src/IRPF90_temp -t clean diff --git a/scripts/compile_ocaml.sh b/scripts/compile_ocaml.sh index 77a2eef..e7a6e43 100755 --- a/scripts/compile_ocaml.sh +++ b/scripts/compile_ocaml.sh @@ -8,4 +8,4 @@ fi cd ${QMCCHEM_PATH}/ocaml || exit -1 -exec ninja -f generated.ninja ${@} || exit -1 +exec make diff --git a/src/ezfio_interface.irp.f b/src/ezfio_interface.irp.f index 950b66b..62c16af 100644 --- a/src/ezfio_interface.irp.f +++ b/src/ezfio_interface.irp.f @@ -52,7 +52,7 @@ data = [ \ ] data_no_set = [\ -("mo_basis_mo_tot_num" , "integer" , ""), +("mo_basis_mo_num" , "integer" , ""), ("pseudo_ao_pseudo_grid" , "double precision" , "(ao_num,pseudo_lmax+pseudo_lmax+1,pseudo_lmax-0+1,nucl_num,pseudo_grid_size)"), ("pseudo_mo_pseudo_grid" , "double precision" , "(ao_num,pseudo_lmax+pseudo_lmax+1,pseudo_lmax-0+1,nucl_num,pseudo_grid_size)"), ("pseudo_pseudo_dz_k" , "double precision" , "(nucl_num,pseudo_klocmax)"), diff --git a/src/mo.irp.f b/src/mo.irp.f index ffd87c1..38228b2 100644 --- a/src/mo.irp.f +++ b/src/mo.irp.f @@ -410,7 +410,7 @@ BEGIN_PROVIDER [ integer, mo_tot_num ] END_DOC mo_tot_num = -1 - call get_mo_basis_mo_tot_num(mo_tot_num) + call get_mo_basis_mo_num(mo_tot_num) if (mo_tot_num <= 0) then call abrt(irp_here,'Total number of MOs can''t be <0') endif