Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for GAMESS-US easyblock (WIP) #1925

Closed
wants to merge 1 commit into from

Conversation

boegel
Copy link
Member

@boegel boegel commented Jan 14, 2020

(not finished, but it's getting on my nerves having this in my working copy)

cc @guacke

@boegel boegel added the bug fix label Jan 14, 2020
@boegel boegel added this to the 4.x milestone Jan 14, 2020
# patch hardcoded settings in rungms to use values specified in easyconfig file
rungms = os.path.join(self.builddir, 'rungms')
extra_gmspath_lines = "set ERICFMT=$GMSPATH/auxdata/ericfmt.dat\nset MCPPATH=$GMSPATH/auxdata/MCP\n"
try:
for line in fileinput.input(rungms, inplace=1, backup='.orig'):
line = re.sub(r"^(\s*set\s*TARGET)=.*", r"\1=%s" % self.cfg['ddi_comm'], line)
line = re.sub(r"^(\s*set\s*GMSPATH)=.*", r"\1=%s\n%s" % (self.installdir, extra_gmspath_lines), line)
line = re.sub(r"^(\s*set\s*GMS_OPENMP)=.*", r"\1=%s" % "true", line) # changed in gamess-20190930-R2 for OpenBLAS support

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment
line too long (137 > 120 characters)

"Enter MPI library (impi, mvapich2, mpt, sockets):": mpilib,
"Enter MPI library (impi, mpich, mpich2, mvapich2, mpt, sockets):": mpilib, # changed in gamess-20170420R1
"Please enter your %s's location: " % mpilib: mpilib_root,
"Do you want to try LIBCCHEM? (yes/no): ": 'no',
"Enter full path to OpenBLAS libraries (without 'lib' subdirectory):": mathlib_root,
"enter this full pathname: ": ''.join([mathlib_root, '/lib']), # changed in gamess-20190930-R2
"Optional: Build Michigan State University CCT3 & CCSD3A methods? (yes/no): ": 'no', # changed in gamess-20190930-R2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment
line too long (129 > 120 characters)

"Enter MPI library (impi, mvapich2, mpt, sockets):": mpilib,
"Enter MPI library (impi, mpich, mpich2, mvapich2, mpt, sockets):": mpilib, # changed in gamess-20170420R1
"Please enter your %s's location: " % mpilib: mpilib_root,
"Do you want to try LIBCCHEM? (yes/no): ": 'no',
"Enter full path to OpenBLAS libraries (without 'lib' subdirectory):": mathlib_root,
"enter this full pathname: ": ''.join([mathlib_root, '/lib']), # changed in gamess-20190930-R2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment

@@ -171,11 +175,14 @@ def configure_step(self):
"please hit <return> to compile the GAMESS source code activator": '',
"please hit <return> to set up your network for Linux clusters.": '',
"communication library ('sockets' or 'mpi')? ": self.cfg['ddi_comm'],
"communication library ('serial','sockets' or 'mpi' or 'mixed')? ": self.cfg['ddi_comm'], # changed in gamess-20190930-R2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least two spaces before inline comment
line too long (133 > 120 characters)

@branfosj
Copy link
Member

I've been looking at GAMESS-US for one of our users. I've not successfully completed it yet, but noticed that maxcpus and maxnodes are defined as variables in the EasyBlock and defined in the EasyConfigs. However, they do not seem to ever be used. I've added the following to the WIP I have for the EasyBlock:

        compddi = os.path.join(self.builddir, 'ddi/compddi')
        try:
            for line in fileinput.input(compddi, inplace=1, backup='.orig'):
                line = re.sub(r"^\s*set\s*MAXCPUS=.*", r"set MAXCPUS=%s" % self.cfg['maxcpus'], line)
                line = re.sub(r"^\s*set\s*MAXNODES=.*", r"set MAXNODES=%s" % self.cfg['maxnodes'], line)
                sys.stdout.write(line)
        except IOError as err:
            raise EasyBuildError("Failed to patch %s: %s", compddi, err)

@@ -78,7 +79,10 @@ def __init__(self, *args, **kwargs):
self.testdir = tempfile.mkdtemp()
# make sure test dir doesn't contain [ or ], rungms csh script doesn't handle that well ("set: No match")
if re.search(r'[\[\]]', self.testdir):
raise EasyBuildError("Temporary dir for tests '%s' will cause problems with rungms csh script", self.testdir)
raise EasyBuildError("Temporary dir for tests '%s' will cause problems with rungms csh script",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably tell the user why it will cause problems.

test_file = os.path.join(self.scratch_dir, 'test.txt')
run_cmd("mkdir -p %s" % self.scratch_dir)
run_cmd("touch %s" % test_file)
test_cmd = 'ssh localhost "ls %s"' % test_file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a good thing to do. Think building in a container...
If rungms tries to do any ssh-based stuff it is broken and should be fixed.
I don't think I had that problem back in the days I built this by hand.

lexming pushed a commit to lexming/easybuild-easyblocks that referenced this pull request Mar 10, 2023
@lexming
Copy link
Contributor

lexming commented Dec 14, 2023

Closing as superseded by #3047

@lexming lexming closed this Dec 14, 2023
@lexming lexming modified the milestones: 4.x, next release (4.9.0?) Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants