diff --git a/.gitlabci/gitlab-ci-pleiade.yml b/.gitlabci/gitlab-ci-pleiade.yml index 563746edd5..61afc21357 100644 --- a/.gitlabci/gitlab-ci-pleiade.yml +++ b/.gitlabci/gitlab-ci-pleiade.yml @@ -7,7 +7,7 @@ variables: BUILD: mpi REFREV: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} GIT_SSL_NO_VERIFY: "true" - NPROC_MAX: 16 + NPROC_MAX: 12 reg_debugging: '/^debugci.*/' FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true" diff --git a/astest/hsnv101d.comm b/astest/hsnv101d.comm index 1d67a0e465..f27dde6202 100644 --- a/astest/hsnv101d.comm +++ b/astest/hsnv101d.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -643,14 +643,14 @@ TEST_RESU( ), _F( GROUP_NO="N13", - CRITERE="ABSOLU", NOM_CMP="V43", GROUP_MA="M1", CHAM_GD=CHVAR47, - VALE_CALC=0.0e00, + VALE_CALC=0.0, VALE_REFE=0.0, REFERENCE="NON_DEFINI", - ORDRE_GRANDEUR=1e-6, + CRITERE="ABSOLU", + ORDRE_GRANDEUR=1.0e-6, ), _F( GROUP_NO="N13", @@ -716,13 +716,13 @@ TEST_RESU( ), _F( GROUP_NO="N13", - CRITERE="RELATIF", NOM_CMP="V43", GROUP_MA="M1", CHAM_GD=CHVAR48, VALE_CALC=1.0, VALE_REFE=1.0, REFERENCE="NON_DEFINI", + CRITERE="RELATIF", PRECISION=1.0e-3, ), _F( @@ -799,13 +799,13 @@ TEST_RESU( ), _F( GROUP_NO="N13", - CRITERE="ABSOLU", NOM_CMP="V43", GROUP_MA="M1", CHAM_GD=CHVAR64, - VALE_CALC=0.0e00, + VALE_CALC=0.0, VALE_REFE=0.0, REFERENCE="NON_DEFINI", + CRITERE="ABSOLU", ORDRE_GRANDEUR=1.0e-6, ), _F( @@ -872,13 +872,14 @@ TEST_RESU( ), _F( GROUP_NO="N13", - CRITERE="RELATIF", NOM_CMP="V43", GROUP_MA="M1", CHAM_GD=CHVA114, VALE_CALC=1.0, VALE_REFE=1.0, REFERENCE="NON_DEFINI", + CRITERE="RELATIF", + PRECISION=1.0e-3, ), _F( GROUP_NO="N13", @@ -1082,13 +1083,13 @@ TEST_RESU( ), _F( GROUP_NO="N13", - CRITERE="RELATIF", NOM_CMP="V43", GROUP_MA="M1", CHAM_GD=CHVA296, VALE_CALC=1.0, VALE_REFE=1.0, REFERENCE="NON_DEFINI", + CRITERE="RELATIF", PRECISION=1.0e-3, ), _F( diff --git a/astest/ssls146a.comm b/astest/ssls146a.comm index 3ec338f664..963ee31f35 100644 --- a/astest/ssls146a.comm +++ b/astest/ssls146a.comm @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -351,6 +351,7 @@ reslin = COMBINAISON_FERRAILLAGE( CODIFICATION="EC2", UNITE_CONTRAINTE="Pa", UNITE_DIMENSION="m", + PAS_EPAI=0.001, COMBINAISON=( _F(TYPE="ELU_FONDAMENTAL", NOM_CAS=("elu1", "elu2")), _F(TYPE="ELU_ACCIDENTEL", NOM_CAS=("elu_acc")), @@ -370,10 +371,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.002507804860513445, - VALE_REFE=0.002507804860513445, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.002507804860512707, + VALE_REFE=0.002507804860512707, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -382,10 +383,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.0017342333909456612, - VALE_REFE=0.0017342333909456612, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0017342333909453804, + VALE_REFE=0.0017342333909453804, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -394,10 +395,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.001352688427299791, - VALE_REFE=0.001352688427299791, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0013526884273015248, + VALE_REFE=0.0013526884273015248, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -406,10 +407,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.0019383747460609256, - VALE_REFE=0.0019383747460609256, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.001938374746058527, + VALE_REFE=0.001938374746058527, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -418,10 +419,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.0013658555484377744, - VALE_REFE=0.0013658555484377744, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.001365855548444022, + VALE_REFE=0.001365855548444022, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -430,10 +431,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.002601182393405061, - VALE_REFE=0.002601182393405061, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0026129281790207093, + VALE_REFE=0.0026129281790207093, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -442,10 +443,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.0010346715817815114, - VALE_REFE=0.0010346715817815114, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0010346715817879178, + VALE_REFE=0.0010346715817879178, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -454,10 +455,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="DNSXI", GROUP_MA="Centre", - VALE_CALC=0.002601182393405061, - VALE_REFE=0.002601182393405061, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0026129281790207093, + VALE_REFE=0.0026129281790207093, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -468,8 +469,8 @@ TEST_RESU( GROUP_MA="Centre", VALE_CALC=6.0, VALE_REFE=6.0, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), ) ) @@ -484,10 +485,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.0004192286652714539, - VALE_REFE=0.0004192286652714539, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.00041922866524667026, + VALE_REFE=0.00041922866524667026, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -496,10 +497,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.0010210387795773711, - VALE_REFE=0.0010210387795773711, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0010210387795471286, + VALE_REFE=0.0010210387795471286, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -508,10 +509,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.0005573458916023079, - VALE_REFE=0.0005573458916023079, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0005573458915864485, + VALE_REFE=0.0005573458915864485, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -520,10 +521,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.00029628845335525543, - VALE_REFE=0.00029628845335525543, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.00029628845335525, + VALE_REFE=0.00029628845335525, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -532,10 +533,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.000801481356630922, - VALE_REFE=0.000801481356630922, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0007133544561062694, + VALE_REFE=0.0007133544561062694, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -546,8 +547,8 @@ TEST_RESU( GROUP_MA="Base", VALE_CALC=0.0, VALE_REFE=0.0, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -556,10 +557,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.0006096682330196204, - VALE_REFE=0.0006096682330196204, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0006155252148797529, + VALE_REFE=0.0006155252148797529, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -568,10 +569,10 @@ TEST_RESU( CRITERE="RELATIF", NOM_CMP="AZS", GROUP_MA="Base", - VALE_CALC=0.0010210387795773711, - VALE_REFE=0.0010210387795773711, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + VALE_CALC=0.0010210387795471286, + VALE_REFE=0.0010210387795471286, + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), _F( RESULTAT=reslin, @@ -582,8 +583,8 @@ TEST_RESU( GROUP_MA="Base", VALE_CALC=2.0, VALE_REFE=2.0, - PRECISION=4.0e-2, - REFERENCE="ANALYTIQUE", + PRECISION=1.0e-6, + REFERENCE="AUTRE_ASTER", ), ) ) diff --git a/bibc/supervis/python.c b/bibc/supervis/python.c index f757e9e75e..336ec97218 100644 --- a/bibc/supervis/python.c +++ b/bibc/supervis/python.c @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------- */ -/* Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org */ +/* Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org */ /* This file is part of code_aster. */ /* */ /* code_aster is free software: you can redistribute it and/or modify */ @@ -47,15 +47,15 @@ void initAsterModules() { // Python 3.12 raises an error if PyImport_AppendInittab is called after Py_Initialize - if (!Py_IsInitialized()) { + if ( !Py_IsInitialized() ) { PyImport_AppendInittab( "aster_core", PyInit_aster_core ); PyImport_AppendInittab( "aster", PyInit_aster ); /* Module définissant des opérations sur les objets fonction_sdaster */ PyImport_AppendInittab( "aster_fonctions", PyInit_aster_fonctions ); - #ifdef ASTER_HAVE_MED +#ifdef ASTER_HAVE_MED PyImport_AppendInittab( "med_aster", PyInit_med_aster ); - #endif +#endif } } diff --git a/bibfor/comport_prep/comp_meca_name.F90 b/bibfor/comport_prep/comp_meca_name.F90 index 437093f30e..fd5890501b 100644 --- a/bibfor/comport_prep/comp_meca_name.F90 +++ b/bibfor/comport_prep/comp_meca_name.F90 @@ -134,14 +134,11 @@ subroutine comp_meca_name(nbVari, nbVariMeca, l_excl, vari_excl, l_kit_meta, & infoVari(iVari) = metaPhasName(iMetaPhas)//'##'//metaRelaName(iVariMetaRela) end do end do - do iVariMetaRela = 1, nbVariMetaRela - iVari = iVari+1 - infoVari(iVari) = metaRelaName(iVariMetaRela) - end do do iVariMetaGlob = 1, nbVariMetaGlob iVari = iVari+1 infoVari(iVari) = metaGlobName(iVariMetaGlob) end do + ASSERT(iVari .eq. nbVariMetaGlob+nbVariMetaRela*nbMetaPhas) call lcdiscard(metaPhasPy) call lcdiscard(metaRelaPy) call lcdiscard(metaGlobPy) diff --git a/bibfor/comport_prep/comp_meca_rkit.F90 b/bibfor/comport_prep/comp_meca_rkit.F90 index a5b310f7fa..773d908320 100644 --- a/bibfor/comport_prep/comp_meca_rkit.F90 +++ b/bibfor/comport_prep/comp_meca_rkit.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -72,6 +72,7 @@ subroutine comp_meca_rkit(keywordfact, iocc, rela_comp, kit_comp, l_etat_init_) call getvtx(keywordfact, 'RELATION', iocc=iocc, scal=relaCompMeta) +! ----- Internal state variables (by phase) metaRela = 'VIDE' lIsot = ASTER_FALSE lCine = ASTER_FALSE @@ -97,6 +98,7 @@ subroutine comp_meca_rkit(keywordfact, iocc, rela_comp, kit_comp, l_etat_init_) ASSERT(ASTER_FALSE) end if +! ----- Internal state variables (global) metaGlob = 'VIDE' if (lIsot) then metaGlob = 'META_G_ISOT' diff --git a/bibfor/comport_prep/comp_nbvari_kit.F90 b/bibfor/comport_prep/comp_nbvari_kit.F90 index db888b64ca..991daadb05 100644 --- a/bibfor/comport_prep/comp_nbvari_kit.F90 +++ b/bibfor/comport_prep/comp_nbvari_kit.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -99,7 +99,7 @@ subroutine comp_nbvari_kit(kit_comp, & nbVariKit(1) = nbVariMetaRela nbVariKit(2) = nbMetaPhas nbVariKit(3) = nbVariMetaGlob - nbVariFromKit = nbVariMetaGlob+nbVariMetaRela*(nbMetaPhas+1) + nbVariFromKit = nbVariMetaGlob+nbVariMetaRela*nbMetaPhas end if ! - Number of internal state variables for KIT DDI diff --git a/bibfor/cont_pair/prjint_ray.F90 b/bibfor/cont_pair/prjint_ray.F90 index a3c9069f79..e8a048545e 100644 --- a/bibfor/cont_pair/prjint_ray.F90 +++ b/bibfor/cont_pair/prjint_ray.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2022 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -88,6 +88,8 @@ subroutine prjint_ray(proj_tole, dist_ratio, elem_dime, & ! -------------------------------------------------------------------------------------------------- ! nb_poin_inte = 0 + nb_poin_inte_ma = 0 + nb_poin_inte_es = 0 inte_weight = 0.d0 iret = 0 poin_inte_es_tmp = 0.d0 diff --git a/bibfor/jeveux/jjalls.F90 b/bibfor/jeveux/jjalls.F90 index ac348517d6..d20c345fde 100644 --- a/bibfor/jeveux/jjalls.F90 +++ b/bibfor/jeveux/jjalls.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -161,10 +161,10 @@ subroutine jjalls(lonoi, ic, genri, typei, lty, & nbdyn = nbdyn+1 else if (iessai .gt. 1) then - call utmess('E', 'JEVEUX_60', ni=2, vali=ival) - call jeimpm(6) ival(1) = lsic*lois ival(2) = ltot*lois + call utmess('E', 'JEVEUX_60', ni=2, vali=ival) + call jeimpm(6) call utmess('F', 'JEVEUX_60', ni=2, vali=ival) else call jjldyn(2, -2, ltot) diff --git a/bibfor/mate_util/ExternalStateVariable_module.F90 b/bibfor/mate_util/ExternalStateVariable_module.F90 index 0ff994e053..262e9e77fc 100644 --- a/bibfor/mate_util/ExternalStateVariable_module.F90 +++ b/bibfor/mate_util/ExternalStateVariable_module.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -540,49 +540,51 @@ subroutine fillMaps(mateField, mesh, model, & onAllCells = ASTER_FALSE call getelem(mesh, factorKeyword, iAffe, ' ', listCell, nbCellAffe, & model=model, onAllCells_=onAllCells) - if (onAllCells) then - call nocart(exteVariMap1, 1, nbCmp) - call nocart(exteVariMap2, 1, EXTEVARI_MAP2_SIZE) - else - call jeveuo(listCell, 'L', jvCell) - call nocart(exteVariMap1, 3, nbCmp, & - mode='NUM', nma=nbCellAffe, limanu=zi(jvCell)) - call nocart(exteVariMap2, 3, EXTEVARI_MAP2_SIZE, & - mode='NUM', nma=nbCellAffe, limanu=zi(jvCell)) - end if + if (nbCellAffe .gt. 0) then + if (onAllCells) then + call nocart(exteVariMap1, 1, nbCmp) + call nocart(exteVariMap2, 1, EXTEVARI_MAP2_SIZE) + else + call jeveuo(listCell, 'L', jvCell) + call nocart(exteVariMap1, 3, nbCmp, & + mode='NUM', nma=nbCellAffe, limanu=zi(jvCell)) + call nocart(exteVariMap2, 3, EXTEVARI_MAP2_SIZE, & + mode='NUM', nma=nbCellAffe, limanu=zi(jvCell)) + end if ! --------- Some checks - if (exteVariName .eq. "TEMP") then + if (exteVariName .eq. "TEMP") then ! ------------- For XFEM: change TEMP to TEMP_ELGA - call xvarc_temp(affeType, dsName, funcExtrLeft, funcExtrRight, & - funcResult, nbAffe, exteVariMap2) + call xvarc_temp(affeType, dsName, funcExtrLeft, funcExtrRight, & + funcResult, nbAffe, exteVariMap2) ! ------------- For THM: no temperature - if (model .ne. " ") then - call dismoi('EXI_THM', model, 'MODELE', repk=answer) - hasTHM = answer .eq. "OUI" - if (hasTHM) then - call jeveuo(model//'.MAILLE', 'L', vi=cellAffectedByModel) - if (onAllCells) then - call utmess('F', 'MATERIAL2_51') - else - if (nbCellAffe .ne. 0) then - do iCellAffe = 1, nbCellAffe - cellNume = zi(jvCell-1+iCellAffe) - elemTypeNume = cellAffectedByModel(cellNume) - call jenuno(jexnum('&CATA.TE.NOMTE', elemTypeNume), & - elemTypeName) - if (lteatt('TYPMOD2', 'THM', typel=elemTypeName)) then - call utmess('F', 'MATERIAL2_51') - end if - end do - end if + if (model .ne. " ") then + call dismoi('EXI_THM', model, 'MODELE', repk=answer) + hasTHM = answer .eq. "OUI" + if (hasTHM) then + call jeveuo(model//'.MAILLE', 'L', vi=cellAffectedByModel) + if (onAllCells) then + call utmess('F', 'MATERIAL2_51') + else + if (nbCellAffe .ne. 0) then + do iCellAffe = 1, nbCellAffe + cellNume = zi(jvCell-1+iCellAffe) + elemTypeNume = cellAffectedByModel(cellNume) + call jenuno(jexnum('&CATA.TE.NOMTE', elemTypeNume), & + elemTypeName) + if (lteatt('TYPMOD2', 'THM', typel=elemTypeName)) then + call utmess('F', 'MATERIAL2_51') + end if + end do + end if + end if end if end if end if + call jedetr(listCell) end if - call jedetr(listCell) end do ! ! ------------------------------------------------------------------------------------------------ diff --git a/bibfor/mumps/amumpi.F90 b/bibfor/mumps/amumpi.F90 index 3aea4e424d..4b6657054e 100644 --- a/bibfor/mumps/amumpi.F90 +++ b/bibfor/mumps/amumpi.F90 @@ -1,5 +1,5 @@ ! -------------------------------------------------------------------- -! Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +! Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org ! This file is part of code_aster. ! ! code_aster is free software: you can redistribute it and/or modify @@ -285,11 +285,10 @@ subroutine amumpi(option, lquali, ldist, kxmps, type, lmhpc, lbloc) end if ! #ifdef ASTER_HAVE_OPENMP - nbomp = omp_get_max_threads() + nbomp = omp_get_max_threads() #else - nbomp = 1 + nbomp = 1 #endif - ! POUR PRENDRE POTENTIEL IMPACT REDUCTION_MPI if (icntl(17) > 1) then nbomp = nbomp*icntl(17) diff --git a/bibfor/nonlinear/nmdoch.F90 b/bibfor/nonlinear/nmdoch.F90 index 0fd0a72be9..46ac1ac5c3 100644 --- a/bibfor/nonlinear/nmdoch.F90 +++ b/bibfor/nonlinear/nmdoch.F90 @@ -160,17 +160,14 @@ subroutine nmdoch(list_load, l_load_user, list_load_resu_, base, l_calc_user, & ! ! - Get number of contact ligrel for loads datastructure ! - ! Had to check for the presence of ligrel_slav and ligrel_cont before utilizing them. It - ! was causing a segmentation fault on MSVC when they were not present. if (present(ligrel_slav)) then if (ligrel_slav .ne. ' ') then - nb_load_cont = nb_load_cont + 1 + nb_load_cont = nb_load_cont+1 end if end if - if (present(ligrel_cont)) then if (ligrel_cont .ne. ' ') then - nb_load_cont = nb_load_cont + 1 + nb_load_cont = nb_load_cont+1 end if end if ! @@ -350,15 +347,19 @@ subroutine nmdoch(list_load, l_load_user, list_load_resu_, base, l_calc_user, & call focste(func_cont, 'TOUTRESU', coef, bas) end if - if (present(ligrel_slav) .and. ligrel_slav .ne. ' ') then - i_load_new = i_load_new+1 - call liscad('MECA', list_load, i_load_new, ligrel_slav, func_cont, & - info_typez='ELEM_TARDIF') + if (present(ligrel_slav)) then + if (ligrel_slav .ne. ' ') then + i_load_new = i_load_new+1 + call liscad('MECA', list_load, i_load_new, ligrel_slav, func_cont, & + info_typez='ELEM_TARDIF') + end if end if - if (present(ligrel_cont) .and. ligrel_cont .ne. ' ') then - i_load_new = i_load_new+1 - call liscad('MECA', list_load, i_load_new, ligrel_cont, func_cont, & - info_typez='ELEM_TARDIF') + if (present(ligrel_cont)) then + if (ligrel_cont .ne. ' ') then + i_load_new = i_load_new+1 + call liscad('MECA', list_load, i_load_new, ligrel_cont, func_cont, & + info_typez='ELEM_TARDIF') + end if end if end if ! diff --git a/code_aster/Behaviours/cata_vari.py b/code_aster/Behaviours/cata_vari.py index b67707b5d5..866e27d680 100644 --- a/code_aster/Behaviours/cata_vari.py +++ b/code_aster/Behaviours/cata_vari.py @@ -843,7 +843,7 @@ "XMEMB3": _("GLRC_DAMAGE : tenseur d'écrouissage cinématique en membrane composante 3"), "Y1": _("coordonnée Y de la pointe de fissure après rupture par propagation,"), "Y2": _("coordonnée Y de la pointe de fissure 2 lors de l'amorçage,"), - "ZIRCALBE": _("phase métallurgique zirconium ALPHA/BETA"), + "ZIRCABET": _("phase métallurgique zirconium ALPHA/BETA"), "ZIRCALPH": _("phase métallurgique zirconium ALPHA"), "ZIRCBETA": _("phase métallurgique zirconium BETA"), "EPSIN1": _("RGI_BETON_BA Déformation axiale Renforcement 1"), diff --git a/code_aster/Behaviours/meta_g_cine.py b/code_aster/Behaviours/meta_g_cine.py index f5a5da4864..a2a23b776f 100644 --- a/code_aster/Behaviours/meta_g_cine.py +++ b/code_aster/Behaviours/meta_g_cine.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -26,8 +26,8 @@ lc_type=("META_G_CINE",), doc="""Loi de comportement prenant en compte la métallurgie - Ecrouissage cinématique""", num_lc=0, - nb_vari=1, - nom_vari=("INDIPLAS",), + nb_vari=7, + nom_vari=("XCINXX", "XCINYY", "XCINZZ", "XCINXY", "XCINXZ", "XCINYZ", "INDIPLAS"), mc_mater=None, modelisation=("3D", "AXIS", "D_PLAN"), deformation=("PETIT", "PETIT_REAC", "GROT_GDEP", "SIMO_MIEHE"), diff --git a/code_aster/Behaviours/zirc.py b/code_aster/Behaviours/zirc.py index e43f089d35..c4f812b594 100644 --- a/code_aster/Behaviours/zirc.py +++ b/code_aster/Behaviours/zirc.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ doc="""phases metallurgiques du zirconium""", num_lc=0, nb_vari=3, - nom_vari=("ZIRCALPH", "ZIRCALBE", "ZIRCBETA"), + nom_vari=("ZIRCALPH", "ZIRCABET", "ZIRCBETA"), mc_mater=("META_ZIRC",), modelisation=("3D", "AXIS", "D_PLAN"), deformation=("PETIT", "PETIT_REAC", "GROT_GDEP"), diff --git a/code_aster/Utilities/Tester.py b/code_aster/Utilities/Tester.py index 2ef850cb55..efbf2d4411 100644 --- a/code_aster/Utilities/Tester.py +++ b/code_aster/Utilities/Tester.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2024 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify diff --git a/data/ddt_wrapper.tmpl b/data/ddt_wrapper.tmpl index 4e071ac81c..3352547424 100755 --- a/data/ddt_wrapper.tmpl +++ b/data/ddt_wrapper.tmpl @@ -1,5 +1,14 @@ #!/bin/bash +set_workdir() { + local this=$(readlink -n -f "$1") + workdir=$(dirname $(dirname "${this}")) + echo "working directory is ${workdir}" +} + +set_workdir "${0}" +cd "${workdir}" + wait_for_pid() { local ready=0 printf "waiting for code_aster processes to start..." @@ -33,6 +42,8 @@ wait_for_pid() { # clean previous values rm -f proc.*/.pid +export OMP_NUM_THREADS=%{nbthread} + # start code_aster execution export WAIT_FOR_DDT=10 %{command} %{redirect_to} output.txt & diff --git a/run_aster/command_files.py b/run_aster/command_files.py index 0260364f59..3175bbb890 100644 --- a/run_aster/command_files.py +++ b/run_aster/command_files.py @@ -142,13 +142,17 @@ def change_procdir(text): Returns: str: Changed content. """ - # do not use 'CA.MPI' that would start 'CA.init()' + # 1. Do not use 'CA.MPI' that would start 'CA.init()' + # 2. Usual mpi runs start from the workdir, so sys.path "." is expanded to + # the workdir. That's why "." is inserted here again. add = """ import os +import sys import time from mpi4py import MPI os.chdir(f"proc.{MPI.COMM_WORLD.Get_rank()}") +sys.path.insert(0, ".") with open(".pid", "w") as fpid: fpid.write(str(os.getpid())) diff --git a/run_aster/run.py b/run_aster/run.py index f9091df186..e0010a42a2 100644 --- a/run_aster/run.py +++ b/run_aster/run.py @@ -459,14 +459,15 @@ def _exec_one(self, comm, timeout): logger.info(" ".join(base_cmd)) return is_ok - _gen_cmd_file(f"cmd{idx}.sh", [" ".join(base_cmd)]) + nbthread = self.export.get("ncpus", 1) + _gen_cmd_file(f"cmd{idx}.sh", [" ".join(base_cmd)], nbthread) shell = f"cmd{idx}.sh" args_cmd = dict(mpi_nbcpu=self.export.get("mpi_nbcpu", 1), program="proc.0/" + shell) cmd = CFG.get("mpiexec").format(**args_cmd) logger.info(" " + cmd) shell = f"ddt_cmd{idx}.sh" - _gen_ddt_template(shell, cmd, idx) + _gen_ddt_template(shell, cmd, idx, nbthread) logger.info("Run with DDT using:") logger.info(" " + "proc.0/" + shell) @@ -639,9 +640,10 @@ def _ls(*paths): return proc.stdout -def _gen_cmd_file(filename, lines): +def _gen_cmd_file(filename, lines, nbthread): cmd = [] cmd.append("#!/bin/bash") + cmd.append(f"export OMP_NUM_THREADS={nbthread}") cmd.append("\n".join(lines)) cmd.append("") with open(filename, "w") as fobj: @@ -649,10 +651,12 @@ def _gen_cmd_file(filename, lines): os.chmod(filename, 0o755) -def _gen_ddt_template(filename, cmd, idx): +def _gen_ddt_template(filename, cmd, idx, nbthread): redir = ">" if idx == 0 else ">>" with open(Path(RUNASTER_ROOT) / "share" / "aster" / "ddt_wrapper.tmpl") as ftmpl: - script = PercTemplate(ftmpl.read()).substitute(command=cmd, redirect_to=redir) + script = PercTemplate(ftmpl.read()).substitute( + command=cmd, redirect_to=redir, nbthread=nbthread + ) with open(filename, "w") as fobj: fobj.write(script) os.chmod(filename, 0o755)