Пример #1
0
 def master_func(i):
     import BaikalETK.BaikalETK_C_kernels_codegen as BCk
     return BCk.BaikalETK_C_kernels_codegen_onepart(
         params=paramslist[i])
Пример #2
0
        pool.join()
    except:
        logging.exception(
            "Ignore this warning/backtrace if on a system in which serial codegen is necessary:"
        )
        print("***************************************")
        print("Starting serial C kernel codegen...")
        print("(If you were running in parallel before,")
        print(" this means parallel codegen failed)")
        print("***************************************")
        # Steps 3.d.ii-iv, alternate: As fallback, evaluate functions in serial.
        #       This will happen on Android and Windows systems
        import BaikalETK.BaikalETK_C_kernels_codegen as BCk
        # No need to pickle if doing serial codegen.
        for param in paramslist:
            BCk.BaikalETK_C_kernels_codegen_onepart(params=param)
        NRPyEnvVars = [
        ]  # Reset NRPyEnvVars in case multiprocessing wrote to it and failed.

print("Finished C kernel codegen for Baikal and BaikalVacuum in " +
      str(time.time() - start) + " seconds.")
###############################

###############################
# Step 3: Generate Einstein Toolkit ccl files

# Step 3.a: Create an appropriate NRPy+ environment based on
#           environment variables set ("pickled") in the above codegen
#           and stored in the NRPyEnvVars. Here we un-pickle the data
#           to construct the NRPy+ environment.
Пример #3
0
 def master_func(i):
     import BaikalETK.BaikalETK_C_kernels_codegen as BCk  # lgtm [py/repeated-import]
     return BCk.BaikalETK_C_kernels_codegen_onepart(
         params=paramslist[i])