Skip to content

Commit

Permalink
remove proc and mem by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-24 committed Mar 29, 2024
1 parent ae240c2 commit 7383d19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions nachos/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
],
'bases': ['energy', 'G', 'GG', 'F', 'FF', 'dD', 'FFF', 'dDF', 'XDD'],
'default_for_extra_fields': {
'memory': '1Gb',
'procs': 1,
'memory': None,
'procs': None,
'convergence': 11,
'cc_convergence': 11,
'cphf_convergence': 10,
Expand Down
8 changes: 6 additions & 2 deletions nachos/core/preparing.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ def prepare_gaussian_inputs(self, dry_run=False):
if self.recipe['type'] == 'F':
fi.title += '\nNote: E-field in the opposite direction is used.'

fi.options['nprocshared'] = self.recipe['flavor_extra']['procs']
fi.options['mem'] = self.recipe['flavor_extra']['memory']
if self.recipe['flavor_extra']['procs'] is not None:
fi.options['nprocshared'] = self.recipe['flavor_extra']['procs']

if self.recipe['flavor_extra']['memory'] is not None:
fi.options['mem'] = self.recipe['flavor_extra']['memory']

fi.options['chk'] = 'xxx'

# input card
Expand Down
7 changes: 4 additions & 3 deletions tests/tests_nachos_prepare.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import io
import os
import random
import subprocess
Expand Down Expand Up @@ -426,9 +427,9 @@ def test_prepare_mp2_SCS(self):

with open(path) as f:
content = f.readlines()
self.assertNotIn('SCS-MP2', content[3])
self.assertNotIn('MP2=Full', content[3])
self.assertIn('MP2', content[3])
self.assertNotIn('SCS-MP2', content[1])
self.assertNotIn('MP2=Full', content[1])
self.assertIn('MP2', content[1])

def test_nachos_prepare(self):
"""Test the preparer program"""
Expand Down

0 comments on commit 7383d19

Please sign in to comment.