Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run examples #39

Closed
alibh95 opened this issue Oct 28, 2022 · 5 comments
Closed

Unable to run examples #39

alibh95 opened this issue Oct 28, 2022 · 5 comments

Comments

@alibh95
Copy link

alibh95 commented Oct 28, 2022

I am new to the Xerus package, and I have successfully installed it using the provided instructions. I have already set up the MongoDB server and the materials project API key.

I ran tests and noticed that some of the tests were failing. Upon debugging, I discovered that Xerus continues to use dependencies' deprecated functions from versions that were installed alongside the Xerus installation.

I have downgraded to the following packages:

  • scipy == v1.7.0
  • optimade = 0.16.0

Doing this has caused some tests to pass, but now, the test session gets stuck at "test_solvers.py::test_boxauto ".

When I tried running the Examples.ipynb, I get the following error:

FileNotFoundError                         Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_18928\2514958583.py in <module>
     15 
     16     # Analyze and store.
---> 17     run.analyze(n_runs="auto")
     18 
     19     # Save objecti nto memory?

~\Xerus\Xerus\__init__.py in analyze(self, n_runs, grabtop, delta, combine_filter, select_cifs, plot_all, ignore_provider, ignore_comb, ignore_ids, solver, group_method, auto_threshold, r_ori, n_jobs)
    545 
    546         # Get the cifs, simulate the patterns, run correlation (first phase)
--> 547         self.get_cifs(
    548             ignore_provider=ignore_provider,
    549             ignore_comb=ignore_comb,

~\Xerus\Xerus\__init__.py in get_cifs(self, ignore_provider, ignore_comb, ignore_ids)
    223         self
    224         """
--> 225         cif_meta, cif_notran, cif_notsim = LocalDB().get_cifs_and_write(
    226             element_list=self.elements,
    227             outfolder=self.working_folder,

~\Xerus\Xerus\db\localdb.py in get_cifs_and_write(self, element_list, name, outfolder, maxn, max_oxy)
    238         final_path = os.path.join(outfolder, folder_to_write)
    239         queries = make_system_types(element_list, maxn)
--> 240         self.check_all(queries, name = name)
    241 
    242         # check oxygen limit

~\Xerus\Xerus\db\localdb.py in check_all(self, system_types, name)
    198             else:
    199                 print("Checking the following combination:{}".format(combination))
--> 200                 self.check_and_download(combination, name = name)
    201         return self
    202 

~\Xerus\Xerus\db\localdb.py in check_and_download(self, system_type, name)
    174         if not self.check_system(system_type):
    175             elements = system_type.split("-")
--> 176             multiquery(elements, max_num_elem=len(elements), name = name)
    177         return self
    178 

~\Xerus\Xerus\queriers\multiquery.py in multiquery(element_list, max_num_elem, name, resync)
    160     # ## UPDATE DB ##
    161     print("Uploading database with cifs..")
--> 162     data = load_json(os.path.join(test_folder, 'cif.json'))
    163     print(len(data))
    164     if len(data) == 0:

~\Xerus\Xerus\queriers\multiquery.py in load_json(path)
     77     """
     78 
---> 79     with open(path, "r") as fp:
     80         return json.load(fp)
     81 

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Ali Bhatti\\Xerus\\Xerus\\queriers\\LiMn2O4+Li2MnO3_parsed.csv_Mn_cifs\\cif.json'
@ml-evs
Copy link
Collaborator

ml-evs commented Oct 28, 2022

Hi there, from a quick glance at your errors, it looks like you are running on a Windows machine. Please note this section of the installation docs:

System OS

Xerus only supports Linux based and macOS systems. Xerus was mostly developed in Ubuntu 20.04 and have been also tested in CentOS 7.x and MacOS systems (Intel) (M1 machines not available for testing.)

NOTE: As of version 1.1b we started PARTIALLY supporting Windows (currently under testing). All features related to PHASE MATCHING and SEARCHING seem to be working (Win10 python 3.8, Win11 python 3.8). However, refinement optimization seems to not work in Windows yet. There is no ETA to support this. We recommend still using UNIX based systems (Linux/macOS).

It looks like it might be failing to write or find the given file due to the convention Windows takes for directory names (i.e. \ instead of the Unix /). If you are constrained to Windows, perhaps you could try installing Python and Xerus under Cygwin or Windows Subsystem for Linux?

@pedrobcst
Copy link
Owner

Hello!

Thanks for the report. Indeed it seems that the newest versions of optimade are not working with the current interface. I will later send a PR to fix the optimade version to 0.16 as you said and I will investigate later on what caused the issue. Furthemore, as Evan said the issue is probably coming from pathing issues of Windows. Although I had managed to make part of Xerus run with Windows in a earlier version, I have since changed the pathing for downloading structures and that might made it break in Windows, specially since I dont test on it.

I will try to work on this problem and see if if I can fix on Windows, but on the meantime, if possible, could you try to run in Linux?

I had no issues with the scipy version in Linux too. I will get back to you when I find out the issue causing this problem in Windows.

@alibh95
Copy link
Author

alibh95 commented Nov 7, 2022

Hello,

I am now able to run the examples by using Windows Subsystem for Linux. I had to downgrade optimade version to 0.16.
Although the optimization is now complete when I run the optimizer, I still see the following error in the logs:
Intel MKL ERROR: Parameter 4 was incorrect on entry to DLASCL.

@pedrobcst
Copy link
Owner

Thanks for the feedback.

This error seems to stems from the fortran binaries from GSAS II if I am not wrong. My guess is when we give some really wrong combination (or paramater combination) to refine, it can have trouble doing some calculations.

From my experience, those erros seems to no affect (atleast the phase matching algorithm) the final results. So I guess you can ignore those for now since I have no way of debugging / fixing them.

In any case, thanks for reporting the optimade issue. I hope to get a patch this month to fix those issues, including Windows pathing problem.

@alibh95
Copy link
Author

alibh95 commented Nov 7, 2022

I sincerely appreciate your assistance in solving my problem. Thank You.

@alibh95 alibh95 closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants