Hi Doan,
It is interesting that the periodic folder does not get added when installing smuthi. Thank you for bringing this to our attention. I will need to look into this when I have more time.
For now, I'd like to propose two options
Option 1:
Install smuthi based on the standard pip method (not cloning). Then, grab the periodicboundaries folder from gitlab and manually insert it into your installed local version of smuthi.
Option 2:
The automated install of SMUTHI performs the following steps:
1) install smuthi into specified default location. (This is usually a default location managed by python or conda).
2) run a script to compile c-level programs into machine code based on your computer-specific settings.
If you clone the repository from gitlab, then the automatic setup may fail if it attempts to compile c files and does not find them in the standard location or if it does compile the c files but stores them in a non-standard location.
The manual clone should not compile the c files to system-specific machine code. It just clones over what is on gitlab. So this should be the problem.
This is ok as the c files can be compiled manually. The error message is giving information on how to do that.
First, follow the instructions in compile_speedups_from_c.py
(If this does not work use the from_pyx.py file)
This will tell you how to manually compile the c files into machine code for your operating system.
This involves navigating to the cython_speedups folder in the command line. Then run compile_speedups_from_c.py
This will generate your system-specific machine code and save it into the newly generated "build folder".
Go into the build folder and grab the .o and .so files and paste them into the cython_speedups folder.
(Note: the generation of a build folder is just to make sure that compile_speedups_from_c.py does not overwrite pre-existing files.
This is nice if you run on many different systems and want to save compiled versions of the c code for each system. You just change the name of the .o and .so files accordingly.
For you, do not worry about this. Just copy and paste.)
Once the files are compiled, you need to tell smuthi where the compiled files are. This is likely not a problem if "import smuthi" works for you. So I would first check if compiling the c code fixes your problem. If not,
Line 118 of the helper file is
import_wofz_possible_file_paths = ["cython_speedups",
"smuthi.utility.cython.cython_speedups",
"utility.cython.cython_speedups"]
This tells smuthi to look for the necessary compiled c files in the filepaths = ["cython_speedups",
"smuthi.utility.cython.cython_speedups",
"utility.cython.cython_speedups"]
If you are running smuthi from a nonstandard location, (i.e., commands like "import smuthi' are being replaced by "import <my custom filepath>.smuthi"), then you need to specify this custom path in the list of file paths to check on line 118 as well.
Alternatively, you can run simulations from the smuthi directory then "import smuthi" will work and all subfiles can be properly found.