Mars' core is still molten. This was determined when a large meteorite hit Mars and the sensors on various pieces of equipment picked up the resulting echoes allowing scientists to get a three dimensional view of the core. The Earth's core is explored the same way, by disturbances in the crust like earthquakes.
One theory has it that when a very large meteorite hit Mars it knocked the core so bad that the dynamo got extinguished. Once that happened the solar wind removed the air and water from the surface of Mars.
Restarting the core dynamo is something that can only be solved by science fiction at this time. Finding people who are willing to go to Mars is not a problem, but getting them to Mars is a big problem.
If most of the open space was below ground and the surface areas were all domed then eventually it would be become a large open space that could have a atmosphere. There are plenty of chemicals on the surface to provide chemical and electrical energy as well as using solar energy. Water in the form of dusty ice is being found in increasing amounts. It can be used for water, broken down into oxygen and hydrogen which can be used for air and fuel. Fuel cells use hydrogen and oxygen for fuel.
Mars get less sunlight but its atmosphere being thinner absorbs less sunlight than Earth's does. When the winds blow the thick dust makes solar power useless, but since there is wind,
wind turbines could be used to get electricity. There is a lot of wind activity at night. The turbine blades would have to be huge to make up for the thinner atmosphere. They might also need to be very resistant to get ground away by the dust in extreme wind storms. Or the blades could be covered up during bad dust storms.
As one article points out, there won't be any big settlements on Mars, or the Moon, until the battery situation is fixed. The current batteries need a lot of improvement and maybe complete overhauls before they can be used on Mars or the Moon.
There is talk of using mini reactors as power sources on the Moon and Mars. It's hoped that this can be a practical idea before 2030. Getting them to Mars or the Moon would be somewhat of a problem, but once set up they would solve a lot of problems. With a nuclear source there would be less pressure to have super batteries in place.
There are nuclear powered batteries which probes use. They have radioactive material in them that gives off heat as it emits radiation. The electricity comes from thermal power converters which convert heat energy to electricity. Its a highly developed product, around since the 1950s. There is a plutonium battery that is used to power a pacemaker. The idea being that the battery will never need replacing.
Maybe this is the planet of the Apes. A space probe gets launched from future Earth that goes back in time through some space anomaly and comes back down to Earth in the distant past, landing in a big ape populated area. The radioactive battery breaks open and spreads traces of potent radiation around which the apes get exposed to after making a monument out of it. They lose hair, bones thin out, neurological changes rewires the brain, and soon there are people running around wondering how did I get here?.
This was a fear that some people had when the almost famous Jupiter probe, Galileo Orbiter, attempted to crash land on the surface of Jupiter with all the sensors sending back everything they could before they got crushed by the pressure. It was powered by a series of small radioisotope thermoelectric generators, though the press described it as a large plutonium battery. It never reached the surface.