Changeset 26339


Ignore:
Timestamp:
06/30/21 21:22:20 (4 years ago)
Author:
schlegel
Message:

BUG: qmu should check nprocs function not np, since not all clusters have np

Location:
issm/trunk-jpl/src/m/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/qmu.m

    r25627 r26339  
    8888                                        md = checkmessage(md,['evaluation_scheduling in qmu.params should be set to ''master''']);
    8989                                end
    90                                 if md.cluster.np<=1,
     90                                if md.cluster.nprocs()<=1,
    9191                                        md = checkmessage(md,['in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.cluster.np accordingly.']);
    9292                                end
     
    9595                                        md = checkmessage(md,['in parallel library mode, Dakota needs to run at least one slave on one cpu (md.qmu.params.processors_per_evaluation >=1)!']);
    9696                                end
    97                                 if mod(md.cluster.np-1,self.params.processors_per_evaluation),
     97                                if mod(md.cluster.nprocs()-1,self.params.processors_per_evaluation),
    9898                                        %md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']);
    9999                                end
  • issm/trunk-jpl/src/m/classes/qmu.py

    r25688 r26339  
    149149                md.checkmessage('evaluation_scheduling in qmu.params should be set to "master"')
    150150
    151             if md.cluster.np <= 1:
     151            if md.cluster.nprocs() <= 1:
    152152                md.checkmessage('in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.cluster.np accordingly.')
    153153
     
    155155                md.checkmessage('in parallel library mode, Dakota needs to run at least one slave on one cpu (md.qmu.params.processors_per_evaluation >= 1)!')
    156156
    157             if np.mod(md.cluster.np - 1, self.params.processors_per_evaluation):
     157            if np.mod(md.cluster.nprocs() - 1, self.params.processors_per_evaluation):
    158158                #md.checkmessage('in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly')
    159159                pass
Note: See TracChangeset for help on using the changeset viewer.