INCF / MUSIC

MUSIC, the MUltiSimulation Coordinator
GNU General Public License v3.0
37 stars 37 forks source link

If `np` is missing from a section, raise a proper error message #45

Open jakobj opened 6 years ago

jakobj commented 6 years ago

If in the config file, one section is missing the np enttry, in ApplicationMapper::mapApplications () it is assigned a random(?) value. The resulting error reads something like the following:

Error in MUSIC library: configuration file specifies 32579 MPI processes but MUSIC was given 3

Instead, MUSIC should raise a proper error message complaining that np is missing. It seems like there should in general be a function right after (cfile_->load (*configFile)) in ApplicationMapper::map that checks the validity of the config file. That way one could also check for all other errors arising from wrong specifications in the config file. Is there something like that already and I'm missing it?

jakobj commented 6 years ago

I would like to revise my opinion. I think no error should be thrown, instead MUSIC should assume that if np is not provided, this application only uses one process. Other opinions?

mdjurfeldt commented 6 years ago

This sounds reasonable, since many users would run a MUSIC-aware application in a single process.

On Thu, Oct 19, 2017 at 3:33 PM, Jakob Jordan notifications@github.com wrote:

I would like to revise my opinion. I think no error should be thrown, instead MUSIC should assume the if np is not provided, this application only uses one process. Opinions?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/INCF/MUSIC/issues/45#issuecomment-337908946, or mute the thread https://github.com/notifications/unsubscribe-auth/ADcfCQRFQ3Vqoqgl3_U2eGp0QEECRNypks5st0-XgaJpZM4P9-eG .

jakobj commented 6 years ago

probably this could be extended to also set args="" as a default?