spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

defects cannot be loaded if upper case letters are used in path to file #493

Closed Skyrme closed 5 years ago

Skyrme commented 5 years ago

Despite giving the correct path to the file that contains the information in input.cfg

defects_from_file /scratch/SKYRMION__281166-WLOw/2/25/defects.txt

the defects cannot be loaded by the python api as indicated by the error messages in the log:

[ ERROR ] [API ] [--] [--] ----------------------------------------------------- [ ERROR ] [API ] [--] [--] /users/home/spirit-old/core/src/io/Configparser.cpp:386 in function 'Geometry_from_Config' Caught exception: Failed to read Geometry parameters from file "/scratch/SKYRMION281166-WLOw/2/25/input.cfg". Leaving values at default. Exception backtrace: [ ERROR ] [API ] [--] [--] /users/home/spirit-old/core/src/io/Dataparser.cpp:676 in function 'Defects_from_File': Could not read defects file "/scratch/skyrmion281166-wlow/2/25/defects.txt" [ ERROR ] [API ] [--] [--] /users/home/spirit-old/core/src/io/Filter_File_Handle.cpp:56 in function 'Filter_File_Handle': Could not open file "/scratch/skyrmion__281166-wlow/2/25/defects.txt" [ ERROR ] [API ] [--] [--] -----------------------------------------------------

GPMueller commented 5 years ago

I have found the corresponding bug, but it might take me some time to properly fix it. In the meantime you can avoid this by writing the defects directly into the inputfile or using only lower capitalisation in your filenames.

GPMueller commented 5 years ago

Should be fixed with 531b15824caf9424733ff83a28ef821c7c930695. Please let me know if this solved your problem.

Skyrme commented 5 years ago

This solves the problem of limitation to lower case letters.

[ INFO ] [IO ] [--] [--] Reading Defects [ DEBUG ] [IO ] [--] [--] Trying to parse defects from top of file /users/home/INPUT/defects_size70_distance3.txt [ INFO ] [IO ] [--] [--] Done reading 24 defects