Commit 2abe82a1 authored by David Hendriks's avatar David Hendriks
Browse files

small changes: less output and some extra infp. also checking the last line of...

small changes: less output and some extra infp. also checking the last line of a output to see if the SYSTEM_ERROR is in there
parent 029ceedb
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -908,7 +908,7 @@ class Population:
        )

        verbose_print(
            "Process {} started".format(ID), self.grid_options["verbosity"], 0
            "Process {} started at {}".format(ID, datetime.datetime.now().isoformat()), self.grid_options["verbosity"], 0
        )

        # Go over the generator
@@ -929,7 +929,9 @@ class Population:
                    # )

                    #
                    print("Process {} is handling system {}".format(ID, localcounter))
                    verbose_print(
                        "Process {} is handling system {}".format(ID, localcounter), self.grid_options["verbosity"], 2
                    )

                    # In some cases, the whole run crashes. To be able to figure out which system that was on, we log each current system to a file (each thread has one). Each new system overrides the previous
                    with open(os.path.join(self.grid_options["tmp_dir"], "thread_{}_current_system.txt".format(self.process_ID)), 'w') as f:
@@ -998,8 +1000,9 @@ class Population:
        }

        verbose_print(
            "Process {}: generator done. Ran {} systems with a total probability of {}. This thread had {} failing systems with a total probability of {}".format(
            "Process {}: generator done at {}. Ran {} systems with a total probability of {}. This thread had {} failing systems with a total probability of {}".format(
                ID,
                datetime.datetime.now().isoformat(),
                number_of_systems_run,
                probability_of_systems_run,
                self.grid_options["_failed_count"],
@@ -2533,7 +2536,9 @@ class Population:
        Function to check whether binary_c throws an error and handle accordingly.
        """

        if binary_c_output.startswith("SYSTEM_ERROR"):


        if (binary_c_output.splitlines()[0].startswith("SYSTEM_ERROR")) or (binary_c_output.splitlines()[-1].startswith("SSYSTEM_ERROR")):
            verbose_print(
                "FAILING SYSTEM FOUND",
                self.grid_options["verbosity"],