Update test_minimal_model.py

This commit is contained in:
calquezar 2024-08-19 16:10:22 +02:00
parent 370deaca33
commit 9b855d71f3

View File

@ -6,37 +6,17 @@ load('minimalModel_parallel.py')
####################################################### #######################################################
# TESTS # TESTS
#S = simplicial_complexes.Sphere(2)
S = simplicial_complexes.K3Surface()
S.set_immutable()
def test(): def test():
""" [sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=12000, max_dim=3)
S1 = simplicial_complexes.Sphere(2) print(sullivan_model, flush=True)
S2 = simplicial_complexes.Sphere(2) save(sullivan_model, "sullivan_model_K3_deg3")
S = S1.wedge(S2, is_mutable=False) save(model_morphism,"model_morphism_K3_deg3")
S.set_immutable() save(cohomology_correspondence,"cohomology_correspondence_K3_deg3")
"""
"""
for i in range(3,6):
S2 = simplicial_complexes.Sphere(i)
S = S.wedge(S2, is_mutable=False)
"""
S = simplicial_complexes.K3Surface()
S.set_immutable()
"""
A = AlgebraAplK(S)
for i in range(2,7):
A.cohomology_group(i)
A.cohomology_gens(i)
A.get_cohomology_aplk(i)
A.cohomology_group.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
A.cohomology_gens.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
A.get_cohomology_aplk.precompute(set([(A,i) for i in range(2,7)]), num_processes=8)
print("Finish", flush=True)
"""
[sullivan_model, model_morphism, cohomology_correspondence] = minimal_model(S, max_depth=12000, max_dim=4)
save(sullivan_model,"Sullivan_model_K3_deg4_24cpus")
save(model_morphism,"model_morphism_K3_deg4_24cpus")
save(cohomology_correspondence,"cohomology_correspondence_K3_deg4_24cpus")
print(sullivan_model)
############################################# #############################################
cProfile.runctx("test()", globals(), locals(), "Profile.prof") cProfile.runctx("test()", globals(), locals(), "Profile_K3_deg3.prof")
s = pstats.Stats("Profile.prof") s = pstats.Stats("Profile_K3_deg3.prof")
s.strip_dirs().sort_stats("cumtime").print_stats() s.strip_dirs().sort_stats("cumtime").print_stats()