With mariachi music blaring in the background, President Carter toured the remote village of Ixtlilco el Grande today after more than three hours of talks here with Mexican President Jose Lopez Portillo in the morning.

"I think things are going very well," Carter told reporters, when asked if he was concerned about the low-keyed reception he received here yesterday or Lopez Portillo's hard-edged remarks about the future of U.S.-Mexican relations.

He said Lopez Portillo will hold a press conference Friday and predicted that the Mexican president would have "very favorable" comments about the outcome of the talks.

U.S. officials said the results of the talks would be made public Friday, after the president delivers an address to a joint session of the Mexican Congress. Mexican officials also said the talks had been "cordial" and "very good sessions."

It remained unclear whether any progress was made this morning over energy questions, perhaps the key item on the agenda. Mexico hopes to use its oil riches in part to build a more equal relationship with the United States but there are key differences over such questions as pricing and supply.

This afternoon, as Carter toured outlying agriculture facilities, a senior White House official, who asked not to be named, briefed reporters on the talks in a scene filled with the incongruity that often marks U.S. Mexican relations.

Dressed in a dark, three-piece, pinstriped suit, the official sat on the concrete steps of a store near the town square. Two young children, and occasionally their parents, peered out of a door as the official talked of the Mexico City discussions.

They were on bilateral issues, he said, with energy the largest single agenda item. The official said the two presidents also discussed trade, Mexican economic development several areas of possible cooperation and immigration.

"There was no attempt to pretend that we have not had and still don't have differences over the issue," the official said of the energy discussion.

He also said that neither leader proposed an overall solution to one of the key issues -- the flood of Mexican illegal aliens into the United States in search of work.

In some ways, Ixtlilco el Grande is a symbol of a possible long-range solution. The village is a showcase of an ambitious, government-sponsored rura-development program that Mexican officials hope eventually will slow the migration of rural people to Mexico's overcrowded cities and to the United States.

But until there are more jobs at home, Mexican officials see the flight of the unemployed to the United States as a saftey value on social unrest and have little interest in slowing it.

The president flew by helicopter 70 miles south from Mexico City across rugged mountain terrain. Ixtlilco, which is said to mean "where the one with the black eyes is," is in an arid, rocky mountain valley in the heart of what was once the stronghold of Emiliano Zapata, the Mexican revolutionary leader of the early 20th century.

Carter's visit to the village was the visual highlight of his 48-hour Mexican stay and most of the town's 3,500 residents turned out to see him, breaking into applause when he came into view.

Accompanied by his wife, Rosalynn, the president enthusiastically shook hands with dozens of people before sitting down for a lunch of locally prepared food. Carter visited a swine production facility, an irrigation project and a first grade classroom before returning to Mexico City.

With the results of the presidential talks not to be made public until Friday, attention centered today on Lopez Portillo's bluntly worded toast at lunch Wednesday.

Warning that "surprise moves and sudden deceit or -- abuses" would poison Mexican-U.S. relations, Lopez Portillo clearly warned Carter that Mexico is determined to achieve a more equal relationship.

The warning was interperted in part as an expression of Lopez Portillo's anger at the 1977 decision by Energy Secretary James R. Schlesinger to block the sale of Mexican natural gas to six American companies. That aborted gas deal is among the several complex questions that separate the countries on energy.

U.S. officials sought to minimize the importance of the warning, suggesting that it was meant largely for domestic political consumption.

The officials also said the toast -- probably the sharpest Carter has had to sit through on any of his foreign visits -- did not come up during the talks today, which they characterized as "very direct" but also "friendly."

Carter responded to Lopez Portillo tonight in his own toast at a dinner he hosted at the American Embassy for the Mexican president.

"The people of the United States are fair and decent people, in their dealings with each other and in dealing with people of other nations," he said. "We always prefer to negotiate openly and with candor. We believe it best to recognize honest differences, to assess problems realistically without fear or suspicion and to work in harmony with our friends to solve those problems and to take advantage of common opportunities."

Carter's post-luncheon remarks Wednesday on how he was struck by "Montezuma's revenge," a euphemism for intestinal problems, on an earlier visit to Mexico, were met with interest here.

The Mexicans, who are used to such tourist tales of woe, sounded mostly amused by Carter's story. Rosalynn Carter had covered her face with her hands during the speech and American officials today groaned in embarrassment.

A Mexican television anchorman Wednesday night told a nationwide audience "Carter is going to the Mexican countryside and we hope he does not catch it again."

Carter's praise for Mexico's human rights stance, however, has caused some indignation in this country where police have a reputation for beating and torturing suspected drug smugglers and political opponents.

Some observers here believed it was meant to be an exhortation to improve a situtation, which according to recently released State Department documents, has deteriorated.

"How can Carter say this in a country where 451 people have disappeared for political reasons in the last five years?" asked Rosario Ibarra, head of Mexico's National Committee for the Defense of Political Prisoners.

This group, together with leftist parties, planned to march through downtown Mexico City "to protest the hypocritical human rights policies of both presidents." But Ibarra reported they had received threats from the Ministry of the Interior not to "stage any provocations" and said secret agents had been harassing them all day.

About 2,000 people gathered downtown, a few blocks away from the American embassy, but riot police using mace stopped them from marching.