@@ -27,9 +27,9 @@ class Charmpp(Package):
2727 version ("main" , branch = "main" )
2828
2929 version (
30- "8.0.0" ,
31- sha256 = "e30fc1e921e5cbf3406e792d5b0ca5f211c5d8ffbfc56e56d5501d8118abcaf6" ,
32- url = "https://github.com/charmplusplus/charm/archive/refs/tags/v8.0.0.tar.gz"
30+ "8.0.0" ,
31+ sha256 = "e30fc1e921e5cbf3406e792d5b0ca5f211c5d8ffbfc56e56d5501d8118abcaf6" ,
32+ url = "https://github.com/charmplusplus/charm/archive/refs/tags/v8.0.0.tar.gz" ,
3333 )
3434 version ("7.0.0" , sha256 = "9c247b421bb157bdf9bc0ced3e25738c7a1dc1f7ec57b7943a7faf97f7e4fb2e" )
3535 version ("6.10.2" , sha256 = "7abb4cace8aebdfbb8006eac03eb766897c009cfb919da0d0a33f74c3b4e6deb" )
@@ -45,6 +45,10 @@ class Charmpp(Package):
4545 version ("6.6.0" , sha256 = "c916010f2d4cc2c6bd30ea19764839d0298fb56d1696d8ff08d9fa9a61dfb1c9" )
4646 version ("6.5.1" , sha256 = "68aa43e2a6e476e116a7e80e385c25c6ac6497807348025505ba8bfa256ed34a" )
4747
48+ depends_on ("c" , type = "build" ) # generated
49+ depends_on ("cxx" , type = "build" ) # generated
50+ depends_on ("fortran" , type = "build" ) # generated
51+
4852 # Support OpenMPI; see
4953 # <https://github.com/UIUC-PPL/charm/issues/1206>
5054 # Patch is no longer needed in versions 6.8.0+
@@ -64,8 +68,7 @@ class Charmpp(Package):
6468 patch ("strictpass.patch" , when = "@:6.8.2" )
6569
6670 # Support Cray Shasta with ARM
67- patch ("ofi-crayshasta-arm-7.0.0.patch" , when = "backend=ofi pmi=cray-pmi target=aarch64: @=7.0.0" )
68- patch ("ofi-crayshasta-arm-8.0.0.patch" , when = "backend=ofi pmi=cray-pmi target=aarch64: @=8.0.0" )
71+ patch ("ofi-crayshasta-arm.patch" , when = "backend=ofi pmi=cray-pmi target=aarch64:" )
6972
7073 # Build targets
7174 # "target" is reserved, so we have to use something else.
@@ -274,7 +277,7 @@ def charmarch(self):
274277
275278 def install (self , spec , prefix ):
276279 if not ("backend=mpi" in self .spec ) or not ("backend=netlrts" in self .spec ):
277- if "+pthreads" in self . spec :
280+ if self . spec . satisfies ( "+pthreads" ) :
278281 raise InstallError (
279282 "The pthreads option is only\
280283 available on the Netlrts and MPI \
@@ -286,7 +289,7 @@ def install(self, spec, prefix):
286289 or ("backend=ofi" in self .spec )
287290 or ("backend=gni" in self .spec )
288291 ):
289- if "pmi=none" in self . spec :
292+ if self . spec . satisfies ( "pmi=none" ) :
290293 raise InstallError (
291294 "The UCX/OFI/GNI backends need \
292295 PMI to run. Please add pmi=... \
@@ -299,7 +302,7 @@ def install(self, spec, prefix):
299302 or ("pmi=slurmpmi" in self .spec )
300303 or ("pmi=slurmpmi2" in self .spec )
301304 ):
302- if "^openmpi" in self . spec :
305+ if self . spec . satisfies ( "^openmpi" ) :
303306 raise InstallError (
304307 "To use any process management \
305308 interface other than PMIx, \
@@ -321,15 +324,15 @@ def install(self, spec, prefix):
321324 options .append ("-j%d" % make_jobs )
322325 options .append ("--destination=%s" % builddir )
323326
324- if "pmi=slurmpmi" in spec :
327+ if spec . satisfies ( "pmi=slurmpmi" ) :
325328 options .append ("slurmpmi" )
326- if "pmi=slurmpmi2" in spec :
329+ if spec . satisfies ( "pmi=slurmpmi2" ) :
327330 options .append ("slurmpmi2" )
328- if "pmi=pmix" in spec :
331+ if spec . satisfies ( "pmi=pmix" ) :
329332 options .append ("ompipmix" )
330333 options .extend (["--basedir=%s" % spec ["openmpi" ].prefix ])
331334
332- if "backend=mpi" in spec :
335+ if spec . satisfies ( "backend=mpi" ) :
333336 # in intelmpi <prefix>/include and <prefix>/lib fails so --basedir
334337 # cannot be used
335338 options .extend (
@@ -339,38 +342,45 @@ def install(self, spec, prefix):
339342 ["--libdir={0}" .format (libdir ) for libdir in spec ["mpi" ].libs .directories ]
340343 )
341344
342- if "backend=ucx" in spec :
345+ if spec . satisfies ( "backend=ucx" ) :
343346 options .extend (["--basedir=%s" % spec ["ucx" ].prefix ])
344- if "+papi" in spec :
347+ if spec . satisfies ( "+papi" ) :
345348 options .extend (["papi" , "--basedir=%s" % spec ["papi" ].prefix ])
346349 if "+smp" in spec and "backend=multicore" not in spec :
347350 # The 'multicore' backend always uses SMP, so we don't have to
348351 # append the 'smp' option when the 'multicore' backend is active. As
349352 # of Charm++ v7.0.0 it is actually a build error to append 'smp'
350353 # with the 'multicore' backend.
351354 options .append ("smp" )
352- if "+tcp" in spec :
355+ if spec . satisfies ( "+tcp" ) :
353356 if "backend=netlrts" not in spec :
354357 # This is a Charm++ limitation; it would lead to a
355358 # build error
356359 raise InstallError (
357360 "The +tcp variant requires " "the backend=netlrts communication mechanism"
358361 )
359362 options .append ("tcp" )
360- if "+omp" in spec :
363+ if spec . satisfies ( "+omp" ) :
361364 options .append ("omp" )
362- if "+pthreads" in spec :
365+ if spec . satisfies ( "+pthreads" ) :
363366 options .append ("pthreads" )
364- if "+cuda" in spec :
367+ if spec . satisfies ( "+cuda" ) :
365368 options .append ("cuda" )
366369
367- if "+shared" in spec :
370+ if spec . satisfies ( "+shared" ) :
368371 options .append ("--build-shared" )
369- if "+production" in spec :
372+ if spec . satisfies ( "+production" ) :
370373 options .append ("--with-production" )
371- if "+tracing" in spec :
374+ if spec . satisfies ( "+tracing" ) :
372375 options .append ("--enable-tracing" )
373376
377+ # charmpp build was failing with clang based compilers for -DNETWORK=mpi as discussed in
378+ # https://github.com/charmplusplus/charm/issues/3645
379+ # Fix was suggested in https://github.com/charmplusplus/charm/pull/3646 and the same has
380+ # been implemented in v8.0.0
381+ if self .spec .satisfies ("@8.0.0: %aocc" ):
382+ options .append ("--disable-fortran" )
383+
374384 # Call "make" via the build script
375385 # Note: This builds Charm++ in the "tmp" subdirectory of the
376386 # install directory. Maybe we could set up a symbolic link
0 commit comments