Duplicated Magic Number

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install Duplicated Magic Number

Viewing 2 reply threads
  • Author
    • #1075


        I modified an existing mover. Compilation finishes without any problems. When starting Rosetta I get the following error:

        ../rosetta_source/bin/minirosetta.macosgccrelease @flags
        Duplicate magic number in random object initialization! Number:84195
        ERROR:: Exit from: src/numeric/random/random.cc line: 136

        It seems basically all movers initialize their own RandomnumberGenerator with different seeds. So why is Rosetta complaining in this particular case and not with the other movers? What have I missed?

        Best regards and thanks for any helpful suggestions.

      • #6215

          I can’t find 84195 in my copy of the source.

          Generally, this comes from two places. Either:

          A) you put the same RG seed in two files (perhaps the original and a copy you modified)

          B) you created the RG ( static numeric::random::RandomGenerator RG(84195); // <- Magic number, do not change it!!! ) in a header file, then included the header in more than one place (thus duplicating the RG).

        • #6216

            Thank you so much.

            I modified the RigidBodyMover / made a new subclass. I didn’t want to mess with the original source code so I did everything in a separate file and (here comes the problem) in a copy of that.

          • #6217

              I assume you were able to fix it…? (This wasn’t a question, so I’m guessing yes…)

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.