Skip to content

If in a subfolder, launch a simulation with a parameter file results in unknown url type: 20150810-120639.param #279

@livia-b

Description

@livia-b

I just tried to run a simulation in a subfolder of sumatra project (using absolute paths for the main file and the parameter file) , but my main script file could not find the parameter file anymore because it was written into the root of sumatra project folder. Running the same code in the root folder was successful.

Probably using a parameter_file_basename with absolute path fixes this problem, in fact:

  • the file 20150810-120639.param is saved in the current folder (in my case, a subfolder)
records.py:153:            
self.parameter_file = self.executable.write_parameters(self.parameters, parameter_file_basename)
  • sumatra generates a command with a relative path to the file .param

    launch.py:103       
    cmd = self.generate_command(executable, main_file, arguments)
    
  • but then the command is executed in the project working directory:

    launch.py:111                  
    result, output = tee.system2(cmd, cwd=self.working_directory, stdout=True)  # cwd only relevant for local launch, not for MPI, for example
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions